diff -Nru flumotion-0.6.1/aclocal.m4 flumotion-0.9.1/aclocal.m4 --- flumotion-0.6.1/aclocal.m4 2009-09-09 11:37:50.000000000 +0000 +++ flumotion-0.9.1/aclocal.m4 2011-09-11 08:09:16.000000000 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. @@ -13,170 +13,12 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, -[m4_warning([this file was generated for autoconf 2.64. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program 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 -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES - # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -192,7 +34,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11], [], +m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -208,7 +50,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11])dnl +[AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1024,6 +866,14 @@ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) @@ -1054,6 +904,14 @@ am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) @@ -1301,7 +1159,6 @@ m4_include([common/as-python.m4]) m4_include([common/as-version.m4]) m4_include([common/intltool.m4]) -m4_include([common/twisted-module.m4]) m4_include([m4/gettext.m4]) m4_include([m4/iconv.m4]) m4_include([m4/lib-ld.m4]) diff -Nru flumotion-0.6.1/bin/flumotion-admin.in flumotion-0.9.1/bin/flumotion-admin.in --- flumotion-0.6.1/bin/flumotion-admin.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-admin.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,25 +1,22 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os import sys @@ -30,7 +27,8 @@ try: # setup the project root dir = os.path.dirname(os.path.abspath(__file__)) - if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): + if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join(LIBDIR, 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion-admin-text.in flumotion-0.9.1/bin/flumotion-admin-text.in --- flumotion-0.6.1/bin/flumotion-admin-text.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-admin-text.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,25 +1,22 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os import sys @@ -30,7 +27,8 @@ warnings.filterwarnings('ignore', category=UserWarning) dir = os.path.dirname(os.path.abspath(__file__)) -if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): +if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join('@LIBDIR@', 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion-command.in flumotion-0.9.1/bin/flumotion-command.in --- flumotion-0.6.1/bin/flumotion-command.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-command.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,25 +1,22 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os import sys @@ -32,7 +29,8 @@ try: # setup the project root dir = os.path.dirname(os.path.abspath(__file__)) - if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): + if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join(LIBDIR, 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion.in flumotion-0.9.1/bin/flumotion.in --- flumotion-0.6.1/bin/flumotion.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,29 +1,26 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. - # Be very careful about adding new imports here, we want to catch # Ctrl-C, so we must be able to enter the try/except for KeyboardInterrupt # as quick as possible + + import os import sys @@ -33,7 +30,8 @@ def _setup_project_root(): dir = os.path.dirname(os.path.abspath(__file__)) - if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): + if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join(LIBDIR, 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion-inspect.in flumotion-0.9.1/bin/flumotion-inspect.in --- flumotion-0.6.1/bin/flumotion-inspect.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-inspect.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,29 +1,26 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. - # Be very careful about adding new imports here, we want to catch # Ctrl-C, so we must be able to enter the try/except for KeyboardInterrupt # as quick as possible + + import os import sys @@ -34,7 +31,8 @@ try: # setup the project root dir = os.path.dirname(os.path.abspath(__file__)) - if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): + if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join(LIBDIR, 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion-job.in flumotion-0.9.1/bin/flumotion-job.in --- flumotion-0.6.1/bin/flumotion-job.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-job.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,23 +1,19 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. @@ -35,7 +31,8 @@ # setup the project root dir = os.path.dirname(os.path.abspath(__file__)) -if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): +if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join(LIBDIR, 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion-launch.in flumotion-0.9.1/bin/flumotion-launch.in --- flumotion-0.6.1/bin/flumotion-launch.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-launch.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,29 +1,26 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. - # Be very careful about adding new imports here, we want to catch # Ctrl-C, so we must be able to enter the try/except for KeyboardInterrupt # as quick as possible + + import os import sys @@ -34,7 +31,8 @@ try: # setup the project root dir = os.path.dirname(os.path.abspath(__file__)) - if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): + if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join(LIBDIR, 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion-manager.in flumotion-0.9.1/bin/flumotion-manager.in --- flumotion-0.6.1/bin/flumotion-manager.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-manager.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,29 +1,25 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. - # Be very careful about adding new imports here, we want to catch # Ctrl-C, so we must be able to enter the try/except for KeyboardInterrupt # as quick as possible + import os import sys @@ -34,7 +30,8 @@ try: # setup the project root dir = os.path.dirname(os.path.abspath(__file__)) - if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): + if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join(LIBDIR, 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion-nagios.in flumotion-0.9.1/bin/flumotion-nagios.in --- flumotion-0.6.1/bin/flumotion-nagios.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-nagios.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,25 +1,22 @@ #!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os import sys @@ -30,7 +27,8 @@ try: # setup the project root dir = os.path.dirname(os.path.abspath(__file__)) - if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): + if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join(LIBDIR, 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion-rrdmon.in flumotion-0.9.1/bin/flumotion-rrdmon.in --- flumotion-0.6.1/bin/flumotion-rrdmon.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-rrdmon.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,23 +1,19 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. @@ -31,7 +27,8 @@ try: # setup the project root dir = os.path.dirname(os.path.abspath(__file__)) - if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): + if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join(LIBDIR, 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion-tester.in flumotion-0.9.1/bin/flumotion-tester.in --- flumotion-0.6.1/bin/flumotion-tester.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-tester.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,25 +1,22 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os import sys import optparse @@ -36,7 +33,8 @@ # This can't be removed, dir = os.path.dirname(os.path.abspath(__file__)) -if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): +if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join('@LIBDIR@', 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/flumotion-worker.in flumotion-0.9.1/bin/flumotion-worker.in --- flumotion-0.6.1/bin/flumotion-worker.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/flumotion-worker.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,29 +1,26 @@ -#!/usr/bin/python +#!@PYTHON@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. - # Be very careful about adding new imports here, we want to catch # Ctrl-C, so we must be able to enter the try/except for KeyboardInterrupt # as quick as possible + + import os import sys @@ -34,7 +31,8 @@ try: # setup the project root dir = os.path.dirname(os.path.abspath(__file__)) - if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')): + if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \ + os.path.exists(os.path.join(dir, '..', '.git')): root = os.path.split(dir)[0] else: root = os.path.join(LIBDIR, 'flumotion', 'python') diff -Nru flumotion-0.6.1/bin/Makefile.in flumotion-0.9.1/bin/Makefile.in --- flumotion-0.6.1/bin/Makefile.in 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/bin/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -48,14 +48,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -109,6 +108,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -118,18 +118,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -177,6 +170,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -194,16 +188,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -211,7 +207,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -226,6 +221,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -258,7 +254,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/bin/runtest.in flumotion-0.9.1/bin/runtest.in --- flumotion-0.6.1/bin/runtest.in 2009-09-09 11:37:19.000000000 +0000 +++ flumotion-0.9.1/bin/runtest.in 2011-09-11 08:09:03.000000000 +0000 @@ -1,19 +1,21 @@ #!/usr/bin/env python # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# See "LICENSE.GPL" in the source distribution for more information. - -# This program is also licensed under the Flumotion license. -# See "LICENSE.Flumotion" in the source distribution for more information. import os import sys diff -Nru flumotion-0.6.1/ChangeLog flumotion-0.9.1/ChangeLog --- flumotion-0.6.1/ChangeLog 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/ChangeLog 2011-09-11 08:09:03.000000000 +0000 @@ -1,39082 +1 @@ -=== release 0.6.1 === - -2009-09-09 Jan Urbanski - - * NEWS: - * RELEASE: - * configure.ac: - * flumotion.doap: - Releasing 0.6.1 "El Agüelo" - -2009-09-09 Jan Urbanski - - Backport r8172: - * flumotion/admin/gtk/dialogs.py: - Update the list of authors. - -2009-09-09 Jan Urbanski - - Backport r8169: - * flumotion/component/muxers/multipart.py: - Add warnings about multipart deficiency in gst-plugins-good up to - 0.10.17. - Closes #1342. - -2009-09-09 Jan Urbanski - - Backport r8167: - * flumotion/component/encoders/mulaw/mulaw.py: - Force mulaw to be 8000 Hz mono. - We only support mulaw in multipart and RFC2046 mandates the audio/basic - content-type of multipart to be 8000 Hz single channel. - -2009-09-09 Jan Urbanski - - Backport r8165: - * flumotion/component/encoders/dirac/dirac.py: - Add warnings about a bug that existed in schroenc before it was moved - to gst-plugins-bad and released in 0.10.14. - - * flumotion/component/muxers/checks.py: - Add warnings about the gdppay bug in gst-plugins-base 0.10.24. - Closes #1341. - -2009-09-07 Jan Urbanski - - patch by: Xavier Queralt - - Backport r8163: - * doc/man/flumotion-admin.1: - * doc/man/flumotion-manager.1: - * doc/man/flumotion-worker.1: - Document missing command line options in manpages. Closes #1354. - -2009-09-07 Jan Urbanski - - Backport r8161: - * flumotion/component/consumers/disker/disker.py: - Prevent the disker from starting if the ical-schedule property is set - and one of the required modules is missing. - Original coding forgot to raise an exception after adding an Error - message to the component state, which resulted in a sad disker, but one - that was still disking. - Fixes #809. - -2009-09-07 Jan Urbanski - - Backport r8159: - * data/make-dummy-cert: - Remove bashism from make-dummy-cert (possibly it was just a typo). We - don't translate the usage message for that script anyway. - See Debian bug #530971. - -2009-09-07 Julien Le Goff - - reviewed by: Jan - - Backport r8157: - * flumotion/monitor/nagios/stream.py: - Use the timeout option. - -2009-09-07 Guillaume Quintard - - reviewed by: Arek - - Backport r8154: - * flumotion/component/bouncers/icalbouncer.py: - * flumotion/component/consumers/disker/disker.py: - Catch more (possible) exceptions from the icalendar module - Fixes #1267 - -2009-09-06 Jan Urbanski - - * configure.ac: - 0.6.0.2 prerelease - -2009-09-01 Thomas Vander Stichele - - reviewed by: Zaheer Abbas Merali - - Backport r8150: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/componentlist.py: - Allow deletion of sleeping components with no worker logged in. - canStart == (canDelete && workers logged in). - Fixes #1348. - -2009-08-21 Jan Urbanski - - * configure.ac: - Back to dev. - -=== release 0.6.0 === - -2009-08-21 Jan Urbanski - - * NEWS: - * RELEASE: - * configure.ac: - * flumotion.doap: - Releasing 0.6.0 "Can Punyetes" - -2009-08-21 Jan Urbanski - - * flumotion/admin/gtk/dialogs.py: - Update the list of authors. - -2009-08-20 Zaheer Abbas Merali - - * flumotion/component/converters/overlay/overlay.py: - Makes overlay work for > 0.10.23 gst-plugins-base. - Fixes #1340 - -2009-08-20 Alvin Delagon - - reviewed by: Jan Urbanski - - * flumotion/component/muxers/checks.py: - * flumotion/component/muxers/ogg.py: - Add warnings about the oggmuxer bug in gst-plugins base 0.10.24 - -2009-08-20 Alvin Delagon - - reviewed by: Jan Urbanski - - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/disker/disker.xml: - Have the disker overwrite the file if the file exists. Fixes #1339. - -2009-08-14 Jan Urbanski - - patch by: Xavier Queralt - - * po/POTFILES.in: - Update with new files containing strings for translation. - Sort the entries. - -2009-08-12 Guillaume Quintard - - * po/fr.po: - last batch, there are still some flaky or non-translated strings though. - -2009-08-12 Guillaume Quintard - - * po/fr.po: - going on with the french translations... - -2009-08-12 Jan Urbanski - - * configure.ac: - 0.5.4.2 prerelase - -2009-08-12 Jan Urbanski - - * configure.ac: - Change the required version of Python to 2.4.0, which unbreaks the - Python version detection logic in the autotools setup. - -2009-08-12 Jan Urbanski - - * data/make-dummy-cert: - Remove bashism in the usage of the trap shell builtin. - It made make-dummy-cert fail on systems that use a different shell than - bash as their system shell, e.g. recent Ubuntus and Debians that use - dash as the system shell. - -2009-08-12 Guillaume Quintard - - * po/fr.po: - continuing french translation. - -2009-08-12 Jan Urbanski - - * README: - * configure.ac: - * flumotion.spec.in: - Bump the required version of Python to 2.4. - -2009-08-11 Guillaume Quintard - - * po/fr.po: - adding a few '\n' so the .po file is valid - -2009-08-11 Guillaume Quintard - - * po/fr.po: - Refine the first 200 french strings. - -2009-08-11 Jan Urbanski - - * flumotion/component/base/http.py: - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/test/test_http.py: - Revert r7950, the allow-default property of streaming components. There - is no consensus about what the property should do and how it should be - named. It may be reintroduced after the 0.6.0 release. - -2009-08-10 Jan Urbanski - - patch by: Murray Cumming - - * data/glade/debug-marker.glade: - * data/glade/encoding-wizard.glade: - * data/glade/ondemand-wizard.glade: - * data/glade/overlay-wizard.glade: - * data/glade/welcome-wizard.glade: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/greeter.py: - * flumotion/component/encoders/smoke/smoke.py: - * flumotion/component/muxers/checks.py: - * flumotion/component/producers/checks.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/scenario/steps/httpstreamersteps.py: - * flumotion/ui/fileselector.py: - * flumotion/worker/checks/audio.py: - * flumotion/worker/checks/gst010.py: - Minor improvements to user-visible strings after a review at the - request of Thomas Vander Stichele. - -2009-08-05 Guillaume Quintard - - * po/fr.po: - Last batch of translations, 11 left. - -2009-08-05 Guillaume Quintard - - * po/fr.po: - Untranslated strings now down to less than 100 (doesn't mean the - translated ones are all good, but it's an enhancement). - -2009-08-04 Guillaume Quintard - - * flumotion/test/test_component_providers.py: - Changes from assertIsInstance() to failUnless(isinstance()) - for compatibility with the buildbot. - -2009-08-04 Guillaume Quintard - - reviewed by: xmartinez - - * flumotion/component/misc/httpserver/cachedprovider.py: - * flumotion/component/misc/httpserver/localpath.py: - LocalPaths now won't check if the file exist before returning a child as - the verification is done in the open() - * flumotion/component/misc/httpserver/localprovider.py: - For the three previous file, added a reference to the new test suite - module - * flumotion/test/test_component_providers.py: - * flumotion/test/test_component_providers.py (added): - New test suite for LocalPaths, covering the child and open methods. - Fixes #1319 - -2009-08-04 Jan Urbanski - - * flumotion/test/bouncertest.py: - Add a helper class for writing bouncer tests. - - * flumotion/test/test_bouncers_ipbouncer.py: - Use the helper class to test the IPBouncer. - -2009-08-01 Thomas Vander Stichele - - * data/glade/httpstreamer-wizard.glade: - * data/glade/ondemand-wizard.glade: - Change some strings. Unmark some for translation. - -2009-07-31 Guillaume Quintard - - reviewed by: xmartinez - - * flumotion/test/test_component_httpserver.py: - Removes testNotFound and adds a new class (TestNotFound) to cover - http.NOT_FOUND errors. - Note: shutil is now an import (used to clean the temp directory) - -2009-07-30 Guillaume Quintard - - reviewed by: arek - - * flumotion/component/misc/httpserver/localprovider.py: - Handles the case where a directory of the path is actually a file, so - httpserver returns a 404 error and not a 500 one. - -2009-07-29 Guillaume Quintard - - reviewed by: jlegoff - - * flumotion/test/test_component_httpserver.py: - Adds testNotFound that check we actually get a 404 for an non-existing - ressource. Plus reactivate testRangeTooBig as it seems to pass - -2009-07-27 Xavier Queralt - - * flumotion/component/producers/firewire/wizard.glade: - Some glade tweaking so the window size and the message view don't affect - the firewire step appearance. - -2009-07-27 Guillaume Quintard - - reviewed by: sebastien - - * README: updated to use playbin2 and follow the assistant defaults - -2009-07-27 Josep Joan Ribas - - * flumotion/ui/fileselector.py: - Add fallback to generic file icon. - -2009-07-27 Josep Joan Ribas - - reviewed by: jlegoff - - * flumotion/worker/checks/check.py: - Add a worker check for media files. Missing from r8025. - -2009-07-27 Josep Joan Ribas - - reviewed by: jlegoff - - * data/image/wizard/Makefile.am: - * data/image/wizard/looper.png (added): - * flumotion/component/producers/looper/Makefile.am: - * flumotion/component/producers/looper/looper.xml: - * flumotion/component/producers/looper/wizard.glade (added): - * flumotion/component/producers/looper/wizard_gtk.py (added): - Add looper to the production page in the Wizard. Fixes #834. - - -2009-07-24 Xavier Queralt - - * flumotion/test/test_component_httpserver.py: - Obviously cortado is not going to be installed always. Install a - modified getCortadoFilename method to correct this. - -2009-07-24 Xavier Queralt - - reviewed by: Jan - - * flumotion/component/plugs/cortado/cortado.py: - Map the root path to the index page by adding a new child instead of - checking it for each request. This way the parameters the url can have - are ignored and don't interfere. - * flumotion/test/test_component_httpserver.py: - Unit test cortado plug requests. With and without a GET parameter and - for an unexistent file. - -2009-07-23 Jan Urbanski - - * flumotion/component/misc/httpserver/cachedprovider.py: - * flumotion/monitor/nagios/stream.py: - Clean up after Thomas. Revision r7990 made the python module export a - sha1 name, but the code was still using sha. - Spurious breakage FTW. - -2009-07-23 Jan Urbanski - - * flumotion/test/test_bouncers_ipbouncer.py (added): - Add IP bouncer unit tests. - -2009-07-22 Jan Urbanski - - * data/upgrade-to-0.6.0.xsl (added): - * data/Makefile.am: - Add a 0.6.0 upgrade xsl. Fixes #1085. - -2009-07-22 Xavier Queralt - - reviewed by: Arek, Jan - - * flumotion/admin/admin.py (AdminClientFactory.clientConnectionLost): - Fallback to the default behaviour when the extraTenacious attribute has - been set or the admin has been authenticated before. Stop trying to - connect otherwise. - Don't import the whole SSL module only for catching a failure. The - default message is ok. - -2009-07-21 Xavier Queralt - - * flumotion/admin/gtk/adminwindow.py: - Ignore the NumLock key mask when reading the Ctrl-w combination. - See #1074 - -2009-07-20 Xavier Queralt - - * flumotion/common/mimetypes.py: - Use gio if available when obtaining the application that handles a - given content-type. GnomeVFS has been deprecated in favour of GIO. - * flumotion/ui/linkwidget.py: - Set the uri_hook for the LinkButton so the uri is not opened twice. - -2009-07-20 Xavier Martinez-Hidalgo - - reviewed by: Jan Urbanski - - * common/common.mk: - Preserve PYTHONPATH and FLU_PROJECT_PATH set by ./env in - check-local-registry. Properly quote command to delay evaluation - of PYTHONPATH and FLU_PROJECT_PATH to the context set by ./env. - -2009-07-20 Thomas Vander Stichele - - * common/epydoc.mk: - Also add FLUMOTION_DIR to PYTHONPATH, so that depending projects - can build their docs. Also show the doc generation line, to make - it easier to debug. - -2009-07-20 Jan Urbanski - - * flumotion/component/misc/httpserver/localpath.py: - Make sure the .mp4 get a video/mp4 mime type. - -2009-07-20 Jan Urbanski - - * flumotion/component/misc/httpserver/httpfile.py: - Make the default do_prepareBody implementation return an empty header - string, as documented in the docstring. Returning None worked only by - accident. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/component/misc/httpserver/httpfile.py: - Ignore malformed start GET parameters when serving FLV or MP4 - files. - * flumotion/test/test_component_httpserver.py: - Unit test the new behaviour. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/component/misc/httpserver/httpfile.py: - When splitting the MP4 file fails, serve the file from the - beginning instead of returning a HTTP 500 error. - * flumotion/test/test_component_httpserver.py: - Unit test the new behaviour. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/component/misc/httpserver/httpfile.py: - Always seek in the provider with MP4 files. - Sometimes the splitting library can return an offset of 0 and - the provider still needs to seek. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/test/test_component_httpserver.py: - Test the MP4 file handling code in the HTTP server component. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/component/misc/httpserver/httpfile.py: - Add a subclass for handling MP4 files. Implement handling of - the start GET parameter, tailored after the Apache - mod_h264_streaming module. - The handling requires an external Python library mp4seek. - - * flumotion/component/misc/httpserver/httpserver.py: - Create MP4File resources for video/mp4 files. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/component/misc/httpserver/httpfile.py: - Allow do_prepareBody to return a deferred, that can fire with - a string. That string will get written to the request before - further processing. - Write the header when seeking in FLV files just before - attaching the producerConsumerProxy, not immediately after the - seek. If there's an error in later on, we could end up - returning the FLV header and a HTTP 500 response code to the - client. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/component/misc/httpserver/httpfile.py: - Augment comments and docstrings to better explain what the - code is doing. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/test/test_component_httpserver.py: - Test plain HEAD requests. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/test/test_http.py: - Set the default response code to http.OK in the FakeRequest, - that's what real twisted.web.http.Request does. - Assert we got http.OK when checking if the request got authorized. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/test/test_http.py: - Generate an id for the keycard in the fake authentication medium. - -2009-07-20 Jan Urbanski - - reviewed by: Sebastien Merle - - * flumotion/component/base/http.py: - Remove deprecated API usage. - -2009-07-20 Jan Urbanski - - * flumotion/component/consumers/disker/disker.py: - Fix usage of N_ and T_ i18n methods. N_ expects a format string, T_ - does the interpolation. - -2009-07-20 Jan Urbanski - - * flumotion/component/plugs/rrd.py: - * flumotion/component/misc/httpserver/httpfile.py: - Remove unused imports. Thanks, pychecker! - -2009-07-20 Zaheer Abbas Merali - - * flumotion/component/plugs/requestmodifier.py: - Fix set use as per previous commits. - -2009-07-20 Zaheer Abbas Merali - - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/common/fxml.py: - * flumotion/component/combiners/switch/switch.py: - Fix problems in previous commit that was due to my bad - review on Friday. - -2009-07-17 Thomas Vander Stichele - - reviewed by: Zaheer Abbas Merali - - * flumotion/common/python.py: - Add 'set' name because sets.Set was deprecated in 2.6. - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/common/fxml.py: - * flumotion/common/messages.py: - * flumotion/common/registry.py: - * flumotion/component/combiners/switch/switch.py: - Adapt. - -2009-07-17 Thomas Vander Stichele - - reviewed by: Zaheer Abbas Merali - - * flumotion/admin/admin.py: - * flumotion/common/bundle.py: - * flumotion/common/python.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/bouncers/plug.py: - * flumotion/component/bouncers/saltsha256.py: - * flumotion/component/misc/httpserver/cachedprovider.py: - * flumotion/monitor/nagios/stream.py: - * flumotion/test/test_common_bundle.py: - * flumotion/twisted/credentials.py: - Fix Python 2.6 DeprecationWarnings for sha and md5 - * common/validate-registry.py: - Add a comment with a line to uncomment when warnings are hard to - find. - -2009-07-17 Xavier Martinez-Hidalgo - - reviewed by: Zaheer Abbas Merali - - * common/pep8.py: - Do not consider comments which are one a line by itself - as blank lines and work around bug in Python < 2.6 tokenize.py. - Fixes #1306. - -2009-07-14 Jan Urbanski - - * doc/random/http-ondemand-rendering.rst: - Fix typos, add some RST formatting. - -2009-07-14 Jan Urbanski - - * doc/random/http-ondemand-rendering.rst (added): - Add documentation explaining how the http-ondemand component renders - requests. - -2009-07-14 Jan Urbanski - - * flumotion/common/errors.py: - Extend the NoProjectError exception to include additional debug - message. - - * flumotion/project/project.py: - Include an additional debug message when raising NoProjectError. - Fixes #955. - -2009-07-13 Jan Urbanski - - * flumotion/component/misc/httpserver/cachedprovider.py: - Fix debug message that prints cache size in bytes and claims it's in - megabytes. - -2009-07-08 Xavier Queralt - - reviewed by: Julien - - * flumotion/admin/admin.py: - Make the connection to fail when it's the first time we're connecting - and stop trying to reconnect. - Show an useful error message when the connection failed because the - manager is not using a secure connection (only plain TCP) - - * flumotion/admin/gtk/adminwindow.py: - Don't quit the application only because the reconnection failed and - let the model to keep trying to connect. - Set the window un/sensitive when we are dis/connected and only allow - to connect to a manager. - - * flumotion/admin/gtk/configurationassistant.py: - Be aware of the dis/connection to manager and make the assistant - un/sensitive accordingly. - - * flumotion/admin/gtk/main.py: - Show the greeter and don't fail cowardly when the connection to the - manager specified through command line doesn't succeed. - Fixes #1252, #1315 and #1163 - - -2009-07-08 Jan Urbanski - - * flumotion/component/misc/porter/porter.py: - Make the porter output two \r\n sequences when returning a Service - Unavailable response, and a short explanatory text. This mimicks more - closely what we do when returning Not Found, and not outputting an - empty line makes conforming clients not process the response code - (they assume the headers have not been sent fully yet). - -2009-07-07 Jan Urbanski - - * flumotion/extern/fdpass/fdpass.c: - Handle out of memory conditions. - Raise OSError, not a RuntimeError, when a system call fails. - - * flumotion/twisted/fdserver.py: - Handle the right exception when trying to read file descriptors. - - * flumotion/worker/base.py: - Handle the right exception when trying to send file descriptors. - - * flumotion/component/misc/porter/porter.py: - Handle the exception that can happen when sending the request file - descriptor to the component by writing a Service Unavailable response - to the client and dropping the connection. - Add a logCategory for the porter protocol. - This is a partial forward-port of [7580]. - Fixes #1167. - See #1304. - - * flumotion/test/test_porter.py: - Unit test the new behaviour. - -2009-07-01 Alvin Delagon - - reviewed by: Jan Urbanski - - * flumotion/manager/admin.py: - Raise an UnknownComponentError on a remote call to a component that - no longer exists or has already been deleted. - Fixes #1243 - -2009-07-01 Jan Urbanski - - Reviewed by: Arek - - * flumotion/common/boot.py: - Make it possible to run Flumotion processes under profiling. - Exporting the FLU_PROFILE environment variable the process - will be profiled using the statprof module, if it's found. - Exporting FLU_BUILTIN_PROFILE will use the builtin Python profiler. - The results are stored in the system's temporary directory when the - profiled process exits. - Remove support for the FLU_ATEXIT environment variable kludge that has - been added in r4060, for the sake of simplicity and cleanliness. - - * flumotion/job/main.py: - Remove support for the FLU_PROFILE variable, it's now handled in - boot.py. - -2009-07-01 Jan Urbanski - - Reviewed by: Arek - - * flumotion/component/misc/porter/porter.py: - Make the porter inject a GET parameter into the accepted request before - passing the file descriptor to the slaved component. - The parameter is called FLUREQID and its value is a 256-bit random - number in hexadecimal. - Since the parameter then shows up in the logs of components processing - the request, it can be used to track a single request across modules - and components. - - * flumotion/test/test_porter.py: - Test the new functionality. - -2009-07-01 Alvin Delagon - - reviewed by: Zaheer Abbas Merali - - * flumotion/worker/config.py: - Raise ConfigError if the port and transport is empty in the worker - configuration file. - Fixes #1214 - -2009-06-30 Julien Le Goff - - reviewed by: Arek, Sebastien - - * flumotion/component/base/http.py: - Ask the bouncer to delete its reference to a keycard when the - corresponding request was interrupted before the authentification was - finished. - Fixes #1264 - -2009-06-29 Xavier Queralt - - * flumotion/scenario/steps/httpstreamersteps.py: - Fix errback method name - * flumotion/worker/checks/check.py: - Return True when the import check succeeds - -2009-06-25 Alvin Delagon - - reviewed by: Jan Urbanski - - * flumotion/component/producers/playlist/playlist.py: - Throw a meaningful error message if gnonlin is not installed - Fixes #1313 - -2009-06-23 Xavier Queralt - - reviewed by: Jan - - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/admin/gtk/overlaystep.py: - Add help hyperlinks to online documentation on how to install new - GStreamer elements and/or new python modules. - * flumotion/admin/gtk/message.py: - Insert a space between the message and an hyperlink. - * flumotion/common/documentation.py: - Added two methods to insert an hyperlink to a documentation's section. - * flumotion/scenario/steps/httpstreamersteps.py: - Wizard's methods requireElements and requireImport already set a - proper error message. Don't do things twice! - Don't populate the plugs if the worker checks have failed. - * flumotion/worker/checks/check.py: - Add hyperlinks to online documentation on how to fix permissions - problems with the devices and how to install new GStreamer elements. - Fixes #114 - -2009-06-23 Thomas Vander Stichele - - * flumotion/extern/log/test_log.py: - Improve coverage some more by adding tests. - -2009-06-24 Alvin Delagon - - * flumotion/component/feedcomponent.py: - Reverting to NoneType return. Fixed the connectEater docstring - -2009-06-23 Alvin Delagon - - * flumotion/component/feedcomponent.py: - Return defer.succeed(None) instead - -2009-06-23 Alvin Delagon - - * flumotion/component/feedcomponent.py: - No need to do string interpolation in debug logging - -2009-06-23 Alvin Delagon - - * flumotion/component/feedcomponent.py: - Include Feed info in the debug log from the last commit - -2009-06-23 Alvin Delagon - - * flumotion/component/feedcomponent.py: - Added debug log on instances where eatFrom calls are ignored. - -2009-06-22 Xavier Queralt - - * flumotion/component/base/feedersnode.py: - Force the first node to be selected when the selection vanishes, for - example, because a row is collapsed. - Fixes #1312 - -2009-06-20 Thomas Vander Stichele - - * common/common.mk: - Use COVERAGE_MODULES for the coverage runs; warn if not defined. - * common/flumotion-trial: - This code snippet mangling sys.path is in Twisted's trial and - not in flumotion-trial. Without it, no coverage is shown for - flumotion.extern.log even though its tests got run. - -2009-06-20 Alvin Delagon - - reviewed by: Zaheer Abbas Merali - - * flumotion/component/feedcomponent.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_component_feedcomponent.py (added): - Ignore eatFrom calls if the feed is the same as the current one. Added - feedcomponent unit test. - Fixes #1277 - -2009-06-16 Jan Urbanski - - * flumotion/component/misc/httpserver/httpserver.py: - Log the exact timestamp of the request start. - -2009-06-16 Xavier Queralt - - * data/glade/connections.glade: - Instantiate the ObjectList and set its callbacks from the glade file. - * flumotion/admin/gtk/connections.py: - Truncate hosts column when handling long hostnames. Remove unnecesary gtk - code and gladify the widget. - Fixes #879 - -2009-06-15 Jan Urbanski - - reviewed by: Zaheer Abbas Merali - - * flumotion/component/base/http.py: - Add a property called "allow-default" in HTTPAuthentication to permit - clients through if the authorization attempt failed with an unexpected - error. This can be caused by the manager being down and thus being - unable to contact the bouncer, by the bouncer not being logged in, by - network connection timeouts... - A very similar property has been added in r5134 in the platform-3 - branch but has never been ported to trunk. - Fixes #1310. - - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - Allow streaming components to read from config and set the newly added - property of HTTPAuthentication. - - * flumotion/test/test_http.py: - Unit test the new property. - -2009-06-12 Julien Le Goff - - * flumotion/monitor/nagios/process.py: - Abstracted JobVSize to also track the vsize of worker + manager - processes. - -2009-06-11 Arek Korbik - - * flumotion/twisted/pb.py (PingableAvatar.stopPingChecking): - Release reference, stored in 'self', to what might be a closure - over 'self' - breaks potential un-gc-able cycles, fixes #1311. - -2009-06-11 Xavier Queralt Mateu - - * flumotion/admin/gtk/adminwindow.py(_setPlanetState): - Update the components list if it has not been updated. It can be left - un-updated if no component was present in the flow (only atmosphere - componens). - -2009-06-05 Josep Joan Ribas - - * flumotion/component/misc/httpserver/Makefile.am: - Added missing file (metadaprovider.py) - -2009-06-05 Josep Joan Ribas - - reviewed by: Arek - - * flumotion/component/misc/httpserver/httpfile.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/misc/httpserver/metadataprovider.py (added): - Added MetadataProvider Plug for ondemand http-server component. - Fixes #1302 - -2009-06-04 Jan Urbanski - - * flumotion/component/misc/porter/porter.py: - Make the porter log the whole request line, not just the identifier, - which for example does not include GET parameters. - -2009-06-04 Alvin Delagon - - reviewed by: Zaheer Abbas Merali - - * flumotion/component/producers/playlist/Makefile.am: - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/playlist/playlist.xml: - * flumotion/component/producers/playlist/admin_gtk.py (added): - * flumotion/component/producers/playlist/playlist.glade (added): - Added admin UI for playlist-producer - -2009-06-04 Zaheer Abbas Merali - - previous commit post-reviewed by: Jan Urbanski - - * flumotion/monitor/nagios/stream.py: - Fix regexp to not require quick hack, courtesy perl-high Jan. - Also remove log import, as it is not used by file. - -2009-06-04 Zaheer Abbas Merali - - * flumotion/monitor/nagios/stream.py: - Quick hack added to not pick up trailing " for url from asx - playlists. - -2009-06-03 Xavier Queralt Mateu - - reviewed by: Julien - - * flumotion/scenario/steps/httpstreamersteps.py: - Change the default port to 8800 (the defined on configuration) and - don't let the streamer to override the porter's port when it has not - been set. - -2009-06-03 Jan Urbanski - - patch by: Thomas Vander Stichele - reviewed by: Jan - - * flumotion/twisted/fdserver.py: - Improve logging of FD receiving. - - * flumotion/component/misc/porter/porter.py: - Add and improve logging of handling and passing the connection. - - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpfile.py: - Add logging of request handling stages. - - * flumotion/test/test_porter.py: - Make the FakeAvatar in the porter test have an avatarId, sice it's - logged during the test run. - -2009-06-02 Xavier Queralt Mateu - - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - * flumotion/component/misc/httpserver/httpserver.py: - Return a ComponentSetupHandledException when the setup fails if the - exception has already been handled, preventing the component of having - two messages for the same problem. - Really Fixes #951. At r7922 the same issue for the porter was fixed, - not for the streamer. - -2009-06-02 Arek Korbik - - reviewed by: Jan - - * flumotion/common/package.py: - Patch ihooks's ModuleImporter class for increased python2.6 - compatibility. Fixes #1263. - -2009-05-28 Xavier Martinez-Hidalgo - - * doc/random/developer-introduction.rst: - Add back Subversion commit instructions as an alternate workflow. - -2009-05-28 Xavier Martinez-Hidalgo - - * doc/random/developer-introduction.rst: - Link to moap project and reference 'moap cl diff' and 'moap cl ci' - commands. - -2009-05-27 Xavier Queralt Mateu - - reviewed by: xmartinez - - * flumotion/component/misc/porter/porter.py: - Return a ComponentSetupHandledException when the setup fails so the - exception is not converted in a new message. - Fixes #951 - -2009-05-27 Xavier Queralt Mateu - - * flumotion/test/test_parts.py: - Added the worker name to the components created in the tests. - Added a test for the checking the components cannot be started when - their worker has not logged in. - -2009-05-27 Xavier Queralt Mateu - - reviewed by: xmartinez - - * flumotion/admin/gtk/componentlist.py: - Disable starting a component when its worker is not present - Fixes #564 - -2009-05-27 Jan Urbanski - - * flumotion/admin/command/component.py: - Fix flumotion-command even more, cleaning up after r7224. - The mood subcommand was looking for the component id in the wrong - place. - -2009-05-27 Josep Joan Ribas - - reviewed by: Arek - - * doc/redhat/flumotion: - Fixed clean function to accept arguments. - -2009-05-26 Josep Joan Ribas - - reviewed by: Arek - - * flumotion/service/service.py (Servicer.clean): - Catch exception thrown when deleting non-existing pid files. - -2009-05-26 Jan Urbanski - - * flumotion/admin/gtk/adminwindow.py: - Don't interpolate the message id in the debug string, because if the - message id is a tuple, it will cause an error. Let the logging - mechanism handle that - -2009-05-22 Thomas Vander Stichele - - * flumotion/monitor/nagios/stream.py: - Clean up import statements. - -2009-05-22 Thomas Vander Stichele - - * flumotion/monitor/nagios/stream.py: - Use tempfile to choose a temporary file instead of the handrolled - uniquifying process that was broken to begin with. - Do not use a potentially non-existing or non-writable directory - for saving dumps. - Privatize private variables. - -2009-05-22 Thomas Vander Stichele - - * flumotion/monitor/nagios/stream.py: - Clean up based on pychecker's findings. - This fixes an actual bug in the temporary file creation, - and removes chunks of either half-implemented code or - changed-but-not-cleaned-up code. - -2009-05-22 Thomas Vander Stichele - - * doc/random/styleguide: - Add a note on pychecker use. - -2009-05-22 Thomas Vander Stichele - - * flumotion/worker/checks/gst010.py: - Remove unused import. - -2009-05-22 Thomas Vander Stichele - - * flumotion/monitor/nagios/stream.py: - Fix obviously unneeded search-and-replace of quotes introduced - in [7822]. - -2009-05-22 Thomas Vander Stichele - - * doc/random/styleguide: - Make Public vs Private explicit, since the API section clearly - mentions public and private but fails to explain what it means. - -2009-05-21 Josep Joan Ribas - - reviewed by: Zaheer - - * flumotion/component/feedcomponent010.py: - Added a force flag to the try_start_pipepline to force setting - pipeline to PLAYING. - - * flumotion/component/producers/icecast/icecast.py: - Implemented a reconnect mechanism for the icecast producer - component. Fixes #1298 - - * flumotion/twisted/defer.py: - Reset delay value when starting a RetryingDeferred. - -2009-05-21 Thomas Vander Stichele - - * flumotion/scenario/live/live.xml: - * flumotion/scenario/ondemand/ondemand.xml: - The descriptions are used in the scenario selection step, so the - verbs should be imperative. - -2009-05-21 Xavier Queralt Mateu - - reviewed by: arek - - * flumotion/admin/gtk/adminwindow.py (_appendComponent): - Fix a typo that caused the trayicon not being updated with the correct - mood when adding the components incrementally. - -2009-05-21 Zaheer Abbas Merali - - * flumotion/monitor/nagios/stream.py: - Fix stream check for streams which don't require a demuxer - like mp3. - -2009-05-21 Arek Korbik - - patch by: Philippe Normand - - * flumotion/extern/log/log.py (outputToFiles): Catch importing - signal for improved win32 experience. Fixes #1295. - -2009-05-20 Zaheer Abbas Merali - - * flumotion/component/producers/playlist/playlist.py: - Fix import of gstreamer modules, fixed previous commit. - -2009-05-20 Zaheer Abbas Merali - - * flumotion/component/producers/playlist/playlist.py: - Use gst not gstreamer for import. - -2009-05-19 Xavier Queralt Mateu - - reviewed by: jurbanski - - * data/glade/sectionwizard.glade: - Avoid resize the wizard window if not needed setting the default size. - * flumotion/component/producers/soundcard/wizard.glade: - Reorganize the widgets without a table. A VBox and some HBoxes give - more control on positioning and sizing options. - * flumotion/component/producers/soundcard/wizard_gtk.py: - The devices are fetched automatically using a worker check. The same - is done for the parameters associated to the devices (tracks, - number of channels, sample rate and the bit depth). - The devices are listed by their name and the code has been cleaned - and restructured. - * flumotion/worker/checks/audio.py: - Added a check that returns the available sound devices in the - system according to the provided source factory. - Modified the checkMixerTracks method to return the device - capabilities too. - Fixes #197, #804 and #952 - -2009-05-19 Xavier Queralt Mateu - - * flumotion/component/encoders/vorbis/vorbis010.py: - Import forgotten gstreamer module for the check in r7887 to work. - -2009-05-19 Xavier Queralt Mateu - - * flumotion/component/producers/audiotest/admin_gtk.py: - * flumotion/component/producers/audiotest/audiotest.glade: - Initialize the combo while loading the widgets not inside the glade - file. Fixes #2261(pt) - -2009-05-19 Zaheer Abbas Merali - - * flumotion/component/encoders/vorbis/vorbis010.py: - Prefer legacyresample over audioresample where available. - -2009-05-18 Josep Joan Ribas - - reviewed by: Arek - - * flumotion/component/misc/httpserver/httpfile.py: - Fixes #1280. Http-server not checking if a byte range request has an end - range bigger than the filesize. - -2009-05-18 Zaheer Abbas Merali - - * flumotion/component/producers/playlist/playlist.py: - Prefer legacyresample over audioresample where available. - -2009-05-18 Arek Korbik - - reviewed by: Zaheer - - * flumotion/component/misc/httpserver/httpserver.py - (HTTPFileStreamer._timeoutRequests): - Cleanup the _timeoutRequestsCallLater on entry. See #1281. - -2009-05-18 Jan Urbanski - - * flumotion/component/base/http.py: - Log the return code when handling unauthorized connections. It doesn't - always have to be 401, sometimes it can be 500 if the bouncer had an - error. - -2009-05-13 Xavier Queralt Mateu - - reviewed by: Julien Le Goff - - * flumotion/admin/gtk/componentlist.py: - Added two methods to append and remove components incrementally to and - from the componentlist used by the admin window. - - * flumotion/admin/gtk/adminwindow.py: - Changed the algorithm used for updating the componentlist. Before it - was extremelly inefficient because the list was cleaned and - repopulated each time a component was added or removed. Now it appends - or removes the components one by one when it is needed using the new - methods of ComponentList. Fixes #1276 - This also fixes a race condition given when some components were - selected from the admin and one of them was deleted. The - selection-changed event and the component-deleted listener method were - triggered at the same time both cleaning and rebuilding the list. - Another issue fixed on this commit is the deselection of a component - of the list when a new one is loaded. This shouldn't happen anymore - because the situation is controlled when the component is loaded. - Fixes #1159 - -2009-05-08 Zaheer Abbas Merali - - * flumotion/monitor/nagios/stream.py: - Fix mimetype detection to not randomly look for src pads - with template name "audio" or "video", instead to find the - demuxer and look at its src pads and their caps. - Also make fractions output as x/y not x:y. - -2009-05-08 Zaheer Abbas Merali - - reviewed by: Arek - - * flumotion/admin/gtk/overlaystep.py: - * flumotion/component/converters/overlay/genimg.py: - * flumotion/component/converters/overlay/overlay.py: - Make overlay use appsrc or a python src element if appsrc is - not available. - Fixes #1275 - -2009-04-30 Jan Urbanski - - * flumotion/component/feedcomponent010.py: - Drop all newsegment events except the first one in the gdp - depayloader. Some components have problems when they see a second - newsegment event coming in and Flumotion does not deal with newsegments - in any special way anyway. - Fixes #1278. - See also #1277. - -2009-04-30 Thomas Vander Stichele - - * flumotion/common/config.py: - Show a list of allowed sockets when the socket type is - unsupported. - -2009-04-29 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Allow some feeders to be in pipeline, outputting a warning - log message if it happens. - Needed for single stream playlist producer to continue - functioning. - * flumotion/component/producers/playlist/playlistparser.py: - Set discoveredDuration to be correct when there is no - video or no audio in media file. - -2009-04-28 Zaheer Abbas Merali - - * flumotion/component/producers/playlist/playlist.py: - Subtract basetime from timestamp when adjusting gnlsources. - -2009-04-23 Pedro Gracia - - * flumotion/monitor/nagios/stream.py: - Fixed a dependency of python2.5 checking ips. - Fallback to get always video and audio mime types. - -2009-04-21 Jan Urbanski - - * configure.ac: - Back to dev. - -=== release 0.5.4 === - -2009-04-21 Jan Urbanski - - * NEWS: - * RELEASE: - * configure.ac: - * flumotion.doap: - Releasing 0.5.4 "EAT". - -2009-04-21 Jan Urbanski - - * flumotion/admin/gtk/dialogs.py: - Update the list of authors. - -2009-04-21 Jan Urbanski - - * flumotion/component/converters/overlay/overlay.py: - Change the warning text, gst-plugins-good are still buggy. - - * flumotion/component/producers/looper/looper.py: - Remove warnings about segfault-causing version of gst-python for - versions that no longer have the buggy behaviour. - -2009-04-21 Xavier Queralt Mateu - - * flumotion/worker/checks/gst010.py: - Force using the video pad of dvdemux when cheking firewire - capabilities in the worker check. - Fixes #1274 - -2009-04-20 Zaheer Abbas Merali - - * flumotion/test/test_component_playlist.py: - Fix tests. - -2009-04-20 Zaheer Abbas Merali - - * flumotion/component/producers/playlist/playlist.py: - Remove unused imports. - Set filtercaps on gnlsource. - Move identity sync=true before identity single-segment=true. - Hack to expose feeder template. - * flumotion/component/producers/playlist/playlistparser.py: - position used is in terms of clock time, not in terms of - running time - * flumotion/component/producers/playlist/singledecodebin.py: - Update to later version. - -2009-04-16 Sebastien Merle - - * flumotion/component/bouncers/bouncer.py: - Rename on_validation to on_validate for real. - -2009-04-16 Sebastien Merle - - * flumotion/component/bouncers/bouncer.py: - Removed a debug print, rename on_validation to on_validate - and added a comment on returning keycard with state REFUSED - when using authetication session. - * flumotion/test/test_component_bouncers_bouncer_authsession.py: - Use failIf and failUnless insteed of assertFalse and assertTrue. - -2009-04-16 Sebastien Merle - - reviewed by: Arek, Zaheer - - * flumotion/component/bouncers/bouncer.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_component_bouncers_bouncer_authsession.py: - * flumotion/test/test_component_bouncers_bouncer_authsession.py - (added): - Added a helper bouncer for authentication sessions - like challenge/response. It provide a way to store and retrieve - data related to the session, and validate/cancel sessions. - -2009-04-16 Zaheer Abbas Merali - - * flumotion/admin/command/main.py: - Make sure use_ssl gets passed to correct parameter! This fixes - connection to non ssl managers with flumotion-command. - -2009-04-16 Pedro Gracia - - reviewed by: Jan Urbanski - - * flumotion/monitor/nagios/main.py: - * flumotion/monitor/nagios/stream.py: - Store dumps if nagios check fails testing and check bouncer status too. - -2009-04-15 Xavier Martinez-Hidalgo - - * flumotion/test/test_import.py: - Import flumotion.admin.rrdmon only if rrdtool is installed. - -2009-04-15 Xavier Martinez-Hidalgo - - * flumotion/test/Makefile.am: - * flumotion/test/test_import.py: - Add a test case that imports all flumotion modules. - -2009-04-08 Xavier Queralt Mateu - - * flumotion/admin/command/main.py: - flumotion-command's transport parameter should expect an string - parameter but it was treated as a flag in the option parser. - -2009-04-07 Jan Urbanski - - * flumotion/common/eventcalendar.py: - * flumotion/test/test_common_eventcalendar.py: - The RECURRENCE-ID in iCal files is returned as a vDDDTypes object, not - a string. Fixes #1269, parsing RECURRENCE-IDs with TZID. - -2009-04-07 Jan Urbanski - - * flumotion/common/eventcalendar.py: - * flumotion/test/test_common_eventcalendar.py: - Don't raise NotImplementedErrors for implemented features. Fixes #1268. - -2009-04-07 Jan Urbanski - - * flumotion/common/eventcalendar.py: - Add workaround for an apparent Google Calendar bug. - -2009-04-01 Xavier Queralt Mateu - - * flumotion/scenario/steps/productionsteps.py: - Hide the corresponent combo and check boxes if no audio or video - producer exist on the flow when adding a new format from the admin - window. - -2009-03-26 Arek Korbik - - * tools/genpls.py: - Add a simple playlist generator. - -2009-03-25 Jan Urbanski - - * flumotion/admin/command/component.py: - Further fix flumotion-command, after the fallout in r7224. - See also r7691. - -2009-03-25 Xavier Queralt Mateu - - * flumotion/admin/gtk/configurationassistant.py: - Show the translations for the descriptions at scenario step. - -2009-03-24 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Fix discont log message. - -2009-03-24 Sebastien Merle - - * flumotion/component/consumers/disker/disker.py: - Fixed a NameError in an exception handler. - -2009-03-24 Arek Korbik - - * flumotion/component/producers/playlist/Makefile.am: - * flumotion/component/producers/playlist/playlist.dtd: - Add a DTD somewhat describing the playlist format. - -2009-03-23 Arek Korbik - - * flumotion/component/bouncers/icalbouncer.py: - * flumotion/component/bouncers/tokentest.py: - Make keycardClasses attribute to adhere to the spec. - -2009-03-23 Jan Urbanski - - reviewed by: arkadini - - * flumotion/component/misc/httpserver/httpfile.py: - Guard against writing pending data to consumers if they already want - away. Fixes #1257, a really tricky corner case. - -2009-03-20 Jan Urbanski - - reviewed by: arkadini - - * flumotion/component/misc/httpserver/cachedprovider.py: - Handle files disappearing from the cache directory while we're - estimating cache usage. Fixes #1255. - -2009-03-20 Jan Urbanski - - reviewed by: arkadini - - * flumotion/component/misc/httpserver/ratecontrol.py: - Prevent proxying pauseProducing calls to producers that have already - disconnected. Fixes #1256. - -2009-03-18 Arek Korbik - - * flumotion/test/common.py: Now stone age compatible, too! - -2009-03-18 Arek Korbik - - * flumotion/test/test_pb.py (TestTwisted_PortalAuthChallenger): - _PortalAuthChallenger's __init__() signature changed in Twisted - 8.0 - mark those tests as 'skip' for now. - - * flumotion/test/test_icalbouncer.py: Fix for the compatibility - breakage in dateutil 1.4; clean-up after ourselves, too. - - * flumotion/test/common.py: - * flumotion/test/Makefile.am: - New module for small utilities like haveTwisted(). - -2009-03-18 Xavier Queralt Mateu - - reviewed by: jlegoff - - * flumotion/scenario/steps/conversionsteps.py: - Controll whether a muxer can or cannot be shown on the wizard - depending on the configured media types (audio/video) and the ones it - accepts. - Helps #2074(pt) - -2009-03-10 Xavier Queralt Mateu - - * data/cortado-template.html: - * flumotion/component/plugs/cortado/cortado.py: - * flumotion/component/plugs/cortado/cortado.xml: - * flumotion/component/plugs/cortado/wizard_gtk.py: - Framerate is no longer used on cortado, setting it to optional for - compatibility reasons but not using it anymore. - * flumotion/component/producers/webcam/wizard_gtk.py: - Convert the framerate to a float instead of using a string. - Fixes #970 - -2009-03-10 Xavier Queralt Mateu - - reviewed by: murrayc - - * data/glade/welcome-wizard.glade: - Add a notice for the user about the safety of using the default - options set on the wizard. - Fixes #1100 - -2009-03-05 Xavier Queralt Mateu - - * flumotion/test/test_wizard_save.py: - Fix the tests for the last commit's changes. - -2009-03-05 Xavier Queralt Mateu - - * flumotion/component/producers/firewire/wizard.glade: - * flumotion/component/producers/firewire/wizard_gtk.py: - Change the default options of the the firewire wizard page to get - better results when the source's width has to be corrected. - Fixes #1135 - -2009-03-05 Xavier Queralt Mateu - - * flumotion/component/encoders/smoke/wizard.glade: - * flumotion/component/encoders/smoke/wizard_gtk.py: - Present the keyframe spacing in seconds on the wizard. Transform it to - number of frames taking into account the producer's framerate. - Fixes #829 - -2009-03-05 Xavier Queralt Mateu - - * flumotion/admin/gtk/adminwindow.py (_disconnectActionProxy): - Fix the UIManager's disconnect from proxy callbac. It was expecting - the callback ids as a pair (name, id) but we only had the ids. - -2009-02-25 Xavier Queralt Mateu - - reviewed by: jlegoff - - * flumotion/admin/assistant/save.py: - Don't set the name of the producers if it is already set before. - This prevents adding new encoders feeding from an unexistent producer - from the add-new-format wizard when the producer is a firewire camera - or the producers names are not the default ones. - * flumotion/admin/gtk/adminwindow.py: - The add-new-format wizard knows the names of the existing producers so - they are used instead of the proposed by the saver. It was a problem - before when we wanted to use an audio-video producer as a audio/video - only producer. - * flumotion/component/producers/firewire/wizard_gtk.py: - Set the default framerate to 12.5. - * flumotion/scenario/steps/productionsteps.py: - SelectProducersStep extends now LiveProductionStep. Most of all - duplicate code between the two classes has now disappeared. - * flumotion/test/test_wizard_save.py: - Fixed the tests to fit the changes to the save module. - Fixes #1253 - -2009-02-20 Xavier Queralt Mateu - - * flumotion/scenario/steps/conversionsteps.py: - Ѕet the audio/video encoders to None when the producers are not - present. When going back from an encoding step to remove a producer. - The encoders would remain internally there (but not in the UI nor in - the configuration). - -2009-02-19 Xavier Queralt Mateu - - * flumotion/scenario/steps/productionsteps.py: - Reverted the changes on last commit as they were probably a bad idea. - The firewire production step was not appearing after the commit. - This doesn't affect the bug fix. - -2009-02-18 Xavier Queralt Mateu - - reviewed by: jlegoff - - * flumotion/admin/gtk/configurationassistant.py: - Show an informative message when we are checking the existence of - GStreamer elements on the workers. Fixes #898 - * flumotion/scenario/steps/conversionsteps.py: - Remove the unncessary code that interfers with the message we show - when checking the GStreamer elements. The worker was changed twice for - the encoding steps thus, the messages were cleaned before the user - could see them. - * flumotion/scenario/steps/productionsteps.py: - Clean those two pages as they were using extra code that is not - needed anymore. - -2009-02-18 Xavier Queralt Mateu - - * flumotion/component/producers/firewire/firewire.py: - Fix an error when checking if the current-device-change property is - present on the received message's structure. Before the line crashed - without reporting anything to the user neither the (dis)connection - messages. - -2009-02-16 Xavier Queralt Mateu - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - Disable the link button when we have not received the mime type. - Fixes #1245 - -2009-02-12 Jan Urbanski - - * flumotion/component/combiners/switch/switch.py: - Get the UID of the event from the Event itself, not from the - EventInstance that the code gives you. Also, add a logCategory for the - switch ICal plug. - -2009-02-11 Xavier Queralt Mateu - - * common/rpm.mk: - Force deletion of rpm with -f otherwise the build fails. - Use the PACKAGE variable for the name of the spec file this - way other packages can use the same code for building rpm. - -2009-02-11 Xavier Queralt Mateu - - reviewed by: jlegoff - - * flumotion/worker/checks/check.py: - Add a method to check whether a file exists. Used as a worker check. - Helps #2075 (pt) - -2009-02-10 Xavier Queralt Mateu - - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/greeter.py: - Handle ConnectionRefusedError when trying to log in to the manager. - Fixes #1138 - -2009-02-10 Xavier Queralt Mateu - - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/main.py: - Moved the exceptionHandler to dialogs.py so it can be used from other - parts of the project. - * flumotion/ui/wizard.py: - Catch all the exceptions thrown while loading the steps and show the - exception dialog. - Fixes #2792 (pt) - - -2009-02-05 Jan Urbanski - - * flumotion/component/plugs/rrd.py: - Log the RRD updates with %r, not with %s. Fix format string with - missing parameters. - -2009-02-04 Julien Le Goff - - * flumotion/component/misc/httpserver/cachedprovider.py: - Flush the temporary cached file after calling the File.write method in - order to avoid race problems (since that same file is read in a - concurrent thread). - Fixes #1244 - -2009-02-04 Jan Urbanski - - * flumotion/component/plugs/rrd.py: - Make updating the RRD file more robust and make it work with long - values (as opposed to just working with ints). Fixes #1230. - -2009-02-04 Xavier Queralt Mateu - - * flumotion/common/bundleclient.py: - Revert r7753 and add a FIXME comment to remember that we cannot be - completelly sure the bundle has the correct content only by checking - that the directory exists. - -2009-02-03 Xavier Queralt Mateu - - * flumotion/scenario/Makefile.am: - * flumotion/scenario/live/live.xml: - * flumotion/scenario/ondemand/ondemand.xml: - * flumotion/scenario/steps/steps.xml: - * flumotion/scenario/scenario.xml (added): - Bundle the flumotion/scenario/__init__.py file. Otherwise the modules - under that module were load from the local installation and not from - the bundles. - -2009-02-03 Xavier Queralt Mateu - - * flumotion/common/bundleclient.py: - Don't fetch a bundle when it is already up-to-date!! - -2009-01-30 Zaheer Abbas Merali - - * flumotion/component/misc/httpserver/httpfile.py: - Ugly hack: do not send Accept-Ranges header if filename - ends in .pdf. - -2009-01-29 Jan Urbanski - - * doc/redhat/flumotion: - Change the 'status' service command to print useful output to stdout - and possible errors to the logfile, instead of printing everything to - stdout. - -2009-01-29 Xavier Queralt Mateu - - reviewed by: Julien Le Goff - - * data/glade/Makefile.am: - * data/glade/http-wizard.glade (deleted): - * data/glade/httpstreamer-wizard.glade: - The HTTPCommon step has been merged with the HTTPStreamer one. - Now the specific details of the streamer will be shown on the first - step and hidden for the following ones unless the worker is changed - or the user requests it. - Fixes #1232 - * flumotion/admin/assistant/save.py: - Updated the method for fetching the trailing digits using regexp - instead of a loop. Thanks Julien. - * flumotion/test/test_wizard_save.py: - Fixed the tests of the HTTPStreamer step according to the changes made. - * flumotion/admin/gtk/adminwindow.py: - Now the adminwindow can manage multiple porters (actually only one was - used was used). - It also tells to the wizard the used mount points when a new format - is going to be added so we can prevent reusing them. - * flumotion/admin/gtk/configurationassistant.py: - It has also been modified to support multiple porters and to track them - Checks the used mountpoints from the adminwindow or the - HTTPSstreamer steps to prevent duplicates. - * flumotion/scenario/live/wizard_gtk.py: - The way the flow is saved has been updated and it can manage the - multiple porters we can have now. - * flumotion/scenario/steps/consumptionsteps.py: - The HTTPConsumptionStep has been deleted as we don't need it anymore. - All of its functionality has been added to the HTTPStreamerStep. - Some simplifications have been done to the ConsumptionStep. - * flumotion/scenario/steps/httpstreamersteps.py: - HTTPStreamerStep runs now a check when the mountpoint/port/worker has - been changed. It warns the user when the mountpoint has already been - used on the required host:port. - The step initializes the next one with its data when Forward is - pressed. - Fixes #2873 (pt) - Fixes #2871 (pt) - Fixes #1231 - Fixes #995 - -2009-01-29 Arek Korbik - - patch by: Aitor - - * flumotion/component/producers/playlist/playlist.py: - Add forgotten (in r6983) keyword parameter change. - -2009-01-29 Arek Korbik - - * flumotion/admin/command/common.py: - Make it possible to use None in 'invoke'. - -2009-01-29 Xavier Queralt Mateu - - * scripts/run-local-manager: - Rename the variable CONF to FLOW as they are the same - -2009-01-29 Xavier Queralt Mateu - - * flumotion/ui/linkwidget.py: - The link widget cannot have the focus now. - * scripts/run-local-manager: - Allow setting the flow file that the manager will use with -c option. - -2009-01-28 Xavier Queralt Mateu - - * scripts/run-local-manager: - Added the option -h to the script so the hostname where the manager - and worker are going to run can be specified. - -2009-01-27 Thomas Vander Stichele - - * flumotion/component/effects/volume/volume.glade: - Explain the volume change option better. Fixes #1210. - -2009-01-26 Xavier Queralt Mateu - - reviewed by: Arek - - * flumotion/manager/component.py: - * flumotion/twisted/flavors.py: - Add FIXMEs in places where an ordered dict is needed. - * flumotion/ui/wizard.py: - Fixed the strange behaviour of the sidebar that never deletes the - buttons and ends with a large list of ununsable buttons. - Fixes #1126 - -2009-01-26 Xavier Queralt Mateu - - * flumotion/common/fraction.py: - Calculating the module in one line. - -2009-01-22 Xavier Queralt Mateu - - reviewed by: Arek - - * flumotion/admin/assistant/models.py: - * flumotion/common/fraction.py: - Fixed the fraction convertion from a float. - The gcd is calculated now so no precission is lost. - Fixes #910 - -2009-01-22 Xavier Queralt Mateu - - reviewed by: Arek - - * flumotion/common/vfsgnome.py: - Removed an unnecesary call to os.path.abspath. - * flumotion/component/plugs/base.py: - Deleted the changes made to the plugs code on r7696. - * flumotion/scenario/steps/ondemandstep.py: - Added a model for the logger plug and using it. - * flumotion/component/consumers/disker/disker.py: - Marking the string to translate correctly. - -2009-01-21 Xavier Queralt Mateu - - * flumotion/admin/gtk/adminwindow.py: - Do not run the Assistant when the cleaning operation has not succeed. - Fixes #1073 - -2009-01-20 Xavier Queralt Mateu - - * flumotion/admin/gtk/adminwindow.py: - The "Add new format" action shouldn't be set sensitive until the wizard - has finished, otherwise it can remain that way even if the wizard - doesn't configure a flow successly. - -2009-01-20 Xavier Queralt Mateu - - * flumotion/scenario/live/Makefile.am: - * flumotion/scenario/ondemand/Makefile.am: - * flumotion/scenario/steps/Makefile.am: - Added scenarios registry files to the Makefiles so - they are added to the packages. - -2009-01-19 Xavier Queralt Mateu - - * flumotion/component/consumers/disker/disker.py: - Fixed the arguments passed to a N_ method call. - -2009-01-19 Xavier Queralt Mateu - - * flumotion/admin/gtk/componentlist.py: - Fixed the behaviour of the component list when selecting a component. - If the component is already selected the UI is not updated anymore. - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - Don't create the Link button until the URI has been received. - Fixes #1236 - -2009-01-19 Xavier Queralt Mateu - - * flumotion/admin/gtk/greeter.py: - Hide 'Start new manager and connect to it' option on windows. - Fixes #1179 - -2009-01-19 Xavier Queralt Mateu - - * flumotion/common/managerspawner.py: - Do not translate worker and manager when they are part from a command. - -2009-01-14 Xavier Queralt Mateu - - reviewed by: Julien Le Goff - - * flumotion/admin/assistant/models.py: - Encoders, producers and muxers without a feeder are accepted. - Fixes #1142 - -2009-01-14 Xavier Queralt Mateu - - reviewed by: Julien Le Goff - - * flumotion/admin/gtk/adminwindow.py: - Added a way for the component list to know when a - worker is connected or disconnected. - * flumotion/admin/gtk/componentlist.py: - Code concerning the tooltips rewritten. - When a worker is offline its name would appear in italics and the - tooltip of the component would explain that. - Fixes #1036 - Fixes #1026 - -2009-01-13 Xavier Queralt Mateu - - * flumotion/scenario/steps/httpstreamersteps.py: - * flumotion/test/test_wizard_save.py: - Fixed the tests for the last changes done. - -2009-01-13 Xavier Queralt Mateu - - * flumotion/scenario/steps/httpstreamersteps.py: - Set the port from the porter and don't use the default one. - Fixes #1209 - -2009-01-12 Xavier Queralt Mateu - - * data/glade/consumption-wizard.glade: - * flumotion/scenario/steps/consumptionsteps.py: - Added the callbacks for the disk consumer checkboxes so the forward - button is enabled/disabled properly. - Fixes #1125 - -2009-01-12 Xavier Queralt Mateu - - reviewed by: Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py: - Added a remote method to allow schedulling recordings with an ical - file from the admin window. - Fixes #1178 - -2009-01-12 Xavier Queralt Mateu - - reviewed by: Zaheer Abbas Merali - - * data/glade/ondemand-wizard.glade: - * flumotion/common/vfsgio.py: - * flumotion/common/vfsgnome.py: - * flumotion/component/plugs/base.py: - * flumotion/scenario/steps/ondemandstep.py: - * flumotion/ui/fileselector.py: - Added an optional apache logger to the on demand wizard page. - Fixes #947 - -2009-01-07 Xavier Queralt Mateu - - reviewed by: Xavier Queralt Mateu - patch by: Jordi Massaguer i Pla - - * flumotion/component/producers/firewire/wizard_gtk.py: - Deleted unused code when obtaining firewire audio production step. - Fixes #949 - -2009-01-07 Xavier Queralt Mateu - - reviewed by: Xavier Queralt Mateu - patch by: Pedro Gracia - - * flumotion/component/encoders/smoke/smoke.py: - Warn the user about the bug #565441 of Gstreamer smoke encoder. - * flumotion/component/encoders/smoke/wizard_gtk.py: - The smoke wizard page now uses the settings set by the user. - Fixes #891 - -2009-01-05 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/resources.py: - Add a link to the ticket that discusses stealing the fd from - the Twisted reactor. - -2008-12-30 Zaheer Abbas Merali - - * flumotion/admin/command/component.py: - Of course, noone actually tests flumotion-command to see if the - commands work. - Fix property subcommand of component. - -2008-12-16 Sebastien Merle - - * flumotion/component/misc/httpserver/cachedprovider.py: - Properly stop the copying thread when the component is stopped, - the component do not stay waking forever anymore. - -2008-12-15 Xavier Queralt Mateu - - * flumotion/common/vfsgnome.py: - Fixed a minor error on vfsgnome. - -2008-12-15 Xavier Queralt Mateu - - * flumotion/common/bugreporter.py: - Fixed a typo, the bug reporter was serializing a tuple instead of a - str for the component name. - Fixes #1170 - -2008-12-02 Xavier Queralt Mateu - - * flumotion/component/producers/soundcard/soundcard.py: - Fixed a return statement that returned nothing. - It now returns the volume. - Fixes #1208 - -2008-12-02 Xavier Queralt Mateu - - reviewed by: Zaheer Abbas Merali - - * flumotion/common/vfs.py: - * flumotion/common/vfsgio.py: - * flumotion/common/vfsgnome.py: - The files are fetched on the worker side now, so we view the remote - files on the FileSelector. - Fixes #1187 - -2008-12-02 Xavier Queralt Mateu - - * flumotion/component/producers/soundcard/wizard_gtk.py: - Block the Forward button when the check fails. - Fixes #1207 - -2008-12-01 Xavier Queralt Mateu - - reviewed by: Zaheer Abbas Merali - - * flumotion/component/producers/firewire/wizard.glade: - * flumotion/component/producers/firewire/wizard_gtk.py: - Added a combo that lists the available firewire cameras on the worker, - thus the user can choose one of them by its name. - * flumotion/worker/checks/gst010.py: - Modified to reflect the listing and selection of a camera by its guid. - Reformulation of some error messages when the device is not there - and/or it cannot be loaded. - Fixes #1183 - Fixes #1063 - -2008-11-28 Thomas Vander Stichele - - * data/upgrade-to-0.5.3.xsl: - Fix selection of nodes to fix for rate->samplerate to only apply - for audiotest-producer and soundcard-producer. - -2008-11-27 Xavier Queralt Mateu - - * flumotion/common/common.py: - Added year 2008 to the flumotion copyright message (--version) - -2008-11-26 Sebastien Merle - - * flumotion/component/misc/httpserver/httpfile.py: - Fixed a bug in http-server when no request modifier are specified. - -2008-11-26 Sebastien Merle - - * flumotion/component/consumers/httpstreamer/resources.py: - Fixed a bug when no plug are specified. - -2008-11-26 Sebastien Merle - - * flumotion/component/plugs/requestmodifier.py: - * flumotion/component/plugs/requestmodifier.py (added): - Added the new plug module forgoten in the last commit. - -2008-11-26 Sebastien Merle - - reviewed by: Arek,Zaheer - - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/misc/httpserver/httpfile.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/plugs/plugs.xml: - Added a new plug type for request modification - in http-server and http-streamer. - Added a plug to force browsers to ask the user to download - a file instead of playing it automatically. - -2008-11-26 Arek Korbik - - * flumotion/manager/config.py (buildEatersDict): - Don't warn about uniquifying alias names, it's only of debugging - interest. Fixes #1176. - -2008-11-26 Arek Korbik - - * conf/examples/default.xml: - * conf/examples/discont.xml: - * conf/examples/twores.xml: - Fix the wrong interpretation, introduced by r7619. - Eater names are defined by the component, and multiple eater tags - in a config file should only be used with multiple eaters. - See #1176. - -2008-11-26 Xavier Queralt Mateu - - reviewed by: Zaheer Abbas Merali - - * flumotion/scenario/steps/diskersteps.py: - Now the checkboxes and radiobuttons on the disker wizard step are used - properly when configuring the flow. - Fixes #1128 - -2008-11-26 Xavier Queralt Mateu - - * flumotion/test/test_wizard_save.py: - Fixed wizard tests - -2008-11-25 Arek Korbik - - * configure.ac: - Back to dev. - -=== release 0.5.3 === - -2008-11-25 Arek Korbik - - * NEWS: - * RELEASE: - * configure.ac: - * flumotion.doap: - Releasing 0.5.3 "Ovella Negra". - -2008-11-25 Arek Korbik - - * flumotion/admin/gtk/dialogs.py: - Update the list of authors. - -2008-11-25 Arek Korbik - - * flumotion/common/vfsgnome.py (GnomeVFSDirectory.getFiles): - * flumotion/common/vfsgio.py (GIODirectory.getFiles): - Lower log levels - that info is not that important. - -2008-11-24 Pedro Gracia - - * po/es.po: - Spanish translation updated. - -2008-11-24 Pedro Gracia - - * flumotion/monitor/nagios/stream.py: - genToken isn't necesary. - -2008-11-23 Thomas Vander Stichele - - * flumotion.spec.in: - Change summary/description as requested by Fedora. - -2008-11-20 Arek Korbik - - * flumotion/component/producers/looper/looper.py: - Add warnings about segfault-causing version of gst-python. - -2008-11-20 Arek Korbik - - * flumotion/component/converters/overlay/overlay.py - (Overlay.configure_pipeline): - Add a warning about broken gstreamer versions. - -2008-11-20 Thomas Vander Stichele - - * conf/examples/bouncer.xml: - * conf/examples/default.xml: - * conf/examples/discont.xml: - * conf/examples/ipbouncer.xml: - * conf/examples/twores.xml: - * data/upgrade-to-0.5.3.xsl: - * flumotion/component/producers/audiotest/admin_gtk.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/audiotest/wizard.glade: - * flumotion/component/producers/audiotest/wizard_gtk.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/component/producers/soundcard/wizard.glade: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/test/test_wizard_save.py: - Change 'rate' property to 'samplerate'. - Explicit is better than implicit, especially when we have - framerate and bitrate too. - Also document the default samplerate, and sync between wizard - and component. - -2008-11-19 Jan Urbanski - - * bin/flumotion-admin-command (deleted): - Complete the transition between flumotion-admin-command and - flumotion-command by removing the obsoleted one. Fixes #725. - -2008-11-14 Xavier Queralt Mateu - - * po/POTFILES.in: - * po/ca.po: - * po/de.po: - * po/es.po: - * po/fr.po: - * po/nl.po: - * po/no.po: - * po/pt_BR.po: - * po/sv.po: - Catalan and spanish translations updated. - -2008-11-13 Xavier Queralt Mateu - - * flumotion/component/consumers/disker/disker.py: - Fix the disk-consumer size rotation type. - It was not splitting the file correctly. - -2008-11-12 Sebastien Merle - - * flumotion/component/misc/httpserver/httpserver.py: - Properly setup the HTTP authenticator, - to be able to expire keycard. - Fixes #1155 - -2008-11-11 Jan Urbanski - - * common/trial.mk: - * common/Makefile.am: - Use and dist flumotion-trial instead of flumotion-trial.in, as the - latter dues noe require autoconf processing. - - * configure.ac: - Remove the directive to generate flumotion-trial. - - * common/flumotion-trial.in (deleted): - * common/flumotion-trial (added): - Rename flumotion-trial.in to flumotion-trial. - -2008-11-11 Xavier Queralt Mateu - - * flumotion/admin/assistant/Makefile.am: - * flumotion/admin/gtk/Makefile.am: - Deleted some moved files from the Makefiles - -2008-11-11 Xavier Queralt Mateu - - reviewed by: Arek Korbik - reviewed by: Johan Dahlin - - After this update the wizard's scenarios are fetched and loaded - dynamically from the manager as bundles and we reuse more code among - all the wizard modules. - - * flumotion/admin/gtk/addformatassistant.py (deleted): - Cleaning code. This is not needed as right now ConfigurationAssistant - can act as an AddFormatAssistant. - * flumotion/scenario (added): - * flumotion/scenario/__init__.py (added): - * flumotion/scenario/Makefile.am (added): - Created a new module where the scenario bundles will be placed. - * flumotion/scenario/live (added): - * flumotion/scenario/live/__init__.py (added): - * flumotion/scenario/live/Makefile.am (added): - * flumotion/scenario/live/live.xml (added): - * flumotion/scenario/live/wizard_gtk.py (added): - Created the Live scenario's module. This module contains the registry - file (live.xml) and the scenario's logic (wizard_gtk.py). - * flumotion/scenario/ondemand (added): - * flumotion/scenario/ondemand/__init__.py (added): - * flumotion/scenario/ondemand/Makefile.am (added): - * flumotion/scenario/ondemand/ondemand.xml (added): - * flumotion/scenario/ondemand/wizard_gtk.py (added): - Created the Ondemand scenario's module. This module contains the - registry file (ondemand.xml) and the scenario's logic (wizard_gtk.py). - * flumotion/admin/assistant/scenarios.py (deleted): - Cleaning code. As by now the scenarios are bundled and have its own - module this one is not needed anymore. - * flumotion/scenario/steps (added): - * flumotion/scenario/steps/__init__.py (added): - * flumotion/scenario/steps/Makefile.am (added): - Created a new module where the wizard steps will be placed. - * flumotion/scenario/steps/steps.xml (added): - Registry file for the steps bundle. The scenarios will depend on this. - * flumotion/scenario/steps/summarysteps.py (added): - * flumotion/scenario/steps/licensestep.py (added): - * flumotion/admin/gtk/consumptionsteps.py (moved): - New Location: flumotion/scenario/steps/consumptionsteps.py - * flumotion/admin/gtk/diskersteps.py (moved): - New Location: flumotion/scenario/steps/diskersteps.py - * flumotion/admin/gtk/httpstreamersteps.py (moved): - New Location: flumotion/scenario/steps/httpstreamersteps.py - * flumotion/admin/gtk/shout2steps.py (moved): - New Location: flumotion/scenario/steps/shout2steps.py - * flumotion/admin/gtk/conversionsteps.py (moved): - New Location: flumotion/scenario/steps/conversionsteps.py - * flumotion/admin/gtk/productionsteps.py (moved): - New Location: flumotion/scenario/steps/productionsteps.py - * flumotion/admin/gtk/ondemandstep.py (moved): - New Location: flumotion/scenario/steps/ondemandstep.py - - All the wizard steps were moved to the new module. - - * flumotion/admin/admin.py: - Adding the proxy methods to the adminModel for fetching the scenarios. - * flumotion/admin/assistant/interfaces.py: - Added the IScenarioAssistantPlugin, implemented by the scenarios. - * flumotion/admin/gtk/adminwindow.py: - Modified the _runAddNewFormatAssistant method. It now creates a new - ConfigurationAssistant and sets its mode to 'addformat'. - * flumotion/admin/gtk/configurationassistant.py:a - Various changes: - - The ConfigurationAssistant has different modes. The normal - wizard will use the 'normal' mode and the AddFormat wizard - will use the 'addformat' mode. - - The ConfigurationAsssitant now fetches the scenarios - remotelly from the manager. - - The LiveScenario's particular methods have been moved to the - live scenario code. - * flumotion/admin/gtk/overlaystep.py: - * flumotion/common/registry.py: - Added the methods in the parser to understand the scenario bundles. - * flumotion/manager/admin.py: - Added remote methods to the admin avatar for fetching the available - scenarios and sending them to the remote client. - * flumotion/component/encoders/theora/wizard_gtk.py: - * flumotion/test/test_wizard_save.py: - Modified an import because the step modules were moved. - * configure.ac: - Added the new directory 'flumotion/scenario' and its contents to the - configure.ac - * flumotion/Makefile.am: - Fixes #1164 - -2008-11-10 Jan Urbanski - - * flumotion/test/test_comptest.py: - Change underscores to camel case in test names. No functional changes. - -2008-11-10 Xavier Queralt Mateu - - * flumotion/test/test_wizard_save.py: - Fixed the tests for the changes on the previous commit. - -2008-11-10 Xavier Queralt Mateu - - * flumotion/component/encoders/theora/wizard_gtk.py: - Now the Theora encoder receives the correct bitrate from the wizard. - Fixes #1185 - -2008-11-10 Sebastien Merle - - reviewed by: Jan Urbanski - - * flumotion/component/misc/httpserver/ratecontrol.py: - Fixed the rate control plug when clients were consuming - slower than the specified bitrate. - More comments from Jan. - -2008-11-10 Xavier Queralt Mateu - - reviewed by: Zaheer Abbas Merali - - * flumotion/admin/gtk/main.py: - Fix a bug with the windows version of twisted. - * flumotion/ui/trayicon.py: - Use the gtk.StatusIcon instead of EggTrayIcon when gtk 2.10 or - greater is present. - Fixes #850 - -2008-11-07 Thomas Vander Stichele - - * common/common.mk: - Fail when any config fails to parse, not just the last one. - * conf/examples/default.xml: - * conf/examples/discont.xml: - * conf/examples/twores.xml: - Remove tags for tags. - Created related bug #1182. - -2008-11-07 Thomas Vander Stichele - - * flumotion/component/misc/httpserver/admin_gtk.py: - * flumotion/component/misc/httpserver/cachedprovider.py: - * flumotion/component/misc/httpserver/cachestats.py: - * flumotion/component/misc/httpserver/httpserver.glade: - While canceled is allowed spelling, everywhere else we've - used cancelled instead. - -2008-11-07 Thomas Vander Stichele - - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/misc/httpserver/cachedprovider.py: - Use float from 0.0 to 1.0 instead of percentage. - Use ten-based powers for MB and KB. - Rename some properties to indicate low and high watermark. - Add some debugginf for cache cleanup. - * conf/Makefile.am: - * conf/examples/ondemand-cache.xml (added): - Add an example. - -2008-11-05 Jan Urbanski - - * common/show-coverage.py: - Upgrade the algorithm that determines which lines were covered and - which lines could be covered, but where not. - -2008-11-05 Pedro Gracia - - * po/es.po: - Spanish translation syncronized. - -2008-11-04 Jan Urbanski - - * flumotion/test/test_icalbouncer.py (added): - Add a test case for the iCalendar bouncer. Fixes #1173. - -2008-11-04 Jan Urbanski - - * flumotion/component/consumers/disker/disker.py: - Add missing import. - -2008-11-04 Jan Urbanski - - reviewed by: Arek Korbik - - * flumotion/common/eventcalendar.py: - Make the module importable without having icalendar and dateutils - modules. - Handle iCalendar files with "floating" date-time values. - - * flumotion/component/bouncers/icalbouncer.py: - Make the iCal bouncer gracefuly handle the situation of missing - icalendar and dateutil modules. - Separate I/O exceptions from parsing exceptions when accessing an - iCalendar file. Fixes #1171. - - * flumotion/component/consumers/disker/disker.py: - Make the disker check for icalendar and dateutil support in the - eventcalendar module after importing it. Fixes #1174. - -2008-11-04 Pedro Gracia - - * flumotion/monitor/nagios/stream.py: - Add support to check streams with timed token. - -2008-11-03 Julien Le Goff - - reviewed by: Arek Korbik - - * flumotion/manager/component.py: - Added a condition in the clock synchronization code that checks - whether components belong to the same flow. - Fixes #1160 and #1151 - -2008-11-03 Xavier Queralt Mateu - - * flumotion/worker/checks/gst010.py: - Fixed an identation error that makes the check to crash. - -2008-11-03 Pedro Gracia - - * flumotion/monitor/nagios/stream.py: - options error fixed and code clean up. - -2008-10-31 Thomas Vander Stichele - - * flumotion/manager/component.py: - If port can be None, it is a crime to debug it with %d. Change - to %r instead. - -2008-10-30 Thomas Vander Stichele - - * flumotion/component/consumers/disker/disker.py: - Only import eventcalendar where we need it, so we don't always - drag in python-icalendar. - -2008-10-30 Thomas Vander Stichele - - * flumotion.spec.in: - Add a directory for rrd databases that the group can write to. - -2008-10-30 Thomas Vander Stichele - - * flumotion/component/plugs/plugs.xml: - * flumotion/component/plugs/rrd.py: - Make it 8 days/weeks/months/years instead of 2. - -2008-10-30 Thomas Vander Stichele - - * common/Makefile.am: - Dist the source flumotion-trial.in, not the generated version. - -2008-10-30 Thomas Vander Stichele - - * flumotion/component/plugs/plugs.xml: - Add 'step-size' property. Cleanups. - * flumotion/component/plugs/rrd.py: - Make step-size configurable. More cleanups. - -2008-10-30 Thomas Vander Stichele - - * flumotion/component/plugs/rrd.py: - camelcasing, privatizing, variable renaming, commenting, - logging changes. - -2008-10-30 Thomas Vander Stichele - - * flumotion/component/plugs/rrd.py: - Various style cleanups, logging changes, translation. - -2008-10-30 Zaheer Abbas Merali - - * flumotion/component/producers/audiotest/audiotest.py: - There was no check on the elements' existence. - This would cause, if there was for example no level, the only - error reported to be a failure in providing master clock. - -2008-10-29 Johan Dahlin - - * flumotion/ui/wizard.py: - Document WizardStep & SectionWizard. - Make ui elements only used by section wizard private - to avoid other modules importing them. - -2008-10-29 Jan Urbanski - - * flumotion/component/bouncers/icalbouncer.py: - - Fix a typo described in #1173. Use UTC time instead of local time for - comparisions (the attempt at using local time was broken anyway, as it - caused an import error). - -2008-10-26 Thomas Vander Stichele - - * flumotion/test/test_common_eventcalendar.py: - Add a test that shows the length of an event spanning a - daylight savings time change is correct. - Remove an assert that fails only during winter time due to - a possible bug in python-iCalendar; see - https://thomas.apestaart.org/thomas/trac/browser/tests/icalendar/ - -2008-10-27 Sebastien Merle - - * flumotion/component/bouncers/icalbouncer.py: - * flumotion/component/bouncers/plug.py: - * flumotion/component/bouncers/tokentest.py: - * flumotion/test/bouncertest.py: - Fixed the bouncer tests. - Applied the bouncer fixes to the plug version of the bouncer. - Fixed ical and tokentest bouncers use of addKeycard. - -2008-10-24 Thomas Vander Stichele - - * flumotion/common/messages.py: - also log debug if it's there. - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/combiners/switch/switch.py: - * flumotion/component/bouncers/icalbouncer.py: - Use calendar to get event instances. - Change to use eventInstanceStarted/Ended callbacks. - * flumotion/component/base/scheduler.py: - Based on the mtime of a previous recording, decide whether to - overwrite (if it was part of a previous event) or change filename - (if it is part of the current event). - Add a simple duration check to the rescheduling, and complain - if it is more than half a second. - (It used to be 7 seconds for the simple urgent.ics test case.) - Compare old and new active events only by content, since - start and end times might have changed of the currently active - event. - Add self._calendar, getCalendar and setCalendar. - Remove removeEvent, calendars always keep their events and - schedule with instances. - Remove replaceEvents. - Change subscribe to take functions that notify about instances - starting and ending, instead of events. - Change the core, getNextEvent, to a function that gets the next - points, so that all points at that time get handled, not just - one. - Schedule handling of the next set of points as a group in one - callLater. - * flumotion/test/test_component_base_scheduler.py: - * flumotion/test/test_common_eventcalendar.py: - * flumotion/common/eventcalendar.py: - Fix bug in getActiveInstances where it was ignoring events with - a RECURRENCE-ID that should specialize the rrule. - Switch to UTC for interpreting tz-less dates, since most likely - a file with no tz information will not magically happen to be - in the same time zone as the server that will run the component. - Add a new Calendar object to collect the EventSets parsed from - an iCalendarfile. - Make Points naturally sort end first. - Make clipping getPoints to start and end optional, because - you don't want asking the Calendar for points to be clipping. - * flumotion/component/consumers/disker/disker.py: - Add next-points to the uiState, keeping track of the next - points on the schedule in the disker's window. - * flumotion/component/consumers/disker/admin_gtk.py: - Expose the next-points with a kiwi object-list that gets updated - when the disker reschedules. - * flumotion/test/Makefile.am: - * flumotion/test/test_component_base_vevent.py: - Remove. - * flumotion/admin/rrdmon/rrdmon.py: - Update to use new calendar interface, though I doubt the scheduler - ever worked for this program, since the rrule was passed as a - timedelta but nothing handled it as a timedelta. - * flumotion/test/urgent.ics (added): - Add test ics from #821. - - Merging branch ticket-1143 - - Fixes #1143 and #821. - -2008-10-23 Thomas Vander Stichele - - * flumotion/component/misc/httpserver/httpserver.py: - Make Request.fd public so the request can be identified. - When we time out sessions, give us a clue which session we're timing - out. - -2008-10-21 Thomas Vander Stichele - - * misc/jhbuildrc.flu: - JHBuild was changed, and apparently any variable without a _ prefix - is considered as an unknown parameter. - -2008-10-21 Sebastien Merle - - * flumotion/component/bouncers/bouncer.py: - Made addKeycard accept already added keycards. - -2008-10-20 Pedro Gracia - - * flumotion/monitor/nagios/stream.py: - Nagios stream check do critical without delay if founds different - stream params. - -2008-10-20 Xavier Queralt Mateu - - reviewed by: Johan Dahlin - - * flumotion/admin/gtk/componentview.py: - Delete the notebooks each time we open a new one, - this way we don't have multiple notebooks. - Fixes #1070 - -2008-10-20 Xavier Queralt Mateu - - reviewed by: Johan Dahlin - - * data/image/16x16/Makefile.am: - * data/image/24x24/Makefile.am: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/ui/icons.py: - Replaced the custom play/stop icons for the stock ones. - * data/image/24x24/pause.png (deleted): - * data/image/24x24/play.png (deleted): - * data/image/24x24/stop.png (deleted): - * data/image/24x24/about.png (deleted): - * data/image/16x16/pause.png (deleted): - * data/image/16x16/play.png (deleted): - * data/image/16x16/stop.png (deleted): - * data/image/16x16/about.png (deleted): - Custom images deleted from the tree as they are - no longer used. - Fixes #1014 - -2008-10-20 Xavier Queralt Mateu - - reviewed by: Johan Dahlin - - * flumotion/ui/glade.py: - A temporal workaround, added a signal to GladeDelegate. - Fixes #1124 - -2008-10-20 Xavier Queralt Mateu - - reviewed by: Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: - Clear the component list when connecting to a new - manager and allow the wizard to reapear when it is - closed without finishing the configuration. - Fixes #695 - -2008-10-20 Xavier Queralt Mateu - - reviewed by: Johan Dahlin - - * data/glade/connection-dialog.glade: - * data/glade/greeter-load_connection.glade: - * flumotion/admin/gtk/connections.py: - * flumotion/admin/gtk/greeter.py: - Disables the connect button when the recent - connections list is cleared. - Fixes #1051 - -2008-10-20 Xavier Queralt - - reviewed by: Johan Dahlin - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/adminwindow.py: - Free the old connection when switching managers. - Fixes #758 - -2008-10-20 Sebastien Merle - - * flumotion/component/bouncers/bouncer.py: - Removed the UI state updates. - -2008-10-20 Sebastien Merle - - * flumotion/component/bouncers/bouncer.py: - Fixed the do_close method to return a deferred called when - all keycard has been revoked. - Made addKeycard return if the keycard has been added. - Added two virtual methods where subclasses can safely - update and cleanup data related to keycards. - Fixes #1153 - -2008-10-27 Sebastien Merle - - * flumotion/component/bouncers/plug.py: - Added a comment to remember the new expireKeycardIds - API has not been duplicated to the plug version - of the bouncer. - -2008-10-22 Sebastien Merle - - * flumotion/component/bouncers/bouncer.py: - Accept calls to expireKeycardIds that return None, - because the current tests do not support return values. - -2008-10-22 Sebastien Merle - - * flumotion/component/base/http.py: - Fixed a bug in setIssuerClass. - -2008-10-22 Sebastien Merle - - * flumotion/common/keycards.py: - * flumotion/component/base/http.py: - * flumotion/twisted/credentials.py: - Added an HTTPGetArguments credential, keycard and issuer. - -2008-10-20 Sebastien Merle - - * flumotion/component/base/http.py: - Do not call back the bouncer when told to expire some keycard. - Done by cleaning up all keycard lists when expiring a keycard, - and not calling the bouncer in cleanAuth when the keycard - has previously been cleaned up. - Fixes #1155 - -2008-10-16 Sebastien Merle - - * flumotion/component/base/http.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/manager/component.py: - Added expireKeycardIds method to the base Bouncer class, - the methods for the manager to forward the calls, - and fixed the consumers to use the new method. - -2008-10-16 Sebastien Merle - - * flumotion/manager/component.py: - Added to the component avatar the method to forward - keep-alive calls to the bouncers. - Fixes #895 - -2008-10-15 Jan Urbanski - - * common/Makefile.am: - Add flumotion-trial to EXTRA_DIST in common/Makefile.am. - -2008-10-15 Pedro Gracia - - * flumotion/monitor/nagios/stream.py: - Fixed an error that makes this script fail with playlists. - -2008-10-15 Pedro Gracia - - * po/es.po: - Update Spanish translation. - -2008-10-14 Jan Urbanski - - * Makefile.am: - Temporarily add misc/flumotion-trial to CLEANFILES, because - flumotion-trial.in has been moved from misc/ to common/ which might - have left a stale generated file in old trees. - -2008-10-14 Jan Urbanski - - * flumotion/common/testsuite.py: - Set the skip attribute on the testcase class instead of setting it on - the instance. This is a workaround for Twisted 2.0.1. - svn:ignore flu-saved-coverage.pickle - -2008-10-14 Jan Urbanski - - * flumotion/common/testsuite.py: - Add more workarounds for ancient Twisted versions. - - * flumotion/test/test_comptest.py: - Define an empty runTest method in the dummy TestCase so trial won't - complain when it will try to instantiate it. - -2008-10-13 Jan Urbanski - - * flumotion/test/test_comptest.py: - Work around broken Twisted < 2.5.0 trial, which has None as the default - argument for TestCase.__init__ - -2008-10-13 Jan Urbanski - - * flumotion/common/testsuite.py: - Fix the build by checking for specific function signature instead of - relying on the Twisted version number, which is not provided in SVN - Twisted checkouts. - -2008-10-13 Jan Urbanski - - * flumotion/common/testsuite.py: - Fix the build by supporting Twisted versions < 2.5.0 - -2008-10-13 Jan Urbanski - - * common/flumotion-trial.in (added): - * misc/flumotion-trial.in (deleted): - Move flumotion-trial from misc/ to common/ in roder to have it picked - up in flumotion-template - - * common/common.mk: - * common/trial.mk: - * configure.ac: - Change the paths to flumotion-trial from misc/ to common/ - -2008-10-13 Jan Urbanski - - * flumotion/test/comptest.py: - * flumotion/test/test_comptest.py: - Adapt comptest to the recent changes in component initialization - protocol. - * flumotion/common/testsuite.py: - Extend flumotion.common.testsuite.TestCase to allow choosing supported - reactors for each test case. Running a test case with a reactor that's - not supported by it will result in a skip. - * configure.ac: - * misc/flumotion-trial.in: - Add a wrapper script for Twisted trial to support an additional - parameter --saved-coverage. It should point to a file which will store - intermediate coverage results between consecutive trial runs. For more - see http://docs.python.org/library/trace.html and the Trace class - `infile' and `outfile' params. - * common/common.mk: - * common/trial.mk: - Change the `check' and `coverage' make targets to take advantage of the - new features. There will now be two separate flumotion-trial runs, with - different reactors, and intermediate coverage results will get stored - in a file. This allows for running test cases that require different - reactors and still getting total coverage results. - * flumotion/test/test_component_disker.py: - Add a test for the Disker component using new comptest features. - * flumotion/component/consumers/disker/disker.py: - Fix confusing log message. - * flumotion/component/padmonitor.py: - Fix a bug in EaterPadMonitor where stopping the component inside a - EaterPadMonitor.setInactive() call would result in the reactor ending - up in an unclean state. - -2008-10-13 Sebastien Merle - - * flumotion/component/misc/httpserver/httpfile.py: - Fixed forgotten parameters in case of authentication failure. - -2008-10-09 Thomas Vander Stichele - - * scripts/check-sync-on-feeds: - Show me nicer timestamps. - -2008-10-09 Thomas Vander Stichele - - * flumotion/common/common.py: - Assertions need to have a reason. - -2008-10-07 Zaheer Abbas Merali - - * flumotion/component/base/baseadminnode.py: - Document self.wtree and self.widget. - -2008-10-06 Thomas Vander Stichele - - * flumotion/admin/gtk/connections.py: - Make typeahead actually useful by matching on 'contains', not - 'starts with'. - -2008-10-02 Thomas Vander Stichele - - * flumotion/admin/command/common.py: - Import missing module. - -2008-10-01 Johan Dahlin - - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/admin/gtk/productionsteps.py: - Improve documentation, add a couple of docstrings explaining - the design and implementation of the configuration assistant. - No code changes. - -2008-09-29 Thomas Vander Stichele - - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/disker/disker_plug.py: - Change recording_started/_stopped to recordingStarted/Stopped to - conform to naming guidelines. - -2008-09-27 Thomas Vander Stichele - - * flumotion/admin/command/common.py: - Add a method to connect to a manager. - -2008-09-22 Thomas Vander Stichele - - * flumotion/manager/component.py: - Document a method and add some debugging. - -2008-09-21 Thomas Vander Stichele - - * flumotion/test/test_component_httpserver.py: - * flumotion/test/test_comptest.py: - * flumotion/test/test_manager_component.py: - * flumotion/test/test_manager_manager.py: - Fix MRO. - -2008-09-21 Thomas Vander Stichele - - * flumotion/component/consumers/disker/disker.py: - Add some debugging to help fix a problem. - -2008-09-20 Thomas Vander Stichele - - * flumotion/common/testsuite.py: - Make all TestCase objects Loggable. - -2008-09-20 Thomas Vander Stichele - - * flumotion/component/base/scheduler.py: - Get more useful logging to debug problems. - -2008-09-19 Zaheer Abbas Merali - - reviewed by: Arek Korbik - - * flumotion/component/combiners/switch/switch.py: - Use pad monitors for the sink pads in switch to check for active or - inactive eaters. - Rewrite new segment events coming in after an eater goes inactive to - have a start time same as first buffer to avoid massive timestamp - jumps in output of switch. - -2008-09-17 Thomas Vander Stichele - - * flumotion/monitor/nagios/stream.py: - Initialize self._gsterror - -2008-09-17 Thomas Vander Stichele - - * flumotion/monitor/nagios/stream.py: - Default to using gnomevfssrc, it's the oldest element and thus - more available, it's actually in base, and it throws a halfway - decent error on a 401, in contrast with the other two. - Add an option to treat resource read errors as OK; this is a - stopgap until this code gets changed to take a manager's bouncer - state for that streamer into account. - -2008-09-16 Johan Dahlin - - * flumotion/common/i18n.py (installGettext): - Check if bindtextdomain & textdomain are available before - calling them. - - * flumotion/common/bundle.py: Make sure that renaming - a temporary file in a bundle works on win32. - - * flumotion/common/netutils.py: Do nested import of fcntl, - since it's not available on all platforms. - -2008-09-15 Arek Korbik - - * flumotion/common/config.py (parsePlug): - * flumotion/manager/config.py (parseBool): - Add some (old) deprecation warnings. - -2008-09-16 Thomas Vander Stichele - - * flumotion/monitor/nagios/stream.py: - gst.element_factory_make() raises gst.PluginNotFoundError, so - handle it. - -2008-09-15 Thomas Vander Stichele - - * flumotion/monitor/nagios/stream.py: - Also parse ELEMENT messages for missing-plugin. - Makes the checks work with neonhttpsrc and gnomevfssrc too. - Select the source element from a list of possibilities. - Import flumotion.common.log, easier to backport. - -2008-09-15 Arek Korbik - - * flumotion/admin/gtk/httpstreamersteps.py (checkElements): - * flumotion/admin/gtk/overlaystep.py (checkElements): - * flumotion/component/bouncers/ipbouncer.py (IPBouncer.do_setup): - * flumotion/component/combiners/switch/switch.py (Switch.addWarning): - * flumotion/component/converters/overlay/overlay.py - (Overlay.configure_pipeline): - * flumotion/component/plugs/rrd.py (ComponentRRDPlug._check_import): - * flumotion/worker/checks/check.py (checkPlugin): - * flumotion/worker/checks/gst010.py (do_check): - Remove deprecated use of 'id' keyword argument in calls of - constructor of Message classes, use 'mid' instead. - - * flumotion/manager/component.py (ComponentAvatar.addMessage): - * flumotion/manager/manager.py (Vishnu.addMessage): - Rename the non-keyword 'id' argument to 'mid' in addMessage() - methods. - -2008-09-15 Thomas Vander Stichele - - * flumotion/monitor/nagios/Makefile.am: - Actually dist stream.py - -2008-09-15 Thomas Vander Stichele - - * flumotion/monitor/nagios/util.py: - Add constructors for Nagios Exceptions. - * flumotion/monitor/nagios/main.py: - Catch them from parsing. - * flumotion/monitor/nagios/stream.py: - Make sure self._url is unchanged from the properties, so that - the script reports what URL was requested. - Check audio and video mime type against the encoded ones, which - is what we are interested in. - Only print one line in the case of a 404. - Document/comment. - -2008-09-12 Arek Korbik - - * common/validate-config.py: - Make the script actually validate the whole flow file, not only - the manager-specific parts. - -2008-09-10 Johan Dahlin - - * flumotion/admin/assistant/scenarios.py: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/componentlist.py: - Select a reasonable default component after closing the asssitant, - fixes #1115 - -2008-09-09 Thomas Vander Stichele - - * flumotion/component/plugs/plugs.xml: - * flumotion/component/plugs/rrd.py: - Rename plug properties. See #1111. - -2008-09-09 Thomas Vander Stichele - - * common/validate-registry.py: - * flumotion/common/registry.py: - * flumotion/launch/inspect.py: - * flumotion/test/test_registry.py: - * flumotion/component/bouncers/bouncer.xml: - * flumotion/component/bouncers/tokentest.xml: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/plugs/cortado/cortado.xml: - * flumotion/component/plugs/plugs.xml: - Add descriptions for plugs and their properties. - Add code to load and save them to the registry. - Validate that these are added to plugs and properties. - Closes #1139. - -2008-09-05 Arek Korbik - - * flumotion/configure/configure.py: - Increase process termination timeouts, for now... - -2008-09-05 Arek Korbik - - * flumotion/configure/configure.py: - * flumotion/common/medium.py (PingingMedium): - * flumotion/twisted/pb.py (PingableAvatar): - Unhardcode and (temporarily) increase the ping timeout multiplier. - -2008-09-04 Thomas Vander Stichele - - * data/Makefile.am: - * data/upgrade-to-0.5.3.xsl: - * data/upgrade-to-0.5.3.xsl (added): - Add first stab at an upgrade xsl script. - -2008-09-04 Thomas Vander Stichele - - * flumotion/common/identity.py: - * flumotion/component/plugs/identity.py: - * flumotion/manager/config.py: - * flumotion/manager/manager.py: - * flumotion/test/test_config.py: - More IdentityProvider -> IdentityProviderPlug renames. - -2008-09-04 Thomas Vander Stichele - - * common/validate-registry.py: - Add another check, instantiating the socket mentioned by a plug. - * flumotion/component/misc/httpserver/cachedprovider.py: - * flumotion/component/misc/httpserver/fileprovider.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/misc/httpserver/localprovider.py: - * flumotion/component/plugs/plugs.xml: - Further Plug naming fixes. - -2008-09-04 Thomas Vander Stichele - - * flumotion/admin/gtk/greeter.py: - Since the authentication method was removed, change the string. - -2008-09-04 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/manager/manager.py: - Fix more socket = '...' instances. - * flumotion/test/test_component_httpstreamer.py: - Add a test for getStreamData. - -2008-09-04 Pedro Gracia - - * po/POTFILES.in: - Deleted "flumotion/component/plugs/lifecycle.py" entry. - Removed in r7354. - -2008-09-03 Thomas Vander Stichele - - * flumotion/component/plugs/manhole.py: - lifecycle module is gone. - * flumotion/extern/fdpass/__init__.py: - Insert some magic that makes flumotion.extern.fdpass.fdpass - importable in distcheck mode. - -2008-09-03 Sebastien Merle - - * flumotion/component/misc/httpserver/admin_gtk.py: - * flumotion/component/misc/httpserver/httpserver.glade: - * flumotion/component/misc/httpserver/serverstats.py: - Updated the http-server UI to better match the http-server UI. - Removed some obscure statistics from the UI. - Disabled the cache UI. - -2008-09-03 Thomas Vander Stichele - - * common/validate-registry.py: - Make sure that all plugs can be instantiated. - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - * flumotion/component/misc/httpserver/cachedprovider.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/misc/httpserver/localprovider.py: - * flumotion/component/plugs/rrd.py: - * flumotion/test/test_component_httpserver.py: - Further Plug class renaming. - -2008-09-03 Thomas Vander Stichele - - * flumotion/component/plugs/cortado/cortado.py: - * flumotion/component/plugs/cortado/cortado.xml: - Properly fix ComponentCortadoPlug naming. - This fixes the build and fixes the assistant. - -2008-09-03 Johan Dahlin - - * flumotion/component/plugs/cortado/cortado.xml: - Clean up after Thomas. Rename Cortado plug in the xml too. - -2008-09-02 Arek Korbik - - * flumotion/component/plugs/Makefile.am: - Fix after tired Thomas - add request.py to Makefile.am. - -2008-09-02 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/plugs/plugs.xml: - * flumotion/test/test.xml: - * flumotion/test/test_component_httpstreamer.py: - * flumotion/test/test_http.py: - * flumotion/test/test_manager_config.py: - * po/POTFILES.in: - * flumotion/component/plugs/request.py (added): - * flumotion/component/plugs/loggers.py (deleted): - Move loggers.py to request.py. Part of fixing up after #946. - -2008-09-02 Thomas Vander Stichele - - * flumotion/component/plugs/Makefile.am: - * flumotion/component/plugs/base.py: - * flumotion/component/plugs/plugs.xml: - * flumotion/component/plugs/lifecycle.py (deleted): - Remove lifecycle.py as mentioned in #946. - -2008-09-02 Thomas Vander Stichele - - * common/validate-registry.py: - Validate plug naming. - -2008-09-02 Thomas Vander Stichele - - * flumotion/component/bouncers/bouncer.xml: - * flumotion/component/bouncers/plug.py: - * flumotion/component/bouncers/tokentest.py: - * flumotion/component/bouncers/tokentest.xml: - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/misc/httpserver/cachedprovider.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/misc/httpserver/localprovider.py: - * flumotion/component/misc/httpserver/ratecontrol.py: - * flumotion/component/plugs/adminaction.py: - * flumotion/component/plugs/cortado/cortado.xml: - * flumotion/component/plugs/cortado/wizard_gtk.py: - * flumotion/component/plugs/identity.py: - * flumotion/component/plugs/lifecycle.py: - * flumotion/component/plugs/loggers.py: - * flumotion/component/plugs/manhole.py: - * flumotion/component/plugs/plugs.xml: - * flumotion/component/plugs/streamdata.py: - * flumotion/launch/main.py: - * flumotion/manager/config.py: - * flumotion/manager/manager.py: - * flumotion/test/test.xml: - * flumotion/test/test_component_bouncers_component.py: - * flumotion/test/test_component_bouncers_plug.py: - * flumotion/test/test_component_httpserver.py: - * flumotion/test/test_component_httpstreamer.py: - * flumotion/test/test_config.py: - * flumotion/test/test_http.py: - * flumotion/test/test_manager_config.py: - Rename plugs according to styleguide. Fixes #946. - -2008-09-02 Thomas Vander Stichele - - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/plugs/plugs.xml: - Fix deprecated description attributes. - * common/validate-registry.py: - Make using deprecated description attributes an error. - -2008-09-02 Thomas Vander Stichele - - * flumotion/test/test_manager_config.py: - Change so it won't break the 80 character rule after changing plug - names. - -2008-09-02 Thomas Vander Stichele - - * flumotion/component/plugs/rrd.py: - Fix header. - -2008-09-02 Pedro Gracia - - * po/es.po: - Spanish translation sync again. - -2008-09-02 Sebastien Merle - - * flumotion/component/misc/httpserver/Makefile.am: - Added serverstats.py to the makefile. - -2008-09-02 Sebastien Merle - - * flumotion/test/test_component_httpserver.py: - Updated tests to pass with the new httpserver. - -2008-09-02 Sebastien Merle - - * flumotion/component/misc/httpserver/httpfile.py: - If asked for a range that include the whole file, - respond with a range (206) as before instead of a normal request (200). - Couldn't find a conclusive answer in the spec. - -2008-09-02 Sebastien Merle - - * flumotion/component/misc/httpserver/httpfile.py: - * flumotion/component/misc/httpserver/httpserver.py: - Moved the response code and content type setting from - the CancelableRequest class to the File class, - for consistency and to make testing easier. - -2008-09-02 Sebastien Merle - - * flumotion/component/misc/httpserver/httpserver.py: - Properly cleanup the uptime update delayed call. - -2008-09-01 Sebastien Merle - - Merged from svn branch httpserver-caching. - - * flumotion/component/misc/httpserver/Makefile.am: - * flumotion/component/misc/httpserver/admin_gtk.py: - * flumotion/component/misc/httpserver/httpfile.py: - * flumotion/component/misc/httpserver/httpserver.glade: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/misc/httpserver/cachedprovider.py: - * flumotion/component/misc/httpserver/cachestats.py: - * flumotion/component/misc/httpserver/fileprovider.py: - * flumotion/component/misc/httpserver/localpath.py: - * flumotion/component/misc/httpserver/localprovider.py: - * flumotion/component/misc/httpserver/serverstats.py: - Made the file browsing and serving of the httpserver component a plug. - Added statistics gathering to the httpserver component. - Added a local caching plug for the httpserver component. - Fixed the source to pass pep8.py. - -2008-09-01 Thomas Vander Stichele - - * po/nl.po: - Update Spanish translation. - -2008-09-01 Pedro Gracia - - * po/es.po: - Spanish translation sync again. - -2008-09-01 Johan Dahlin - - * data/glade/admin-wizard.glade: - Change the title of the greeter, fixes #1012. - -2008-09-01 Murray Cumming - - * flumotion/component/encoders/smoke/wizard.glade: Key frame instead of - Keyframe. - -2008-09-01 Murray Cumming - - * flumotion/component/encoders/theora/wizard.glade: Change keyframe - to key frame in UI strings. - -2008-08-30 Thomas Vander Stichele - - * flumotion/admin/command/component.py: - * flumotion/admin/command/manager.py: - * flumotion/admin/command/worker.py: - * flumotion/monitor/nagios/log.py: - * flumotion/monitor/nagios/main.py: - * flumotion/monitor/nagios/process.py: - * flumotion/monitor/nagios/stream.py: - Remove own name from usage. - -2008-08-29 Thomas Vander Stichele - - * data/glade/welcome-wizard.glade: - Make first page less scary. Fixes #1122. - -2008-08-29 Thomas Vander Stichele - - * flumotion/common/process.py: - Document and make SystemError correct. - -2008-08-29 Thomas Vander Stichele - - * flumotion/admin/assistant/scenarios.py: - Make scenario descriptions consistent. Fixes #1123. - -2008-08-29 Pedro Gracia - - * flumotion/common/netutils.py: - Changes to support Solaris. - -2008-08-29 Thomas Vander Stichele - - * flumotion/component/bouncers/Makefile.am: - Properly package ipbouncer.xml so make distcheck works again. - -2008-08-29 Pedro Gracia - - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/plugs/plugs.xml: - Socket name have to follow the style guide. - -2008-08-29 Pedro Gracia - - reviewed by: Arek Korbik - - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/plugs/Makefile.am: - * flumotion/component/plugs/plugs.xml: - * flumotion/component/plugs/rrd.py: - Streamers can write RRD files directly with this plug. - Fixes #1111. - -2008-08-29 Thomas Vander Stichele - - * flumotion/common/eventcalendar.py: - Fix repr interpolation. - Makes FLU_DEBUG=4 trial - flumotion.test.test_component_base_scheduler.SchedulerTest - not fail. - -2008-08-29 Thomas Vander Stichele - - * flumotion/monitor/nagios/main.py: - Fix comment. - -2008-08-28 Johan Dahlin - - * flumotion/manager/config.py: - * flumotion/test/test_manager_config.py: - Make sure multiple config properties are serialized property. - Add a test. - -2008-08-28 Murray Cumming - - * flumotion/component/consumers/disker/disker.glade: Start New File - button: Use header capitalization as per the HIG. - -2008-08-28 Johan Dahlin - - * data/glade/sectionwizard.glade: - * flumotion/ui/wizard.py: - Revert wizard forward/finish change. - Fixes #996 - -2008-08-27 Thomas Vander Stichele - - * common/common.mk: - Make sure we execute trial for coverage in the built environment. - -2008-08-27 Thomas Vander Stichele - - * Makefile.am: - Make sure we validate the registry. - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/test/test_http.py: - Break some lines in preparation for a plug rename. - -2008-08-27 Thomas Vander Stichele - - * flumotion/twisted/compat.py: - Trigger deprecation on using a function, not importing. This way - we can get a call site that is not in ihooks.py and have a hope - of fixing them. - -2008-08-27 Thomas Vander Stichele - - * flumotion/launch/inspect.py: - These two lines print the same thing, so might as well show it only - once. - -2008-08-27 Johan Dahlin - - * flumotion/ui/wizard.py (WizardSidebar.jumpToStep): Sidebar is - in wizard. - -2008-08-27 Johan Dahlin - - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/videotest/videotest.xml: - Make the video/audio test component descriptions shorter - -2008-08-27 Murray Cumming - - * data/glade/shout2-wizard.glade: Changed some labels and added some - tooltips to make this slightly less confusing. - -2008-08-27 Pedro Gracia - - * po/es.po: - Spanish translation sync now. - -2008-08-27 Johan Dahlin - - * flumotion/ui/fileselector.py (FileSelector._rowActivated): - raise NotImplementedError instead of just NotImplemented. - -2008-08-26 Zaheer Abbas Merali - - * flumotion/worker/checks/gst010.py: - New firewire stack does not create raw1394 device node so check - for /dev/fw0 as well. - -2008-08-26 Thomas Vander Stichele - - * flumotion/admin/command/common.py: - * flumotion/admin/command/component.py: - * flumotion/admin/command/manager.py: - * flumotion/monitor/nagios/log.py: - * flumotion/ui/fileselector.py: - pychecker cleanups. - -2008-08-26 Thomas Vander Stichele - - * flumotion/test/test_config.py: - Move config to the left so it doesn't exceed 80 chars after - renaming. Maybe we should do this for all of them. - -2008-08-26 Murray Cumming - - * flumotion/admin/gtk/httpstreamersteps.py: - * flumotion/admin/gtk/shout2steps.py: Added docSection IDs for - these assistant pages. - -2008-08-26 Johan Dahlin - - * data/glade/sectionwizard.glade: - Add left,right & bottom padding to the message view. - -2008-08-25 Pedro Gracia - - * po/es.po: - Translated fuzzy new messages to Spanish. - -2008-08-25 Johan Dahlin - - * data/glade/http-wizard.glade: - * flumotion/admin/gtk/consumptionsteps.py: - * flumotion/admin/gtk/httpstreamersteps.py: - * flumotion/component/plugs/cortado/wizard_gtk.py: - * flumotion/worker/checks/http.py: - Make it possible to override the public hostname. - Fixes #928. - -2008-08-25 Johan Dahlin - - * common/common.mk (check-local-pep8): Add --repeat here, so we - can see more than just the first error. - -2008-08-25 Thomas Vander Stichele - - * flumotion/manager/config.py: - Add some newlines to serialization around flows/atmosphere and - components so the structure of the XML is visually clear again. - -2008-08-25 Thomas Vander Stichele - - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/videotest/videotest.xml: - Update descriptions to talk about example and demonstration. - See #1090. - -2008-08-24 Thomas Vander Stichele - - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/componentlist.py: - Instead of only removing locally added messages in the current - admin client, make sure that all admin clients remove their - locally added messages any time a component goes to sleeping. - Thanks to Arek for the suggestion. - -2008-08-24 Thomas Vander Stichele - - * flumotion/component/base/baseadminnode.py: - When there is a component UI error in a tab, say which tab. - When the error is because the component's Node still uses glade_file - then warnings.warn and show a component warning message, but - still work. - -2008-08-24 Thomas Vander Stichele - - * flumotion/component/base/baseadminnode.py: - Make the TypeError clearer by saying which method is responsible - for the bug. - -2008-08-24 Thomas Vander Stichele - - * flumotion/admin/gtk/adminwindow.py: - Make sure that, when you stop a component, all client-side messages - are cleared from the state, so that the UI can remove them when - the component is sleeping. This got broken again recently, please - take care when rewriting UI code. - -2008-08-24 Thomas Vander Stichele - - * flumotion/component/base/baseadminnode.py: - Make the id of render errors unique by using the title of the - Node. This makes sure that render error messages from one node - do not get removed by the successful rendering of another node, - both deriving from the same base class. - -2008-08-24 Thomas Vander Stichele - - * flumotion/admin/gtk/adminwindow.py: - Make docstrings adhere to style guide. - Document the fact that _componentDo can also take a None state, - in which case it will look at the current selection. - -2008-08-24 Thomas Vander Stichele - - * flumotion/admin/command/common.py: - * flumotion/admin/command/component.py: - * flumotion/admin/command/manager.py: - Fixes and cleanups. - -2008-08-24 Arek Korbik - - * flumotion/common/bundle.py: - Revert r6608 and r6614, as they introduced a fatal race condition - in the unbundling code. Fixes #1116. - -2008-08-23 Thomas Vander Stichele - - * flumotion/service/main.py: - make it clear that condrestart is available. - -2008-08-23 Murray Cumming - - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/diskersteps.py: - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/httpstreamersteps.py: - * flumotion/admin/gtk/shout2steps.py: - * flumotion/component/encoders/dirac/wizard_gtk.py: - * flumotion/component/encoders/jpeg/wizard_gtk.py: - * flumotion/component/encoders/mulaw/wizard_gtk.py: - * flumotion/component/encoders/smoke/wizard_gtk.py: - * flumotion/component/encoders/speex/wizard_gtk.py: - * flumotion/component/encoders/theora/wizard_gtk.py: - * flumotion/component/encoders/vorbis/wizard_gtk.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/ui/simplewizard.py: - Corrected the capitalization in dialog/assistant-page titles - and assistant sidebar titles, as per - http://library.gnome.org/devel/hig-book/stable/design-text-labels.html.en#layout-capitalization - * flumotion/component/producers/firewire/wizard_gtk.py: - Change the Firewire title to Firewire Video. Firewire Audio - already has the corrected title. - * flumotion/admin/gtk/ondemandstep.py: Change the title from - Demand to On Demand. - * flumotion/component/producers/webcam/wizard_gtk.py: - Corrected a docSection. - -2008-08-23 Murray Cumming - - * flumotion/admin/assistant/scenarios.py: - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/admin/gtk/consumptionsteps.py: - * flumotion/admin/gtk/httpstreamersteps.py: - * flumotion/admin/gtk/ondemandstep.py: - * flumotion/admin/gtk/overlaystep.py: - * flumotion/component/encoders/dirac/wizard_gtk.py: - * flumotion/component/encoders/jpeg/wizard_gtk.py: - * flumotion/component/encoders/mulaw/wizard_gtk.py: - * flumotion/component/encoders/smoke/wizard_gtk.py: - * flumotion/component/encoders/speex/wizard_gtk.py: - * flumotion/component/encoders/theora/wizard_gtk.py: - * flumotion/component/encoders/vorbis/wizard_gtk.py: - * flumotion/component/producers/audiotest/wizard_gtk.py: - * flumotion/component/producers/bttv/wizard_gtk.py: - * flumotion/component/producers/firewire/wizard_gtk.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/videotest/wizard_gtk.py: - Added docSection strings to enable the help buttons. - I think that all of the possible assistant pages now have help buttons. - -2008-08-22 Pedro Gracia - - * flumotion/monitor/nagios/main.py: - * flumotion/monitor/nagios/stream.py: - More complete streams checking for flumotion-nagios. - See #2058 (pt) - -2008-08-22 Pedro Gracia - - * po/POTFILES.in: - Deleted "flumotion/admin/command/commands.py" entry. Removed in r7227. - -2008-08-22 Johan Dahlin - - * data/glade/sectionwizard.glade: - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/common/registry.py: - * flumotion/manager/admin.py: - * flumotion/ui/wizard.py: - Add a component description to the wizard. - Fixes #1099 - -2008-08-22 Johan Dahlin - - * data/glade/welcome-wizard.glade: - Replace the string in the initial step, Fixes #889 - Patch by Murray Cumming. - -2008-08-22 Johan Dahlin - - * data/glade/admin-wizard.glade: - * data/glade/welcome-wizard.glade: - wizard -> assistant - -2008-08-20 Thomas Vander Stichele - - * flumotion/monitor/nagios/Makefile.am: - * flumotion/monitor/nagios/main.py: - * flumotion/monitor/nagios/log.py (added): - Add implementation of flumotion-nagios log recent which can - check if a given string was logged recently. - -2008-08-20 Johan Dahlin - - * flumotion/admin/assistant/Makefile.am (component_PYTHON): - * flumotion/admin/gtk/Makefile.am (component_PYTHON): - Add new files - -2008-08-20 Johan Dahlin - - * configure.ac: - * flumotion/Makefile.am: - * flumotion/admin/assistant/scenarios.py: - * flumotion/admin/gtk/addformatassistant.py: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/basesteps.py: - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/admin/gtk/consumptionsteps.py: - * flumotion/admin/gtk/conversionsteps.py: - * flumotion/admin/gtk/diskersteps.py: - * flumotion/admin/gtk/httpstreamersteps.py: - * flumotion/admin/gtk/ondemandstep.py: - * flumotion/admin/gtk/overlaystep.py: - * flumotion/admin/gtk/shout2steps.py: - * flumotion/component/encoders/*/wizard_gtk.py: - * flumotion/job/job.py: - * flumotion/test/test_wizard_save.py: - * flumotion/ui/icons.py: - * flumotion/ui/simplewizard.py: - * flumotion/wizard/*: - Move the rest of the files out of wizard/ and into - flumotion/admin - -2008-08-20 Johan Dahlin - - * flumotion/component/converters/overlay/overlay.py - (Overlay.configure_pipeline): Remove extra text argument which - shouldn't be sent in to the logotype warning - -2008-08-20 Johan Dahlin - - * flumotion/ui/wizard.py (SectionWizard.updateButtons): Do not require - an anchor for the help button to be clickable - -2008-08-20 Johan Dahlin - - * data/glade/sectionwizard.glade: - Move help to the left side. Fixes #826 - -2008-08-20 Murray Cumming - - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/scenarios.py: Used the new docSection IDs - for the online help. - -2008-08-18 Johan Dahlin - - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/admin/gtk/workerlist.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/worker.py: - Move the workerlist to flumotion/admin/gtk - -2008-08-13 Johan Dahlin - - * flumotion/wizard/__init__.py: - More backwards compatibility - -2008-08-13 Johan Dahlin - - * flumotion/component/converters/overlay/genimg.py: - * flumotion/component/converters/overlay/overlay.py: - Rewrite and simplify the overlay image routines. Add a new - error message when the logos overflow. - Fixes #1062 - -2008-08-13 Thomas Vander Stichele - - * flumotion/common/messages.py: - Put back two translatable classes for compatibility reasons, so - trunk code can connect to platform-3 managers. - -2008-08-12 Thomas Vander Stichele - - * flumotion/admin/command/common.py: - * flumotion/admin/command/component.py: - * flumotion/admin/command/main.py: - * flumotion/admin/command/worker.py: - managerDeferred->loginDeferred - adminModel->medium - More generic variable names for subclassing. - -2008-08-12 Thomas Vander Stichele - - * configure.ac: - Final renames. - -2008-08-12 Thomas Vander Stichele - - * bin/flumotion-command.in: - * flumotion/admin/command/main.py: - Final renames. - -2008-08-12 Thomas Vander Stichele - - * bin/Makefile.am: - * flumotion.spec.in: - * flumotion/admin/command/Makefile.am: - * bin/flumotion-command.in (added): - * bin/flumotion-admin-command.in (deleted): - Rename. - -2008-08-12 Thomas Vander Stichele - - * bin/flumotion-admin-command.in: - * flumotion/admin/command/main.py (added): - * flumotion/admin/command/mains.py (deleted): - Rename module. - -2008-08-12 Thomas Vander Stichele - - * bin/Makefile.am: - * configure.ac: - * flumotion.spec.in: - * flumotion/admin/command/Makefile.am: - * bin/flumotion-command.in (deleted): - * flumotion/admin/command/commands.py (deleted): - * flumotion/admin/command/main.py (deleted): - Delete old flumotion-command. - -2008-08-12 Thomas Vander Stichele - - * bin/flumotion-admin-command.in (added): - Add main binary. - -2008-08-12 Thomas Vander Stichele - - * bin/Makefile.am: - * bin/flumotion-admin-command: - * configure.ac: - * flumotion/admin/command/common.py (added): - * flumotion/admin/command/worker.py (added): - * flumotion/admin/command/manager.py (added): - * flumotion/admin/command/component.py (added): - * flumotion/admin/command/mains.py (added): - * flumotion/admin/command/Makefile.am: - Add new flumotion-admin-command, better abstracted, and using command - class. This will replace flumotion-command. - Closes #725. - -2008-08-12 Johan Dahlin - - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/wizard/conversionsteps.py: - Remember the muxer, audio and video encoders when switching - pages. The wizard steps are not persistent, so store - the persistent bits in the wizard itself instead. - Fixes #1095 - -2008-08-12 Johan Dahlin - - * flumotion/wizard/__init__.py: - Provide BW compat until we updated and rebuilt all - external packages. - -2008-08-12 Johan Dahlin - - * data/glade/overlay-wizard.glade: Add a tooltip for the - show logo checkbutton. Fixes #1094 - -2008-08-11 Johan Dahlin - - * flumotion/wizard/Makefile.am (flumotion_PYTHON): - And remove configurationwizard.py from here. - -2008-08-11 Johan Dahlin - - * flumotion/admin/Makefile.am (SUBDIRS): Add assistant here too, - this should fix distcheck. - -2008-08-11 Johan Dahlin - - * data/glade/sectionwizard.glade: - * flumotion/admin/assistant/interfaces.py: - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/gtk/addformatassistant.py: - * flumotion/admin/gtk/addformatwizard.py: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/configurationassistant.py: - * flumotion/test/test_public_ui_api.py: - * flumotion/test/test_wizard.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/scenarios.py: - Rename configurationwizard and move it to f/admin/gtk. - Rename addformatwizard too. - -2008-08-11 Johan Dahlin - - * configure.ac: - * flumotion/admin/assistant/Makefile.am: - * flumotion/admin/assistant/__init__.py: - * flumotion/admin/assistant/configurationwriter.py: - * flumotion/admin/assistant/interfaces.py: - * flumotion/admin/assistant/models.py: - * flumotion/admin/assistant/save.py: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/component/encoders/dirac/wizard_gtk.py: - * flumotion/component/encoders/jpeg/wizard_gtk.py: - * flumotion/component/encoders/mulaw/wizard_gtk.py: - * flumotion/component/encoders/smoke/wizard_gtk.py: - * flumotion/component/encoders/speex/wizard_gtk.py: - * flumotion/component/encoders/theora/wizard_gtk.py: - * flumotion/component/encoders/vorbis/wizard_gtk.py: - * flumotion/component/plugs/cortado/wizard_gtk.py: - * flumotion/component/producers/audiotest/wizard_gtk.py: - * flumotion/component/producers/bttv/wizard_gtk.py: - * flumotion/component/producers/firewire/wizard_gtk.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/videotest/wizard_gtk.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/test/test_wizard_models.py: - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/configurationwriter.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/diskersteps.py: - * flumotion/wizard/httpstreamersteps.py: - * flumotion/wizard/interfaces.py: - * flumotion/wizard/models.py: - * flumotion/wizard/ondemandstep.py: - * flumotion/wizard/overlaystep.py: - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/save.py: - * flumotion/wizard/scenarios.py: - * flumotion/wizard/shout2steps.py: - Rename and move the non gtk parts of the configuration wizard to - admin/assistant. - -2008-08-08 Murray Cumming - - * flumotion/component/*/*.xml: Minor grammar and spelling corrections - for the descriptions, so they look nicer in the reference section of - the documentation. - This time without the unicode character. - -2008-08-08 Murray Cumming - - * flumotion/component/*/*.xml: Reverted my last commit, while I find - out where I introduced a problematic unicode character. - -2008-08-08 Murray Cumming - - * flumotion/component/*/*.xml: Minor grammar and spelling corrections - for the descriptions, so they look nicer in the reference section of - the documentation. - -2008-08-06 Murray Cummin - - * data/glade/ondemand-wizard.glade: Corrected an it's to its. - -2008-08-06 Johan Dahlin - - * flumotion/admin/gtk/addformatwizard.py: - Set the title for this wizard to avoid duplicated title strings. - Fixes #1012 - -2008-08-06 Johan Dahlin - - * flumotion/ui/wizard.py: - Remove some internal validation checks which are no longer valid, - which makes the wizard behave properly even when you do extensive - back/forward:ing. - Fixes #1048. - -2008-08-05 Thomas Vander Stichele - - * flumotion/common/documentation.py: - Add a method to annotate a message with information on how to - install a Python module, linking to the manual. - * flumotion/component/consumers/disker/disker.py: - Use it. - * po/POTFILES.in: - Add documentation.py for translation. - * po/nl.po: - Translate these strings in Dutch so I can test. - -2008-08-05 Johan Dahlin - - * flumotion/wizard/consumptionsteps.py - (ConsumptionStep.haveHTTP): New method - * flumotion/wizard/scenarios.py (LiveScenario.save): - Only set porters if we're adding a http stream. - Fixes #1107. - -2008-08-05 Johan Dahlin - - * flumotion/ui/fileselector.py: - Add a getDirectory method and use it from - the getFilename method. This will have - - * flumotion/wizard/diskersteps.py: - Move the registerVFSJelly from here to the fileselector. - - * data/glade/disker-wizard.glade: - * flumotion/wizard/ondemandstep.py: - Use the file selector for the disker. - Fixes #1054. - -2008-08-05 Thomas Vander Stichele - - * common/pep8.py (added): - * misc/pep8.py (deleted): - * Makefile.am: - * common/Makefile.am: - Used in other projects, so should go in common. - * common/common.mk: - Don't check built .py files, check their .in counterparts in srcdir. - -2008-08-05 Johan Dahlin - - * flumotion/configure/installed.py.in: - Use variables everywhere, to avoid using more than 79 characters - when building in buildbot. - -2008-08-05 Johan Dahlin - - * Makefile.am: - dist misc/pep8.py - -2008-08-05 Johan Dahlin - - * flumotion/wizard/diskersteps.py: - Capitalize, reorder - -2008-08-04 Johan Dahlin - - * flumotion/common/vfs.py: - * flumotion/common/vfsgio.py: - * flumotion/common/vfsgnome.py: - * flumotion/ui/fileselector.py: - Unbreak the fileselector. Make the GIO backend work as good - as the GnomeVFS one. Show '..' in the gnomevfs backend instead - of /. Fixes #1079. - -2008-08-04 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: - Include Flumotion: in the tray message. - -2008-08-04 Johan Dahlin - - * configure.ac: Avoid brackets around parameter to - AS_VERSION - -2008-08-04 Johan Dahlin - - * configure.ac: Send in package and version to AC_INIT instead - of AM_INIT_AUTOMAKE. Add M4 defines for version components, - so we don't have to duplicate the numbers. - Add -Wno-portability, to avoid automake warnings when generating - Makefiles. - -2008-08-04 Johan Dahlin - - * flumotion/admin/gtk/message.py: - * flumotion/common/messages.py: - * flumotion/wizard/configurationwizard.py: - Add an api to disable the timestamps in the messageview. - Move getattr hacks to the Message class itself, add two - new methods to encapsulate them. - Disable timestamps for the messageview in the wizard. - Fixes #1088 - -2008-08-04 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: - Listen to key presses on the window and quite if control-w - is pressed. Fixes #1074 - -2008-08-04 Thomas Vander Stichele - - * flumotion/common/common.py: - If we have versionTupleToString, we should have the reverse here - too. - * flumotion/manager/manager.py: - Use versionStringToTuple. - Since version in the config is tied to the project, not core - Flumotion, check if the given project actually exists, and - then check the component's configured version against the project - version. - -2008-08-04 Thomas Vander Stichele - - * common/common.mk: - pep8-check the flumotion subdirectories, not cache and friends. - -2008-08-04 Thomas Vander Stichele - - * flumotion/project/project.py: - Allow getting variables from core flumotion, to avoid having - to special-case code everywhere. - -2008-08-04 Thomas Vander Stichele - - * common/common.mk: - set FLU_PROJECT_PATH when checking registry. - -2008-08-03 Thomas Vander Stichele - - * misc/flu.unstable.stable.modules: - * misc/flu.unstable.unstable.modules: - Update the others too. - Might consider putting glib/gtk+/pygtk in unstable.unstable. - -2008-08-03 Thomas Vander Stichele - - * misc/flu.stable.stable.modules: - Update. - -2008-08-01 Johan Dahlin - - * Makefile.am: - Remove trailing : - * common/common.mk: - Also run it on all files in the sourcedir, in case - they are not the same - -2008-08-01 Johan Dahlin - - * Makefile.am: - * common/common.mk: - Add check-local-pep8 which runs the pep8.py script - on all python files in the tree - * misc/pep8.py: - Return a non-zero exit code if there were any errors - found - -2008-08-01 Johan Dahlin - - * *.py: make flumotion pep-8 clean, try two - - whitespace only changes were accidentially not - included - - installed.py/uninstalled.py that were generated - are now updated - - cortado_location.py is pep8 clean now aswell. - -2008-08-01 Johan Dahlin - - * *.py: make flumotion pep-8 clean - -2008-08-01 Thomas Vander Stichele - - * Makefile.am: - * common/Makefile.am: - * conf/Makefile.am: - * misc/validate-config.py (deleted): - * common/validate-config.py (added): - Move to common since we want to use it in other projects. - Change to setup package path so we can use it in other projects. - * common/common.mk: - Remove check-local target since it can't be overridden properly. - -2008-08-01 Thomas Vander Stichele - - * flumotion/common/registry.py: - Write out the registry with _description tags. - * flumotion/test/test_registry.py: - Update tests for new _description attribute. - -2008-07-31 Johan Dahlin - - * *.py: - Replace ",)" with ", )", according to PEP-8, - removes a couple of 100 warnings spotted by - pep8.py - -2008-07-31 Johan Dahlin - - * data/glade/httpstreamer-wizard.glade: - The mount point entry on the streamer page should be wider. - Fixes #1102. - -2008-07-31 Johan Dahlin - - * flumotion/component/producers/videotest/wizard.glade: - * flumotion/component/producers/videotest/wizard_gtk.py: - * flumotion/test/test_wizard_save.py: - Remove YUV/RGB combo from video test src page in the wizard - Fixes #1091. - -2008-07-31 Johan Dahlin - - * data/Makefile.am: - * data/image/Makefile.am: - * flumotion/admin/gtk/dialogs.py: - * flumotion/ui/icons.py: - * flumotion/ui/simplewizard.py: - * flumotion/ui/trayicon.py: - * flumotion/ui/wizard.py: - Update the icons, use the flumotion icon everywhere. - -2008-07-31 Thomas Vander Stichele - - * Makefile.am: - pychecker more. - * flumotion/monitor/nagios/process.py: - Fix a pychecker complaint. - -2008-07-31 Thomas Vander Stichele - - * flumotion/common/registry.py: - Also handle _description for compound-property. - * flumotion/component/bouncers/bouncer.xml: - * flumotion/component/bouncers/htpasswdcrypt.xml: - * flumotion/component/bouncers/icalbouncer.xml: - * flumotion/component/bouncers/ipbouncer.xml: - * flumotion/component/bouncers/saltsha256.xml: - * flumotion/component/bouncers/tokentest.xml: - * flumotion/component/combiners/composite/composite.xml: - * flumotion/component/combiners/switch/switch.xml: - * flumotion/component/consumers/disker/disker.xml: - * flumotion/component/consumers/gdp/gdp.xml: - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - * flumotion/component/consumers/preview/preview.xml: - * flumotion/component/consumers/shout2/shout2.xml: - * flumotion/component/converters/overlay/overlay.xml: - * flumotion/component/converters/pipeline/pipeline.xml: - * flumotion/component/encoders/dirac/dirac.xml: - * flumotion/component/encoders/jpeg/jpeg.xml: - * flumotion/component/encoders/mulaw/mulaw.xml: - * flumotion/component/encoders/smoke/smoke.xml: - * flumotion/component/encoders/speex/speex.xml: - * flumotion/component/encoders/theora/theora.xml: - * flumotion/component/encoders/vorbis/vorbis.xml: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/misc/porter/porter.xml: - * flumotion/component/misc/repeater/repeater.xml: - * flumotion/component/muxers/muxers.xml: - * flumotion/component/plugs/cortado/cortado.xml: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/component/producers/gdp/gdp.xml: - * flumotion/component/producers/icecast/icecast.xml: - * flumotion/component/producers/ivtv/ivtv.xml: - * flumotion/component/producers/looper/looper.xml: - * flumotion/component/producers/pipeline/pipeline.xml: - * flumotion/component/producers/playlist/playlist.xml: - * flumotion/component/producers/rtsp/rtsp.xml: - * flumotion/component/producers/screencast/screencast.xml: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/component/producers/unixdomain/unixdomain.xml: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/component/producers/webcam/webcam.xml: - Fix deprecation of all description tags. Let's get - translating! - -2008-07-31 Thomas Vander Stichele - - * flumotion/admin/admin.py: - implement bundleErrback to correctly handle typical potential - problems with untrusted code nicely. - * flumotion/admin/gtk/componentview.py: - Use it. Properly mark some exceptions as handled so we only get - one message about them. - -2008-07-31 Thomas Vander Stichele - - * flumotion/admin/gtk/componentview.py: - Clean up docstrings. - -2008-07-31 Thomas Vander Stichele - - * flumotion/component/base/eatersnode.py: - Fix docstring. - -2008-07-31 Thomas Vander Stichele - - * flumotion/common/registry.py: - Use _description for components and properties, so they are properly - extracted for translation. - Add a DeprecationWarning when using the untranslatable description - attribute, but still work. - -2008-07-30 Johan Dahlin - - * flumotion/common/bugreporter.py: - * flumotion/common/bundle.py: - * flumotion/common/bundleclient.py: - * flumotion/common/common.py: - * flumotion/common/componentui.py: - pep8.py:ify - -2008-07-30 Johan Dahlin - - * misc/pep8.py: - Add a script which checks PEP-8 compilance. - -2008-07-30 Johan Dahlin - - * flumotion/common/avltree.py: - * flumotion/common/boot.py: - PEP-8 compilance, run the pep8.py script over this file. - -2008-07-30 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: - Add a Help->Contents menu which launches gnome-help. - Fixes #1076. - -2008-07-30 Thomas Vander Stichele - - * flumotion.spec.in: - python-iCalendar is completely optional, not required. - -2008-07-30 Johan Dahlin - - * data/glade/sectionwizard.glade: - * flumotion/common/documentation.py: - * flumotion/common/planet.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/manager/manager.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/scenarios.py: - Add a help button to the wizard. - Add docSection/docAnchor/docVersion class variables for the - WizardSteps, add a couple of annotations. - Export a version state variable over pb for the flumotion - admin client to use. - Add a new API for creating a link based on just section/anchor/version, - which does not require a message. - Fixes #826 - -2008-07-30 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - Change the message about maximum clients to something more - friendly, and link to the documentation. Worked on the first - try, whee! - -2008-07-30 Thomas Vander Stichele - - * conf/Makefile.am: - * conf/examples/ipbouncer.xml (added): - * conf/examples/bouncer.xml (added): - Add two examples that use bouncers for stream authentication. - The first uses a htpasswdcrypt-bouncer, the second an ip bouncer. - -2008-07-30 Thomas Vander Stichele - - * flumotion/common/registry.py: - Complain when the type of a property is not in the list of - accepted types. - * flumotion/component/bouncers/ipbouncer.xml: - * flumotion/component/producers/playlist/playlist.xml: - Fix the two registry files that wrongly used boolean instead of - bool. - -2008-07-30 Johan Dahlin - - * data/make-dummy-cert: Return 1 if we failed to generate - the pem file, which probably means that the openssl binary - is not installed. - * flumotion/service/service.py (Servicer.createManager): - Send in the full path to the generated .pem file if we could - generate it successfully. - Fixes #1020 - -2008-07-30 Johan Dahlin - - Update the fluendo logs to use the 'new' flumotion logo. - Logos contributed by Eduardo Aquino. - Fixes #1057 - -2008-07-29 Sebastien Merle - - * flumotion/common/process.py: - Changed back the _daemonize function to daemonize, - because it's used by external projects (ft). - -2008-07-29 Johan Dahlin - - * flumotion/wizard/consumptionsteps.py: - Only show shoutcast2 streams for ogg and mp3 content. - Fixes #1059 - -2008-07-28 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: - Do not run the configuration wizard if there are lost components. - Fixes #1066 - -2008-07-28 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: - Do not make it possible to run methods accessing the admin model - before the wizard has connected to a server. - Fixes #1075 - -2008-07-28 Johan Dahlin - - * flumotion/test/test_wizard.py: - * flumotion/ui/wizard.py: - Add wizard.getSteps(). Refactor wizard/sidebar to use it internally. - Document it and use it in the tests. - -2008-07-26 Thomas Vander Stichele - - * flumotion/wizard/productionsteps.py: - Fix tooltips. - -2008-07-26 Thomas Vander Stichele - - * common/validate-registry.py: - Fail if there are undocumented components or properties. - * flumotion/component/bouncers/bouncer.xml: - * flumotion/component/bouncers/icalbouncer.xml: - * flumotion/component/combiners/switch/switch.xml: - * flumotion/component/consumers/disker/disker.xml: - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - * flumotion/component/consumers/shout2/shout2.xml: - * flumotion/component/encoders/vorbis/vorbis.xml: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/misc/porter/porter.xml: - * flumotion/component/misc/repeater/repeater.xml: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/icecast/icecast.xml: - * flumotion/component/producers/ivtv/ivtv.py: - * flumotion/component/producers/ivtv/ivtv.xml: - * flumotion/component/producers/rtsp/rtsp.xml: - * flumotion/component/producers/unixdomain/unixdomain.xml: - * flumotion/component/producers/webcam/webcam.xml: - Document properties and components. - Fixes #1069 in 1.5 of the 6 estimated hours. - -2008-07-26 Thomas Vander Stichele - - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/encoders/theora/theora.xml: - If nobody understands the keyframe-threshold property then it - shouldn't even be exposed. - -2008-07-26 Thomas Vander Stichele - - * flumotion/common/messages.py: - deprecate id= keyword arg in favor of mid= - * flumotion/component/base/baseadminnode.py: - * flumotion/component/combiners/switch/patternswitch.py: - * flumotion/component/component.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/muxers/checks.py: - * flumotion/component/producers/bttv/wizard_gtk.py: - * flumotion/component/producers/checks.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/firewire/wizard_gtk.py: - * flumotion/component/producers/gdp/gdp.py: - * flumotion/component/producers/looper/looper.py: - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/worker/checks/check.py: - * flumotion/worker/checks/encoder.py: - Follow through. - -2008-07-26 Thomas Vander Stichele - - * flumotion/component/producers/bttv/wizard_gtk.py: - * flumotion/component/producers/firewire/wizard_gtk.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/worker/checks/audio.py: - * flumotion/worker/checks/video.py: - Change id to mid on all worker checks. - -2008-07-25 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/component/base/scheduler.py: - Doc fixes. - -2008-07-25 Thomas Vander Stichele - - * flumotion/test/test_wizard.py: - Mark test as skip instead. - -2008-07-25 Thomas Vander Stichele - - * flumotion/admin/gtk/message.py: - Override previous messages with the same id. - * flumotion/worker/checks/check.py: - * flumotion/worker/checks/gst010.py: - Make sure the message id is passed on so it can be overridden. - Fixes #1061. - -2008-07-25 Thomas Vander Stichele - - * flumotion/test/test_wizard.py: - * flumotion/ui/wizard.py: - Fix Johan's build breakage. - -2008-07-25 Thomas Vander Stichele - - * flumotion/admin/gtk/message.py: - Fix typo. Fixes #1077. - -2008-07-25 Thomas Vander Stichele - - * doc/random/styleguide: - * flumotion/component/base/eatersnode.py: - * flumotion/component/base/feedersnode.py: - * flumotion/component/eater.py: - * flumotion/component/feeder.py: - * flumotion/test/test_component_feeder.py: - Fix uiState key naming to be lowercase-hyphenated. - feeder uiState: - - clientId -> client-id - - bytesReadCurrent -> bytes-read-current - - bytesReadTotal -> bytes-read-total - - lastConnect -> last-connect - - lastDisconnect -> last-disconnect - - lastActivity -> last-activity - - buffersDroppedCurrent -> buffers-dropped-current - - buffersDroppedTotal -> buffers-dropped-total - eater uiState: - - eaterAlias -> eater-alias - - eaterName -> eater-name - - lastConnect -> last-connect - - lastDisconnect -> last-disconnect - - totalConnections -> total-connections - - countTimestampDiscont -> count-timestamp-discont - - countOffsetDiscont -> count-offset-discont - - totalTimestampDiscont -> total-timestamp-discont - - totalOffsetDiscont -> total-offset-discont - eater uiState, connection dict: - - feedId -> feed-id - - timeTimestampDiscont -> time-timestamp-discont - - timestampTimestampDiscont -> timestamp-timestamp-discont - - lastTimestampDiscont -> last-timestamp-discont - - totalTimestampDiscont -> total-timestamp-discont - - countTimestampDiscont -> count-timestamp-discont - - timeOffsetDiscont -> time-offset-discont - - offsetOffsetDiscont -> offset-offset-discont - - lastOffsetDiscont -> last-offset-discont - - totalOffsetDiscont -> total-offset-discont - - countTimestampDiscont -> count-offset-discont - Fixes #1031. - -2008-07-25 Johan Dahlin - - * data/glade/sectionwizard.glade: - * flumotion/ui/Makefile.am: - * flumotion/ui/sidebar.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/configurationwizard.py: - Move the wizard sidebar into the wizard.py file. - Move all logic step/section/stack logic from the SectionWizard - class into the sidear. This is an incremental change in the - process of making the sidebars implementation nicer. - -2008-07-25 Johan Dahlin - - * flumotion/wizard/consumptionsteps.py - (ConsumptionStep._getSteps): - Set the bandwidth_limit to a float instead of an int - to make kiwi happy. - -2008-07-25 Johan Dahlin - - * flumotion/extern/exceptiondialog.py - (TracebackViewer._showException): scroll to the end - -2008-07-25 Johan Dahlin - - * flumotion/admin/gtk/main.py: - * flumotion/common/Makefile.am: - * flumotion/common/bugreporter.py: - Move the non-UI bits of the bug reporter to - a separate file in flumotion.common. - -2008-07-25 Johan Dahlin - - * flumotion/admin/gtk/main.py: - use trac syntax, add filename revisions - * flumotion/configure/configure.py: - add branchName - * flumotion/extern/exceptiondialog.py: - add new api to fetch all involved filenames, - refactor to avoid some duplication - -2008-07-24 Arek Korbik - - * flumotion/admin/gtk/dialogs.py: - Keep authors sorted by last name. - -2008-07-24 Johan Dahlin - - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/consumptionsteps.py: - Fix a typo in the bandwidth saving logic, add a test. - -2008-07-24 Thomas Vander Stichele - - * data/glade/scenario-wizard.glade: - * flumotion/wizard/scenarios.py: - Rephrase the scenario page a little. - -2008-07-24 Jordi Massaguer i Pla - - * po/ca.po: - Translations updated. - -2008-07-24 Johan Dahlin - - * flumotion/admin/gtk/main.py: - * flumotion/extern/Makefile.am: - * flumotion/extern/exceptiondialog.py: - Add an ExceptionDialog which is used to display an error message - when an handled exception occurs. Hook it up with the - gtk admin client. - -2008-07-24 Johan Dahlin - - * flumotion/component/effects/volume/admin_gtk.py: check if the - label is None before trying to call a method on it. - -2008-07-24 Pedro Gracia - - * flumotion/admin/gtk/dialogs.py: - Add Jordi and myself in authors. - -2008-07-24 Sebastien Merle - - reviewed by: Johan Dahlin - - * flumotion/admin/gtk/componentlist.py: - Fix the behavior of the component list right-click context menu - to keep current selection if done on a select component. - -2008-07-24 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: - Add back kill component in context menu, fixes #1064 - -2008-07-23 Arek Korbik - - * flumotion/admin/gtk/componentlist.py (ComponentList.stateSet): - Update PID dynamically, too. Fixes #993. - -2008-07-23 Johan Dahlin - - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/overlaystep.py: - Change the default overlay text to Flumotion, update tests. - -2008-07-22 Thomas Vander Stichele - - * data/glade/production-wizard.glade: - * data/glade/select-producers-wizard.glade: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/videotest/videotest.xml: - Use producer, not source. - -2008-07-22 Thomas Vander Stichele - - * data/glade/Makefile.am: - Add a missing glade file. - -2008-07-22 Johan Dahlin - - * data/glade/summary-wizard.glade: - it should be Finish instead of Apply. - -2008-07-22 Thomas Vander Stichele - - * flumotion/configure/uninstalled.py.in: - Find writable build dir by looking at srcdir, not cwd. - Fixes distcheck for depending projects. - -2008-07-22 Pedro Gracia - - * flumotion/common/i18n.py: - Return untranslated singular strings with or - without arguments. - -2008-07-22 Johan Dahlin - - * flumotion/admin/gtk/componentlist.py: - * flumotion/common/pygobject.py: - Remove with_construct_properties and the last remaining callsite - -2008-07-22 Thomas Vander Stichele - - * flumotion.spec.in: - Add gettext as buildrequires because intltool doesn't pull it in. - -2008-07-21 Pedro Gracia - - * flumotion/common/i18n.py: - * flumotion/test/test_i18n.py: - Return untranslated strings (singular and plural) - with or without arguments ok. - -2008-07-21 Johan Dahlin - - * flumotion/common/vfs.py: - * flumotion/test/test_common_vfs.py: - simplify imports, try to instantiate a directory to see - if we get an import error or not, since this all changed - due to pychecker, sigh. - -2008-07-21 Jordi Massaguer i Pla - - * flumotion.spec.in: - Added pygtk2-libglade and python-dateutil packages. - -2008-07-21 Johan Dahlin - - * flumotion/common/vfsgio.py: - * flumotion/common/vfsgnome.py: - Add keepgoing and move the imports to scopes, this should - fix buildbot on machines which lacks gnomevfs or gio - -2008-07-21 Jordi Massaguer i Pla - - * flumotion.spec.in: - Added python-twisted-conch and python-iCalendar as Requires and - BuildRequires. - -2008-07-21 Johan Dahlin - - * flumotion/common/errors.py: - * flumotion/common/vfs.py: - * flumotion/common/vfsgio.py: - * flumotion/common/vfsgnome.py: - Remove MissingDependencyError in favor of just ImportError. - -2008-07-21 johan dahlin - - * data/glade/ondemand-wizard.glade: - * flumotion/common/Makefile.am: - * flumotion/common/errors.py: - * flumotion/common/interfaces.py: - * flumotion/common/vfs.py: - * flumotion/common/vfsgio.py: - * flumotion/common/vfsgnome.py: - * flumotion/configure/configure.py: - * flumotion/manager/worker.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_common_vfs.py: - * flumotion/ui/Makefile.am: - * flumotion/ui/fileselector.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/ondemandstep.py: - * flumotion/worker/medium.py: - Add a file selector dialog to the on demand step. - Add a vfs framework with two backends (gnomevfs and gio), - add tests and documentation. Fixes #1050 - -2008-07-18 Thomas Vander Stichele - - * flumotion/admin/connections.py: - * flumotion/common/common.py: - * flumotion/common/fraction.py: - Doc string fixes. - -2008-07-18 Thomas Vander Stichele - - * data/glade/debug-marker.glade: - Fix string. - * po/POTFILES.in: - Add for translation. - * po/POTFILES.skip (added): - Don't scan i18n.py - -2008-07-18 Thomas Vander Stichele - - * po/POTFILES.in: - Fix up for file->httpfile rename. - -2008-07-18 Johan Dahlin - - * configure.ac: - set BINDIR, so it gets properly expanded in installed.py - - * flumotion/test/test_greeter.py (WizardTest.testGreeter): - Going prev/next unselected the previously selected option, - workaround that by selecting the option we want again. - -2008-07-18 Thomas Vander Stichele - - * flumotion/test/gtkunit.py: - Assert more verbosely. - -2008-07-17 Johan Dahlin - - * flumotion/component/producers/bttv/wizard_gtk.py - (TVCardStep._clearCombos): channel and norm was swapped. - Rename norm to signal. Found by Rozstrojenie Jazni. - - * flumotion/admin/gtk/adminwindow.py - (AdminWindow._componentSelectionChanged): - It's compSet instead of _compSet. Now why didn't pychecker find this? - -2008-07-16 Johan Dahlin - - * flumotion/configure/configure.py: - Document and avoid magic/locals() usage. - -2008-07-16 Murray Cumming - - * data/glade/production-wizard.glade: - * data/glade/select-producers-wizard.glade: - * data/glade/summary-wizard.glade: - * flumotion/component/producers/bttv/wizard_gtk.py - (TVCardStep._runChecks): - * flumotion/component/producers/soundcard/soundcard.py - (Soundcard.configure_pipeline): - * flumotion/component/producers/soundcard/wizard_gtk.py - (SoundcardStep._updateInputs): - * flumotion/component/producers/webcam/wizard_gtk.py - (WebcamStep._runChecks): - * flumotion/test/test_i18n.py (TranslatorTest.testTranslateMessage): - * flumotion/wizard/diskersteps.py (DiskBothStep): - * flumotion/wizard/httpstreamersteps.py (HTTPBothStep): - * flumotion/wizard/shout2steps.py (Shout2BothStep): Minor English - corrections for translated strings. - -2008-07-15 Jordi Massaguer i Pla - - * flumotion/test/test_component_base_scheduler.py - replaced asserts for asserts that are available on previous - versions of twisted. - -2008-07-15 Jordi Massaguer i Pla - - * flumotion/test/test_component_base_scheduler.py: - replaced asserts for asserts that are available on previous - versions of twisted. - -2008-07-15 Jordi Massaguer i Pla - - * flumotion/common/Makefile.am: added eventcalendar - * flumotion/test/Makefile.am: added test_component_base_vevent - -2008-07-15 Jordi Massaguer i Pla - - * flumotion/test/Makefile.am: - added the ics files. - -2008-07-15 Jordi Massaguer i Pla - - * flumotion/test/test-exdate.ics: - * flumotion/test/test-google.ics: - They are needed for some tests and were missing. - -2008-07-15 Jordi Massaguer i Pla - - * flumotion/common/eventcalendar.py: - Added the datetime namespace. - * flumotion/component/base/scheduler.py: - renamed type to which as type was shadowing a builtin. - -2008-07-15 Jordi Massaguer i Pla - - * flumotion/component/base/scheduler.py: - rename type to which as type was shadowing a builtin. - -2008-07-14 Jordi Massaguer i Pla - - * flumotion/common/eventcalendar.py: Fixed docstring of Point._init - -2008-07-14 Jordi Massaguer i Pla - - * flumotion/common/eventcalendar.py: - Changed import order. - -2008-07-14 Jordi Massaguer i Pla - - * flumotion/admin/rrdmon/rrdmon.py: - * flumotion/common/eventcalendar.py: - * flumotion/component/base/scheduler.py: - * flumotion/component/bouncers/icalbouncer.py: - * flumotion/component/combiners/switch/switch.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/test/test_component_base_scheduler.py: - * flumotion/test/test_component_base_vevent.py: - Extracted event and calendar code from scheduler to eventcalendar. - Changed implementation so it handles better recur events and exdates. - More tests have been added in order to have coverage. - -2008-07-14 Thomas Vander Stichele - - * flumotion/test/test_manager_manager.py: - Fix another set_ deprecation. - -2008-07-14 Thomas Vander Stichele - - * flumotion/common/messages.py: - Don't rename Warning just yet, suppress it. - * misc/pycheckerrc: - Enable warning about shadowing builtins. - -2008-07-14 Thomas Vander Stichele - - * flumotion/common/errors.py: - Suppress SystemError shadows builtin. - -2008-07-14 Thomas Vander Stichele - - * doc/random/tags: - add Python tags - * flumotion/common/python.py: - comment pychecker tag - * flumotion/admin/connections.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - add local pychecker suppression for P2.5 builtins - -2008-07-14 Thomas Vander Stichele - - * flumotion/twisted/flavors.py: - Deprecate set= kwarg, and add set_= kwarg as suggested by PEP-8. - * flumotion/admin/command/commands.py: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/componentlist.py: - * flumotion/admin/gtk/componentview.py: - * flumotion/admin/text/view.py: - * flumotion/common/planet.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/baseadminnode.py: - * flumotion/component/base/statewatcher.py: - * flumotion/test/test_common_planet.py: - * flumotion/test/test_flavors.py: - * flumotion/ui/trayicon.py: - Update callers. - -2008-07-14 Thomas Vander Stichele - - * flumotion/test/test_component_httpserver.py: - Rename uses of file to httpfile. - -2008-07-14 Thomas Vander Stichele - - * flumotion/common/errors.py: - Deprecate errors.SystemError since it shadows Python's builtin. - Make errors.FatalError instead. - * flumotion/common/boot.py: - * flumotion/common/common.py: - * flumotion/common/process.py: - * flumotion/manager/main.py: - * flumotion/service/service.py: - * flumotion/worker/main.py: - Use errors.FatalError. - -2008-07-14 Thomas Vander Stichele - - * flumotion/twisted/flavors.py: - Don't shadow set. - -2008-07-14 Thomas Vander Stichele - - * flumotion/component/misc/httpserver/httpserver.xml: - Rename uses of file to httpfile. - -2008-07-14 Thomas Vander Stichele - - * flumotion/component/misc/httpserver/httpfile.py (added): - * flumotion/component/misc/httpserver/file.py (deleted): - renamed to not clash with file builtin. - * flumotion/component/misc/httpserver/Makefile.am: - * flumotion/component/misc/httpserver/httpserver.py: - Rename uses of file to httpfile. - -2008-07-14 Thomas Vander Stichele - - * flumotion/component/producers/playlist/playlistparser.py: - One more shadow cleanup. - -2008-07-14 Thomas Vander Stichele - - * flumotion/common/bundle.py: - * flumotion/common/common.py: - * flumotion/common/config.py: - * flumotion/common/dag.py: - * flumotion/common/debug.py: - * flumotion/common/package.py: - * flumotion/common/planet.py: - * flumotion/common/process.py: - * flumotion/common/registry.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/plug.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/twisted/flavors.py: - * flumotion/twisted/portal.py: - shadow cleanups - * flumotion/common/reload.py: - * flumotion/component/component.py: - rename reload to reloadFlumotion - -2008-07-14 Thomas Vander Stichele - - * flumotion/common/bundle.py: - * flumotion/component/base/eatersnode.py: - * flumotion/component/base/feedersnode.py: - * flumotion/component/bouncers/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - * flumotion/component/misc/httpserver/file.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/porter/porter.py: - * flumotion/component/producers/playlist/playlistparser.py: - * flumotion/manager/admin.py: - * flumotion/manager/base.py: - * flumotion/manager/config.py: - More shadow cleanups. - -2008-07-14 Thomas Vander Stichele - - * flumotion/common/python.py: - Just like we conditionally implement any, do the same for all - * flumotion/component/combiners/switch/switch.py: - Use it here. - * flumotion/wizard/consumptionsteps.py: - Rename any to pany; I'd prefer python.any but I'll defer until - after discussing with Johan. - -2008-07-14 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/common/common.py: - * flumotion/wizard/httpstreamersteps.py: - * flumotion/wizard/overlaystep.py: - * flumotion/wizard/ondemandstep.py: - Remove some builtin shadows. - -2008-07-05 Johan Dahlin - - * flumotion/worker/medium.py: Fixup imports and avoid - an unnecessary assignment. - -2008-07-04 Johan Dahlin - - * flumotion/component/misc/httpserver/Makefile.am (httpserver_DATA): - dist httpfile.glade too. - - * data/glade/httpstreamer-wizard.glade: - Do not hard code a width of the mount point entry - * flumotion/wizard/httpstreamersteps.py: - Include the muxer format in the url, so instead of 'audio-video' - it's now 'ogg-audio-video', to avoid collissions, part of #995 - - * flumotion/admin/gtk/addformatwizard.py: - * flumotion/wizard/configurationwizard.py: - Set a scenario for the format wizard and update the component - names of the scenario when the change if one is set, fixes - a regression in the add format wizard. - -2008-07-04 Johan Dahlin - - * flumotion/wizard/productionsteps.py: - Add back accidentally removed _() alias - -2008-07-03 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: - * flumotion/common/format.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - Always import N_ instead of defining it. - -2008-07-03 Johan Dahlin - - * flumotion/common/common.py: - * flumotion/common/connection.py: - * flumotion/common/keycards.py: - * flumotion/test/test_common.py: - Remove mergeImplements which has not been necessary since - zope.interface was added to twisted. - -2008-07-02 Johan Dahlin - - * flumotion/common/Makefile.am: - * flumotion/common/common.py: - * flumotion/common/poller.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/plug.py: - * flumotion/component/component.py: - * flumotion/component/padmonitor.py: - Move f.c.common.poller to a new file - called f.c.poller. Update callsites and Makefiles - -2008-07-02 Johan Dahlin - - * flumotion/common/common.py: - * flumotion/common/format.py: - * flumotion/component/consumers/disker/disker.py: - - Move f.c.common.strftime to f.c.format, update callsites - and add documentation. - -2008-07-02 Johan Dahlin - - * flumotion/common/avltree.py: - * flumotion/common/boot.py: - * flumotion/common/bundleclient.py: - * flumotion/common/common.py: - * flumotion/common/componentui.py: - * flumotion/common/config.py: - * flumotion/common/connection.py: - * flumotion/common/dag.py: - * flumotion/common/debug.py: - * flumotion/common/documentation.py: - * flumotion/common/enum.py: - * flumotion/common/errors.py: - * flumotion/common/fraction.py: - * flumotion/common/fxml.py: - * flumotion/common/gstreamer.py: - * flumotion/common/i18n.py: - * flumotion/common/identity.py: - * flumotion/common/interfaces.py: - * flumotion/common/keycards.py: - * flumotion/common/log.py: - * flumotion/common/managerspawner.py: - * flumotion/common/manhole.py: - * flumotion/common/medium.py: - * flumotion/common/messages.py: - * flumotion/common/mimetypes.py: - * flumotion/common/netutils.py: - * flumotion/common/options.py: - * flumotion/common/package.py: - * flumotion/common/planet.py: - * flumotion/common/process.py: - * flumotion/common/pygobject.py: - * flumotion/common/reflectcall.py: - * flumotion/common/registry.py: - * flumotion/common/reload.py: - * flumotion/common/server.py: - * flumotion/common/setup.py: - * flumotion/common/signals.py: - * flumotion/common/startset.py: - * flumotion/common/testsuite.py: - * flumotion/common/watched.py: - * flumotion/common/worker.py: - * flumotion/common/xmlwriter.py: - Update docstrings and reorganize imports, add - whitespace and some FIXME/notices. - -2008-07-02 Johan Dahlin - - * flumotion/admin/command/__init__.py: - * flumotion/admin/command/commands.py: - * flumotion/admin/command/main.py: - * flumotion/admin/command/utils.py: - * flumotion/admin/connections.py: - * flumotion/admin/gtk/__init__.py: - * flumotion/admin/gtk/addformatwizard.py: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/componentlist.py: - * flumotion/admin/gtk/componentview.py: - * flumotion/admin/gtk/connections.py: - * flumotion/admin/gtk/debugmarkerview.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/main.py: - * flumotion/admin/gtk/message.py: - * flumotion/admin/gtk/statusbar.py: - * flumotion/admin/multi.py: - * flumotion/admin/rrdmon/__init__.py: - * flumotion/admin/rrdmon/config.py: - * flumotion/admin/rrdmon/main.py: - * flumotion/admin/text/__init__.py: - * flumotion/admin/text/admin_text.py: - * flumotion/admin/text/connection.py: - * flumotion/admin/text/greeter.py: - * flumotion/admin/text/main.py: - * flumotion/admin/text/misc_curses.py: - * flumotion/admin/text/view.py: - Add toplevel docstrings and reorganize some imports. - -2008-07-02 Johan Dahlin - - * flumotion/admin/admin.py: - Write the connection to disk before emitting the - connected signal - * flumotion/admin/connections.py: - add a new function hasRecentConnections and refactor - the rest of the code so we can reuse part of the logic - from getRecentConnections. - Simplify getRecentConnections by unwindling unnecessary - list comprehensions - * flumotion/admin/gtk/adminwindow.py: - Disable the Open Recent Connection menu item when - there are no recent connections. - * flumotion/admin/gtk/connections.py: - Disable clear/clear all buttons when there are - no connections - * flumotion/admin/gtk/greeter.py: - Only show the recent connection option when - we actually have recent connections. - Fixes #1046 - -2008-07-02 Johan Dahlin - - * flumotion/admin/command/main.py: - * flumotion/admin/connections.py: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/connections.py: - * flumotion/admin/gtk/main.py: - * flumotion/admin/rrdmon/config.py: - * flumotion/admin/text/greeter.py: - * flumotion/monitor/nagios/main.py: - * flumotion/test/test_admin_connections.py: - Rename get_recent_connections to getRecentConnections. - Rename parsePBConnectionInfo to parsePBConnectionRecent. - Update callsites and their import statements to be consistent - -2008-06-30 Johan Dahlin - - * flumotion/component/producers/soundcard/wizard_gtk.py: - Don't use enum. Convert underscores to camelcase - -2008-06-29 Thomas Vander Stichele - - * common/epydoc.mk: - Try and get a hopefully unique DISPLAY number by calling getpid - and adding 10 (to stay out of the common 0-9 range). - -2008-06-29 Thomas Vander Stichele - - * common/epydoc.mk: - Clean Xvfb.pid - -2008-06-29 Arek Korbik - - * flumotion/extern/log/log.py (Loggable.writeMarker): Fix - docstring - please doc generator. - -2008-06-28 Arek Korbik - - * flumotion/manager/component.py: Make ComponentHeaven not - reconnect components' eaters unnecesarily when it detaches - components. Make getFeederAvatar() private again, as it - should be. Split _connectEatersAndFeeders into two parts and reuse. - - * flumotion/test/test_manager_component.py: Remove todo markers - - those tests should pass now. - -2008-06-28 Thomas Vander Stichele - - * configure.ac: - Check for Xvfb - * common/epydoc.mk: - Newer epydoc introspects, so we run a temporary Xvfb server - to handle gtk imports. - * flumotion.spec.in: - BuildRequire Xvfb. - -2008-06-27 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py - (AdminWindow._componentDo): Change the components so they - actually show up in the po files - -2008-06-27 Arek Korbik - - * flumotion/test/test_manager_component.py - (TestComponentHeaven.testAttachDetachLinear): add missing reset. - (TestComponentHeaven.testAttachDetachMultipleFeedersComplex): add - a more complex test with multiple feeders and eaters in the same - component. - -2008-06-27 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py - (AdminWindow._componentActivate): is unused, remove - -2008-06-26 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py (AdminWindow._runWizard): Add - missing space in error message. - -2008-06-26 Jordi Massaguer i Pla - - * po/ca.po: - Updated. - -2008-06-26 Johan Dahlin - - - * flumotion/admin/gtk/addformatwizard.py: Update the imports - after the last change. - -2008-06-25 Johan Dahlin - - * data/glade/Makefile.am: - * data/glade/production-wizard.glade: - * data/glade/scenario-wizard.glade: - * flumotion/ui/sidebar.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/ondemandstep.py: - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/scenarios.py: - * po/POTFILES.in: - Add a Scenario Wizard page, refactor the logic - to separate Scenario classes. Fixes #999 - -2008-06-25 Arek Korbik - - * flumotion/test/test_manager_component.py: Add testing of - component feed reconnections by ComponentHeaven. - -2008-06-24 Johan Dahlin - - * flumotion/test/test_parts.py: - (TestComponentsView.testCanNotStartWhenNoSelection) - (TestComponentsView.testCanNotStopWhenNoSelection): - Disable the last check as it we emit selection-changed in an idle now - - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/componentlist.py: - * flumotion/test/test_parts.py: - Do not reset the selection when a component starts/stops. - Rename update to clearAndRebuild to make it easier to understand - what's doing on. Update tests. Fixes #1033 - -2008-06-24 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: Clean up the - componentDo method which calls remote actions and updates the - statusbar. Add documentation, use plural gettext and make it - only display one string when updating multiple components. - - * flumotion/admin/gtk/componentlist.py: - (ComponentList._selectionChanged): Clean up the code to - set the selection and emit the selection-changed in an idle - for speed reasons. - - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/componentlist.py: - Transform the context menu into using GtkUIManager, reuse - the callbacks and logic already used for the menu/toolbar. - Fixes #1034 - -2008-06-23 Thomas Vander Stichele - - * flumotion/component/consumers/gdp/gdp.py: - Remove unused imports/symbols. - -2008-06-23 Johan Dahlin - - * data/glade/videotest.glade: - * flumotion/component/producers/bttv/wizard.glade: - * flumotion/component/producers/videotest/wizard.glade: - * flumotion/component/producers/webcam/wizard.glade: - Framerate -> Frame Rate. Fixes #1018 - -2008-06-23 Johan Dahlin - - * flumotion/admin/gtk/connections.py (Connections.grab_focus): Use - len() instead of relying on __nonzero__, avoids focus grabbing attempt - of non existing items. - - * data/glade/sectionwizard.glade: - * flumotion/ui/wizard.py: - Set a mnemonic for the Finish button, fixes #1032 - - * flumotion/component/encoders/speex/wizard_gtk.py: - * flumotion/component/producers/firewire/wizard_gtk.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/diskersteps.py: - * flumotion/wizard/shout2steps.py: - Add title for the rest of the wizard steps. - Do not translate the stepname in getStep. - Fixes #1015. - -2008-06-20 Thomas Vander Stichele - - * flumotion/component/consumers/preview/preview.py: - Use autovideosink instead. - -2008-06-20 Thomas Vander Stichele - - * configure.ac: - * flumotion/component/consumers/Makefile.am: - * flumotion/component/consumers/gdp (added): - * flumotion/component/consumers/gdp/gdp.py (added): - * flumotion/component/consumers/gdp/__init__.py (added): - * flumotion/component/consumers/gdp/Makefile.am (added): - * flumotion/component/consumers/gdp/gdp.xml (added): - Add a GDP consumer. - -2008-06-20 Thomas Vander Stichele - - * flumotion/component/producers/gdp/gdp.py: - Add error for http://bugzilla.gnome.org/show_bug.cgi?id=532364 - -2008-06-20 Thomas Vander Stichele - - * flumotion/launch/main.py: - Make sure errors are translated. - -2008-06-18 Thomas Vander Stichele - - * flumotion/admin/gtk/adminwindow.py: - Don't add a message twice, only add it when its component is - in the selection (Fixes bug in changeset [6707]). - -2008-06-16 Thomas Vander Stichele - - * flumotion/common/i18n.py: - Extract installGettext() from gtk.main; since this should be usable - from other commands. - * flumotion/admin/gtk/main.py: - Use it. - -2008-06-16 Thomas Vander Stichele - - * flumotion/monitor/nagios/main.py: - Short-circuit to end when usage/help of a subcommand got printed. - -2008-06-16 Thomas Vander Stichele - - * flumotion/common/common.py: - Mark a function for deprecation. - Assertion/debug fixes. - -2008-06-16 Thomas Vander Stichele - - * flumotion/wizard/configurationwizard.py: - Doc string cleanup. - -2008-06-10 Jordi Massaguer i Pla - - * flumotion/admin/gtk/Makefile.am: - Added debugmarkerview.py - -2008-06-06 Johan Dahlin - - * flumotion/admin/gtk/componentlist.py: - Remove the column header and label and reduce the size - of the icon to be 24x24 instead of 40x40. - Fixes #171 - -2008-06-05 Johan Dahlin - - * flumotion/component/base/Makefile.am: - Add properties.glade here - * po/POTFILES.in: - And newly added files here - -2008-06-05 Johan Dahlin - - * flumotion/admin/gtk/componentview.py: - * flumotion/component/base/Makefile.am: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/base.xml: - * flumotion/component/base/properties.glade: - * flumotion/component/base/propertiesnode.py: - Add a Properties Tab which is only visible in debug mode. - First part of #832 - -2008-06-05 Johan Dahlin - - * flumotion/component/base/component.glade: - * flumotion/component/base/componentnode.py: - Add component type to the UI, fixes #987 - -2008-06-05 Johan Dahlin - - * flumotion/component/producers/bttv/wizard_gtk.py - (TVCardStep.setup): Tweak last commit: avoid using a different - combobox mode, just set an empty string, prevents errors - when we get real values here. - - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/conversionsteps.py: - Do not call workerChanged each time a step is activated, - add a convinience method on the wizard to check if it didn't - change. Fixes #992 - -2008-06-05 Johan Dahlin - - * flumotion/component/producers/soundcard/wizard_gtk.py - (SoundcardStep._update_inputs.checkFailed): trap RemoteRunFailure - - * flumotion/admin/gtk/message.py (MessagesView.addMessage): - Reuse the firstButton - (MessagesView._sortMessages): Return the first button sorted - - * flumotion/component/producers/bttv/wizard.glade: Rename - tvnorm to signal. - - * flumotion/component/producers/bttv/wizard_gtk.py - (TVCardStep.setup): We need to call prefill() before adding - the widgets to the proxy - -2008-06-04 Johan Dahlin - - * flumotion/component/base/admin_gtk.py - (BaseAdminGtk.__init__): - Trap and filter out SleepingComponentError. - - * flumotion/component/effects/volume/admin_gtk.py - (VolumeAdminGtkNode.setUIState): - check can be None, when shutting down. - - * flumotion/admin/gtk/adminwindow.py: - Refactor and reuse the same error message when - cleaning the components from the toolbar too, not just - before running the wizard. - - * flumotion/admin/gtk/adminwindow.py: - Add an errback after cleaning the components and show - an error message if some components are busy. - - * data/glade/select-producers-wizard.glade: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/wizard/productionsteps.py: - Make sure that the select production step is only showing - necessary widgets when opened. - Only show checkbuttons and combos when needed. - -2008-06-04 Johan Dahlin - - * flumotion/ui/kiwipatches.py (FluLibgladeWidgetTree.__init__): - Do not require the view to have the gladeTypedict variable set. - - * flumotion/admin/gtk/adminwindow.py: - clean up debug marker api and location. - - * flumotion/admin/gtk/adminwindow.py: - (AdminWindow._createUI): Use kiwi GladeDelegate, make - statusbar private - - * flumotion/admin/gtk/adminwindow.py: - Rename internal variables and some internal methods to be easier - to read. Use show instead of show_all. - Call _updateComponents a bit more often. - - * flumotion/admin/gtk/componentview.py - (ComponentView._componentInactiveToUnset): check if - self._currentComponentState is None before using it to avoid - a shutdown race. - -2008-06-04 Jordi Massaguer i Pla - - * flumotion/extern/log/log.py: - * flumotion/manager/base.py: - Fixes #1013: Sent the debug marker to all components that have - an avatar. Refactor writeDebugMarker to use a table for the - methods instead of using a if/elif/else structure. - -2008-06-03 Jordi Massaguer i Pla - - reviewed by: Johan Dahlin - - * data/glade/debug-marker.glade: - New interface for sending a marker to the manager to write - it on the log. - * flumotion/admin/gtk/adminwindow.py: - Added a new action on the debug menu that opens a window for sending - a marker to the manager to write it on the log. - * flumotion/admin/gtk/debugmarkerview.py: - New interface for sending a marker to the manager to write it - on the log. - * flumotion/common/medium.py: - Added a new remote method that writes a marker to the logs. - * flumotion/extern/log/log.py: - Added a new method that writes a marker to the logs. - Added also new utility functions that gets the name and the int - of a debug level. - * flumotion/extern/log/test_log.py: - Tests the previous. - * flumotion/manager/base.py: - Added a new perspective methos to write a marker on the logs. - Fixes #979 - -2008-06-03 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py - (AdminWindow._runConfigurationWizard): Make it possible to close - the popup question dialog by clicking on the close button. - - * flumotion/admin/gtk/adminwindow.py - (AdminWindow._runConfigurationWizard): - Clean the state before running the configuration wizard, - fixes #998. - -2008-06-02 Johan Dahlin - - * flumotion/admin/gtk/componentlist.py: Rename iter to titer - -2008-06-02 Jordi Massaguer i Pla - - * env.in: - Rolled back to the previous one. Previous commit of this file was - an error. - -2008-06-02 Jordi Massaguer i Pla - - * env.in: - * flumotion/admin/gtk/adminwindow.py (AdminWindow.__init__, - AdminWindow._wizardFinshed, AdminWindow._connectionOpened): - Fixes #927 by adding a self._configurationWizardIsRunning so - it can be controlled whether a wizard windows has been opened - so that a new one does not need to be opened. - -2008-05-30 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: Add a proper doc-string - and remove a couple of more underscores. - - * flumotion/component/consumers/httpstreamer/admin_gtk.py - (StatisticsAdminGtkNode._updateLabels): link can still be None, - really protect against it. - - * flumotion/admin/gtk/adminwindow.py: - call activateComponent with None if no component is selected, this - allows you to deselect all to get back to the planet view - - * flumotion/admin/gtk/componentlist.py - (ComponentList._selectionChanged): emit an empty list instead of None - - * flumotion/admin/gtk/componentview.py (PlanetPlaceholder.getWidget): - Add a simple placeholder for planets, nothing to see yet, just improving - the infrastructure in preparation for #986 - - * flumotion/twisted/flavors.py (StateRemoteCache.addListener): Improve - error message when an instance is already listening to remote cache - - * flumotion/admin/gtk/componentview.py: - Avoid using timestamps, create an abstract base class - for different kind of widgets called placeholder. - Rename some variables to make even more sense. - - * flumotion/ui/wizard.py (SectionWizard.__init__): Remove last - traces of getFirstStep. - - * flumotion/admin/gtk/adminwindow.py - (AdminWindow._connectionOpened): update componentview callsite - - * flumotion/admin/gtk/componentview.py: - CamelCasifying, fix imports, document, rename methods and variables - to make more sense - - * flumotion/admin/gtk/message.py: General maintainance, - clean up imports, improve naming, refactor large methods - into smaller ones, rename variables. - And two tiny extra changes. - -2008-05-29 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: - Handle the initial case where no porters are available - * flumotion/ui/wizard.py: - (SectionWizard.run): Invert the check of sections, so it work - with an empty initial wizard. - - * data/glade/Makefile.am: - * data/glade/select-producers-wizard.glade: - * flumotion/admin/gtk/addformatwizard.py: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/productionsteps.py: - Add a new step in the format wizard which allows you - to select producers. Query the wizard for wizard information - about the steps before opening the wizard. - -2008-05-29 Johan Dahlin - - * flumotion/ui/kiwipatches.py: raise EnvironmentError - when the glade file is missing. Fixes #953 - - * bin/flumotion-debug (main): avatar -> adminAvatar - - * flumotion/wizard/shout2steps.py: - * flumotion/wizard/diskersteps.py: - * flumotion/wizard/httpstreamersteps.py: - Make pychecker happy by removing unused imports, - Regression after fixing #913. - - * flumotion/wizard/shout2steps.py: - I should test code before committing, I should test code before - comitting, I should test code before committing, I should test code - before comitting, I should test code before committing, I should - test code before comitting, I should test code before comitting, - I should test code before comitting, I shouldtest code before - comitting I should test code before comitting - Regression after fixing #913. - -2008-05-29 Johan Dahlin - - * flumotion/test/test_wizard_save.py: Update import here too. - - * flumotion/wizard/save.py (WizardSaver._handleMuxers): Simplify - muxer saving, fixes #931 - - * data/glade/Makefile.am: - * flumotion/component/consumers/disker/Makefile.am: - * flumotion/component/consumers/disker/wizard.glade: - * flumotion/component/consumers/disker/wizard_gtk.py: - * flumotion/component/consumers/httpstreamer/Makefile.am: - * flumotion/component/consumers/httpstreamer/wizard.glade: - * flumotion/component/consumers/httpstreamer/wizard_gtk.py: - * flumotion/component/consumers/shout2/Makefile.am: - * flumotion/component/consumers/shout2/wizard.glade: - * flumotion/component/consumers/shout2/wizard_gtk.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/consumptionsteps.py: - Move back consumer steps from f.c.c, to f.w, fixes #935 - -2008-05-28 Johan Dahlin - - * flumotion/admin/gtk/adminwindow.py: - (AdminWindow._componentSelectionChanged): Reorganize callbacks and - add a statusbar internal statusbar api. - - * flumotion/admin/gtk/message.py: - * flumotion/ui/wizard.py: - Rename add_message to -> addMessage & - clear_message to _clearMessage - Rename _messages_view to _messageView. - Fix a real bug at a callsite, which used to be addmessages. - -2008-05-28 Jordi Massaguer i Pla - - reviewed by: Arek Korbik - - * flumotion/admin/gtk/adminwindow.py (AdminWindow._wizardFinshed): - * flumotion/admin/gtk/statusbar.py (AdminStatusbar._clearContext): - * flumotion/test/test_parts.py (TestAdminStatusbar.testClear, - TestAdminStatusbar.testClearAll): - Fixes #890 . When finishing the wizard all previous messages are - clean up. - -2008-05-28 Jordi Massaguer i Pla - - reviewed by: Johan Dahlin - - * flumotion/common/package.py (findEndModuleCandidates): - On findEndModuleCandidates added checking that module is not None - -2008-05-28 Johan Dahlin - - * flumotion/common/planet.py (ManagerComponentState.__repr__) - (AdminComponentState.__repr__): Improve repr strings to print - the whole path to the class. - - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/gtk/adminwindow.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/main.py: - Rename client.AdminClientWindow to adminwindow.AdminWindow. - -2008-05-28 Johan Dahlin - - * flumotion/admin/gtk/componentview.py: - Never delete admingtk, just set it to None and check before - using it. - - * flumotion/component/base/componentnode.py: - Add debug logging and do not set an initial debug mask, should - really fix #977 :-) - - * flumotion/wizard/configurationwizard.py: Clean up documentation - strings and change a few parameter names for improved readability - -2008-05-27 Johan Dahlin - - * flumotion/admin/gtk/addformatwizard.py: - * flumotion/wizard/configurationwizard.py: - Fix audio-only regression, getAudio()/getVideo() needs to be - implemented differently for the two wizards. - Also remove unused getFirstStep() methods, and make a method - private. - - * flumotion/test/test_parts.py (TestComponentsView): - update this test to, to reflect the lastest changes - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/componentlist.py: - camelcasify ComponentList api. - Clean up ComponentList: - - move all ui creation to _createUI - - make a few unused methods private - - make the callbacks shorter by calling - private methods - -2008-05-27 Johan Dahlin - - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/componentlist.py: - * flumotion/admin/gtk/parts.py: - * flumotion/admin/gtk/statusbar.py: - * flumotion/test/test_parts.py: - Attempt to clean up the components_view vs - component_view mess, kill off f.a.g.parts, - - componentsview is renamed to componentlist and - moved to componentlist.py - - adminstatusbar is moved to statusbar.py - Rename _components to -> _componentStatus - components_view to -> _components - -2008-05-27 Johan Dahlin - - * flumotion/admin/gtk/client.py: - Improve connection label, - Do some more camelcasing, move a callback to - a real method. - -2008-05-27 Johan Dahlin - - * flumotion/common/fraction.py: - * flumotion/common/netutils.py: - Fix epydoc syntax - -2008-05-27 Johan Dahlin - - * flumotion/component/producers/audiotest/admin_gtk.py: - it's admin_gtk, not vadmin_gtk - -2008-05-26 Johan Dahlin - - * flumotion/component/base/Makefile.am: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/base.xml: - * flumotion/component/base/baseadminnode.py: - * flumotion/component/base/componentnode.py: - * flumotion/component/base/eatersnode.py: - * flumotion/component/base/effectsnode.py: - * flumotion/component/base/feedersnode.py: - * flumotion/component/base/statewatcher.py: - * flumotion/component/bouncers/admin_gtk.py: - * flumotion/component/combiners/switch/admin_gtk.py: - * flumotion/component/consumers/disker/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/misc/httpserver/admin_gtk.py: - * flumotion/component/producers/audiotest/admin_gtk.py: - * flumotion/component/producers/looper/admin_gtk.py: - * flumotion/component/producers/videotest/admin_gtk.py: - Split f.c.base.admin_gtk into seven smaller pieces, new are: - - baseadminnode - - componentnode - - eatersnode - - effectsnode - - feedersnode - - statewatcher - -2008-05-26 Johan Dahlin - - * flumotion/component/base/admin_gtk.py: - Be more careful when setting the debug gst/flu masks. Fixes #977 - - * flumotion/admin/gtk/client.py: - * flumotion/wizard/configurationwizard.py: - Reuse http porters between wizards if the port is the same. - (ConfigurationWizard.save): Add the porter logic here as well. - -2008-05-26 Johan Dahlin - - * flumotion/wizard/configurationwizard.py: - video/audio producer needs to be set before setting the overlay - * flumotion/component/plugs/cortado/wizard_gtk.py: - We need to convert to a fraction first, before attempting - to parse it - - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/gtk/addformatwizard.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/parts.py: - Add a new menu item for adding a new streamer format. - Fixes #933 - -2008-05-26 Johan Dahlin - - * flumotion/wizard/models.py: - * flumotion/wizard/save.py: - Add a new state to the models, which is used to reference - to existing models, we do not want to write/validate or - resolve naming conflicts on them - -2008-05-26 Johan Dahlin - - * flumotion/component/plugs/cortado/wizard_gtk.py: - framerate can be a fraction, but cortado only accepts floats, - convert it appropriately here. - - * flumotion/common/xmlwriter.py (XMLWriter._calcAttrsLength): - check if Value is None before quoting it, raise a helpful - exception if it is. - - * flumotion/component/consumers/httpstreamer/wizard_gtk.py: - * flumotion/component/encoders/theora/wizard_gtk.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/conversionsteps.py: - Add two getAudioProducer/getVideoProducer methods to the wizard, - to avoid fetching the production step everywhere. - Check if license step and production step exists before adding them. - -2008-05-26 Johan Dahlin - - * flumotion/ui/wizard.py: - Add a new method hasStep, skip calling getFirstStep as it is - not used, update self._steps in _setStep instead of _showNextStep, - so the first step is actually added to the dict. - -2008-05-26 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/wizard/configurationwizard.py: - Remove a constructor argument from the configuration - wizard and move it to a setter accessor. - -2008-05-26 Johan Dahlin - - * flumotion/admin/gtk/client.py: - Avoid saving references to the wizard in the admin window. - - * flumotion/wizard/configurationwizard.py: - Make adding the steps and saving public, overridable methods. - Remove workerStateHeaven from run() and add an extra - setter. - -2008-05-26 Johan Dahlin - - * flumotion/common/registry.py: - Fix a typo, bundle->b - -2008-05-26 Johan Dahlin - - * flumotion/admin/command/main.py: - * flumotion/common/dag.py: - * flumotion/common/package.py: - * flumotion/common/registry.py: - * flumotion/manager/manager.py: - Use list comprehensions instead of filter + lambda combination. - -2008-05-26 Johan Dahlin - - * flumotion/manager/manager.py (Vishnu.deleteFlow): Remove - lisp cruft, use a simpler pythonic approach. - * flumotion/test/test_manager_manager.py (TestVishnu.testDeleteFlow): - Add test for this function - - * flumotion/admin/gtk/client.py (MAIN_UI): Make - separator names unique and fix wizard.run() call, - now when interactive keyword arg is removed. - -2008-05-23 Johan Dahlin - - * flumotion/ui/wizard.py (SectionWizard.run): - * flumotion/wizard/configurationwizard.py: - (ConfigurationWizard.run): - Remove interactive cruft, which is unused. - - * flumotion/component/consumers/httpstreamer/wizard_gtk.py: - * flumotion/component/encoders/dirac/wizard_gtk.py: - * flumotion/component/encoders/jpeg/wizard_gtk.py: - * flumotion/component/encoders/mulaw/wizard_gtk.py: - * flumotion/component/encoders/smoke/wizard_gtk.py: - * flumotion/component/encoders/theora/wizard_gtk.py: - * flumotion/component/encoders/vorbis/wizard_gtk.py: - * flumotion/component/producers/audiotest/wizard_gtk.py: - * flumotion/component/producers/bttv/wizard_gtk.py: - * flumotion/component/producers/firewire/wizard_gtk.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/videotest/wizard_gtk.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/ondemandstep.py: - * flumotion/wizard/overlaystep.py: - * flumotion/wizard/productionsteps.py: - Add step.title and use that in user interfaces. - Keep step.name, but never display it, use it only internally - in the code. Fixes #902 - -2008-05-23 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/test/test_dialogs.py: - Remove unused code. - -2008-05-23 Johan Dahlin - - * flumotion/admin/gtk/client.py: - CamelCase rename internal methods and varibles. - -2008-05-23 Johan Dahlin - - * flumotion/wizard/models.py (Component.link): - Add back accidentally removed append statements - - * flumotion/admin/gtk/client.py (AdminClientWindow._connection_opened): - Show the client window even if the configuration wizard isn't run. - - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/configurationwriter.py: - * flumotion/wizard/models.py: - * flumotion/wizard/save.py: - Clean up models, remove unused code and fix the validation: - - rename getFeeders to getEaters - - swap link calls around in saving code - - update tests lacking complete flows - -2008-05-23 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/parts.py: - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/save.py: - Resolve naming conflicts when a wizard stream, allows - you to run the wizard several times and still have unique component - names no matter what. - -2008-05-23 Johan Dahlin - - * flumotion/test/test_wizard_save.py (TestWizardSave.testOndemand): - Add a new test. - - * flumotion/admin/gtk/main.py: Return a proper error code - when quitting, 0 for success non-zero for failure. - -2008-05-22 Arek Korbik - - * flumotion/component/misc/httpserver/file.py: - Remove ratecontrol import - it's not used and shouldn't be there. - -2008-05-21 Johan Dahlin - - * flumotion/admin/gtk/client.py: - Add an option to dump the current configuration to the user interface - - * flumotion/admin/gtk/client.py - (AdminClientWindow._export_configuration): - Set the default export filename to configuration.xml and - always append .xml if it's missing. - - * flumotion/test/test_parts.py (TestComponentsView.testUpdate): - Add 'type' key to the test components, so the tests can pass - after the latest sorting changes - - * flumotion/admin/gtk/client.py - (AdminClientWindow._import_configuration): - Add two file filters when importing configuration, one for *.xml - and one for everything. - - * flumotion/admin/gtk/parts.py (ComponentsView.update): Sort the - component list by component type, similar to the xml file. - - * flumotion/test/test_greeter.py (WizardTest.testGreeter): Remove test - which checks auth_method_combo, which now is gone - - * flumotion/admin/gtk/connections.py (Authenticate.__init__): - * data/glade/authenticate.glade: - Remove the label and combobox for authentication method, since we - only support one kind of method right now. - - * data/glade/production-wizard.glade: Change on demand radiobutton - label to "Stream files on demand" - - * flumotion/admin/gtk/parts.py (ComponentsView._add_columns): - Rename the mood column to status - - * flumotion/ui/wizard.py (SectionWizard._updateButtons): Use finish - instead of apply when completing the wizard - - * flumotion/admin/gtk/client.py - (AdminClientWindow._import_configuration) - (AdminClientWindow._export_configuration): Import and Export dialogs - should use a verb instead of just OK to confirm the dialog. - - * flumotion/wizard/consumptionsteps.py (HTTPConsumptionStep.section): - Rename the streaming page from HTTP to HTTP Streaming. - - * data/image/16x16/Makefile.am: - * data/image/16x16/pause.png: - * data/image/24x24/Makefile.am: - * data/image/24x24/pause.png: - * flumotion/admin/gtk/client.py: - Create a stop icon and use it instead of pause in the - admin ui. - -2008-05-21 Johan Dahlin - - * flumotion/component/plugs/cortado/cortado.xml: Change the - description of the cortado plugin to be - "Publish embedded Java player page" - - * flumotion/admin/gtk/dialogs.py: refactor already_connected_message - into showConnectionErrorDialog. - - * flumotion/admin/gtk/client.py (AdminClientWindow._create_ui): - Change the menu label to be "Connect to running manager" - -2008-05-21 Thomas Vander Stichele - - * flumotion/monitor/nagios/process.py: - Remove process with parent pid 1 before looping over them. - -2008-05-21 Thomas Vander Stichele - - * flumotion/monitor/nagios/Makefile.am: - * flumotion/monitor/nagios/main.py: - * flumotion/monitor/nagios/process.py: - Add a process subcommand that allows checking for multiple - worker/manager/job, vsize and orphaned status of jobs. - -2008-05-19 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/greeter.py: - * flumotion/wizard/configurationwizard.py: - Add widget names for the toplevel windows and avoid using - dashes in the menu items used in the ui manger. - -2008-05-19 Johan Dahlin - - * flumotion/common/managerspawner.py (LocalManagerSpawner.stop): - Add a new stop method which can be used to stop and optionally - cleanup the temporary state created by the started manager & worker - -2008-05-19 Johan Dahlin - - * flumotion/admin/gtk/main.py (_connectToManager, main): - Make sure that ssl defaults to True so flumotion-admin -m... - uses SSL and not TCP by default. - -2008-05-19 Johan Dahlin - - * flumotion/common/managerspawner.py: Remove unused variable - found by pychecker. - -2008-05-19 Johan Dahlin - - * flumotion/admin/gtk/greeter.py: - * flumotion/common/Makefile.am: - * flumotion/common/managerspawner.py: - * flumotion/wizard/configurationwizard.py: - Move the manager spawning code out of the greeter to - f.c.managerspawner. - -2008-05-19 Johan Dahlin - - * flumotion/ui/sidebar.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/configurationwizard.py: - Don't use class variables to define the steps. - - Add a new methods addSection - - Use it in configuration wizard - - Transform sidebar.set_sections into append_section - -2008-05-19 Johan Dahlin - - * flumotion/admin/gtk/greeter.py (StartNew._startManager): save the - port we're going to use in a variable for re-use later. - (StartNew._startManager.done): The started manager uses ssl. - -2008-05-19 Johan Dahlin - - * flumotion/test/gtkunit.py: Fix a couple of stupid typos. - -2008-05-19 Jordi Massaguer i Pla - - * flumotion/admin/gtk/parts.py (ComponentsView.selection_changed_cb): - Check for availability of gtk.TreeView.set_rubber_banding - -2008-05-19 Johan Dahlin - - * flumotion/test/gtkunit.py: Add back setWidget and toggle - methods which are used by the tests in flumotion-template. - -2008-05-19 Jordi Massaguer i Pla - - * flumotion/admin/gtk/client.py (AdminClientWindow.__init__, - AdminClientWindow.stateSet, - AdminClientWindow.componentCallRemoteStatus, - AdminClientWindow._create_ui, - AdminClientWindow._update_component_actions, - AdminClientWindow._remove_component, AdminClientWindow._component_do, - AdminClientWindow._component_selection_changed, - AdminClientWindow.compAppend, AdminClientWindow.compRemove, - AdminClientWindow._components_view_activated_cb): - Added multi selection - * flumotion/admin/gtk/message.py: - Added multi selection - * flumotion/admin/gtk/parts.py (ComponentsView.selection_changed_cb, - ComponentsView._tree_view_query_tooltip_cb, - ComponentsView._view_cursor_changed_cb, - ComponentsView._view_button_press_event_cb, - ComponentsView._activated_cb, ComponentsView._get_selected, - ComponentsView.get_selected_names, - ComponentsView.get_selected_states, ComponentsView.can_start, - ComponentsView.can_stop, ComponentMenu.__init__): - Added multi selection by returning multiple elements ( a list ) - instead of a single element on the get_selected*. Also, moved the - can_start and can_stop from the - flumotion.admin.gtk.client.AdminClientWindow - to this class as it is used for the context menu. - * flumotion/test/test_parts.py : - Added tests for multi selection - -2008-05-19 Johan Dahlin - - * flumotion/test/test_greeter.py (WizardTest.testGreeter): - * flumotion/test/gtkunit.py (UITestCase._process): - Transform the ui test functions into methods, camelcasify and remove - the unused ones. - -2008-05-19 Johan Dahlin - - * flumotion/admin/gtk/greeter.py: - Clean up the manager invokation. - * flumotion/common/netutils.py (tryPort): - Move the checking if a port is open to here. - (tryPort): Avoid using python 2.5 specific syntax - -2008-05-19 Jordi Massaguer i Pla - - * po/ca.po: - Reviewed and translated all the string according to TERMCAT and - Softcatala. - -2008-05-16 Arek Korbik - - * flumotion/component/misc/httpserver/ratecontrol.py - (TokenBucketConsumer, TokenBucketConsumer.__init__, - TokenBucketConsumer._tryWrite, TokenBucketConsumer._doUnregister, - TokenBucketConsumer._doFinish, TokenBucketConsumer.stopProducing, - TokenBucketConsumer.finish, TokenBucketConsumer.unregisterProducer): - Make finishing and unregistering work properly with our time - scheduled modus operandi. Release reference to consumer when asked - to stop producing and make the code work properly even when we don't - have a consumer. - -2008-05-16 Arek Korbik - - * flumotion/component/misc/httpserver/file.py - (FileTransfer.stopProducing): - Finish the request even if we are stopped early (helps breaking - circular references - fixes leaks). - - * flumotion/component/misc/httpserver/file.py (FileTransfer.__init__, - FileTransfer.resumeProducing): - * flumotion/component/misc/httpserver/httpserver.xml: - Add more comments, add logging, fix logging to be more conformant - with the interface. - -2008-05-16 Johan Dahlin - - * flumotion/common/Makefile.am (flumotion_PYTHON): Add - i18n.py here, should fix distcheck - -2008-05-16 Johan Dahlin - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/message.py: - * flumotion/common/common.py: - * flumotion/common/documentation.py: - * flumotion/common/messages.py: - * flumotion/common/worker.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/bouncers/ipbouncer.py: - * flumotion/component/combiners/switch/patternswitch.py: - * flumotion/component/combiners/switch/switch.py: - * flumotion/component/component.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - * flumotion/component/consumers/httpstreamer/wizard_gtk.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/encoders/dirac/dirac.py: - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/porter/porter.py: - * flumotion/component/misc/repeater/repeater.py: - * flumotion/component/muxers/checks.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/bttv/wizard_gtk.py: - * flumotion/component/producers/checks.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/firewire/wizard_gtk.py: - * flumotion/component/producers/looper/looper.py: - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/screencast/screencast.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/launch/main.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/test/test_common_messages.py: - * flumotion/test/test_i18n.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/ondemandstep.py: - * flumotion/wizard/overlaystep.py: - * flumotion/worker/checks/audio.py: - * flumotion/worker/checks/check.py: - * flumotion/worker/checks/encoder.py: - * flumotion/worker/checks/gst010.py: - * flumotion/worker/job.py: - Move over getLL from f.c.common to f.c.i18n and - Translatable functiosn f.c.messages to f.c.i18n. - Update callsites and reorganize imports while we add it. - Separate tests as well. - -2008-05-16 Arek Korbik - - * flumotion/component/misc/httpserver/httpserver.py - (HTTPFileStreamer.do_stop): - Deregister properly when stopping, depending on whether we - registered a path or a prefix. - -2008-05-15 Johan Dahlin - - * flumotion/common/common.py: - * flumotion/common/medium.py: - * flumotion/common/netutils.py: - * flumotion/manager/manager.py: - * flumotion/test/test_common.py: - * flumotion/test/test_common_netutils.py: - * flumotion/twisted/pb.py: - Move addressGetHost and addressGetPort from f.c.common - to f.c.netutils. Update callsites and tests. - -2008-05-15 Johan Dahlin - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/message.py: - * flumotion/common/common.py: - * flumotion/common/format.py: - * flumotion/common/messages.py: - * flumotion/common/package.py: - * flumotion/common/registry.py: - * flumotion/common/worker.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/bouncers/ipbouncer.py: - * flumotion/component/combiners/switch/patternswitch.py: - * flumotion/component/combiners/switch/switch.py: - * flumotion/component/component.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - * flumotion/component/consumers/httpstreamer/wizard_gtk.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/encoders/dirac/dirac.py: - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/porter/porter.py: - * flumotion/component/misc/repeater/repeater.py: - * flumotion/component/muxers/checks.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/bttv/wizard_gtk.py: - * flumotion/component/producers/checks.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/firewire/wizard_gtk.py: - * flumotion/component/producers/looper/looper.py: - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/screencast/screencast.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/manager/component.py: - * flumotion/manager/config.py: - * flumotion/manager/manager.py: - * flumotion/service/main.py: - * flumotion/test/test_common_messages.py: - * flumotion/test/test_config.py: - * flumotion/test/test_i18n.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/configurationwriter.py: - * flumotion/wizard/ondemandstep.py: - * flumotion/wizard/overlaystep.py: - * flumotion/worker/checks/audio.py: - * flumotion/worker/checks/check.py: - * flumotion/worker/checks/encoder.py: - * flumotion/worker/checks/gst010.py: - * flumotion/worker/job.py: - Use configure.PACKAGE instead of 'flumotion', when referring to: - - the gettext domain - - the default bundle project - -2008-05-15 Johan Dahlin - - * flumotion/admin/rrdmon/main.py: - * flumotion/common/Makefile.am: - * flumotion/common/common.py: - * flumotion/common/process.py: - * flumotion/manager/main.py: - * flumotion/service/service.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_common.py: - * flumotion/test/test_common_process.py: - * flumotion/worker/base.py: - * flumotion/worker/main.py: - Move process related utilites from f.c.common to - f.c.process. Mark the untested ones without callsites - in flumotion as private. - Update callsites and split the tests too. - -2008-05-15 Johan Dahlin - - * flumotion/common/common.py (writePidFile): - Refactor to avoid duplication. - Set chmod to 644 of created pid files. - Fixes #847 - -2008-05-15 Johan Dahlin - - * flumotion/admin/connections.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/main.py: - * flumotion/configure/configure.py: - * flumotion/ui/simplewizard.py: - Refactoring connection handling. - This avoids a bit of duplication, improves the APIs. - Do some underscore->camelcase renaming. - gtk/main.py is considerably shorter and easier to understand. - Add a PACKAGE variable used by gettext. - -2008-05-15 Thomas Vander Stichele - - * flumotion/monitor/nagios/main.py: - Use changes to Command class to be able to stop parsing when - usage or help is printed. - * flumotion/monitor/nagios/util.py: - override .debug() properly - -2008-05-15 Thomas Vander Stichele - - * flumotion/monitor/nagios/main.py: - Put all manager-needing checks under a new command - called manager. - -2008-05-14 Johan Dahlin - - * data/glade/production-wizard.glade: - * flumotion/ui/wizard.py: - * flumotion/wizard/productionsteps.py: - Make sure so that enter on a radio button on the production step - page goes to the next page. Add an API to go to the next page. - Refactor a production step to be simpler. - -2008-05-12 Johan Dahlin - - * flumotion/common/Makefile.am: - * flumotion/common/common.py: - * flumotion/common/format.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - * flumotion/component/misc/httpserver/admin_gtk.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_common.py: - * flumotion/test/test_common_format.py: - Move formattting functions out of flumotion.common.format. - Translate formatTime using ngettext. - Update callsites to import from flumotion.common. - Split tests out to test_common_format. - Fixes #938 - -2008-05-12 Johan Dahlin - - * data/glade/ondemand-wizard.glade: - * flumotion/wizard/ondemandstep.py: - * flumotion/worker/checks/check.py: - Add a worker check to verify that the directory is - a directory and readable. Add tooltip and accelerator - for the directory entry. - Fixes #959 - -2008-05-12 Johan Dahlin - - * flumotion/admin/gtk/greeter.py: - The activate signal is emitted when activation changes, not - just when it's true, add a check to make sure that the radio button - is active before proceeding. - Fixes #958 - -2008-05-10 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/test/test_common.py: - Don't raise an exception when signalling a pid for liveness - run by another user. - Fixes #971. - -2008-05-09 Johan Dahlin - - * flumotion/common/Makefile.am: - * flumotion/common/config.py: - * flumotion/common/fraction.py: - * flumotion/component/encoders/theora/wizard_gtk.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/test/test_common_fraction.py: - * flumotion/test/test_common_xmlwriter.py: - * flumotion/wizard/models.py: - Clear up confusion about fractions between webcam step and - theora, add functions to convert to and from fractions. - Fixes #968 - -2008-05-09 Johan Dahlin - - * flumotion/wizard/configurationwizard.py: - Improve error message from stray taskFinished calls - - * flumotion/component/producers/webcam/wizard_gtk.py: - Rename to camelCase. - Refactor taskFinished call out of _clear. Document when _clear - is called. - Fixes #967 - -2008-05-08 Johan Dahlin - - * flumotion/common/registry.py: - * flumotion/component/consumers/disker/wizard_gtk.py: - * flumotion/component/consumers/httpstreamer/wizard_gtk.py: - * flumotion/component/consumers/shout2/wizard_gtk.py: - * flumotion/component/encoders/dirac/wizard_gtk.py: - * flumotion/component/encoders/jpeg/wizard_gtk.py: - * flumotion/component/encoders/mulaw/wizard_gtk.py: - * flumotion/component/encoders/smoke/wizard_gtk.py: - * flumotion/component/encoders/speex/wizard_gtk.py: - * flumotion/component/encoders/theora/wizard_gtk.py: - * flumotion/component/encoders/vorbis/wizard_gtk.py: - * flumotion/component/plugs/cortado/wizard_gtk.py: - * flumotion/component/producers/audiotest/wizard_gtk.py: - * flumotion/component/producers/bttv/wizard_gtk.py: - * flumotion/component/producers/firewire/wizard_gtk.py: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/videotest/wizard_gtk.py: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/configurationwriter.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/models.py: - * flumotion/wizard/ondemandstep.py: - * flumotion/wizard/overlaystep.py: - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/save.py: - Complete teh underscore_style to camelCase changes for - flumotion/wizard/models.py. - Also do a complete component_type -> componentType conversion, - including backwards compat for external modules. - -2008-05-08 Johan Dahlin - - * flumotion/test/test_common_package.py - (TestPackagePath.testPackagerWithNonePrefix): - Don't require the xml.dom.html module to be installed - -2008-05-08 Johan Dahlin - - * data/glade/Makefile.am (glade_DATA): Add http-wizard.glade and - ondemand.glade, so it's included in the dist and thus ubuntu packages. - -2008-05-08 Arek Korbik - - * flumotion/admin/multi.py (get_admin_for_object): - Fix brokennes in r6565 - don't import functions as modules! - -2008-05-07 Johan Dahlin - - * data/glade/http-wizard.glade: - * flumotion/component/consumers/httpstreamer/wizard.glade: - * flumotion/component/consumers/httpstreamer/wizard_gtk.py: - * flumotion/component/plugs/cortado/wizard_gtk.py: - * flumotion/configure/configure.py: - * flumotion/test/test_wizard_save.py - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/models.py: - Create a new HTTP page with generic http options. - Use :8800/audio-video instead of :8802 for audio/video streams etc. - Fixes #963 - -2008-05-07 Johan Dahlin - - * flumotion/wizard/save.py (WizardSaver._handleMuxers): Rename - from _handleConsumers - -2008-05-07 Thomas Vander Stichele - - * flumotion/worker/checks/audio.py: - * flumotion/worker/checks/check.py: - Add handling of RESOURCE_WRITE errors. - Also handle alsasrc bug for gst-plugins-base <= 0.10.14 - where it was actually sending RESOURCE_WRITE when it should have - sent RESOURCE_READ. - -2008-05-07 Thomas Vander Stichele - - * flumotion/common/messages.py: - Rename a terribly named method that is internal to the file. - Use it to log creation and addition of translatables to messages. - -2008-05-07 Johan Dahlin - - * flumotion/component/producers/bttv/wizard_gtk.py: - convert private methods and variables to camel case. - -2008-05-07 Johan Dahlin - - * flumotion/component/producers/bttv/wizard.glade: - * flumotion/component/producers/bttv/wizard_gtk.py: - Speculative fix for BTTV: Add channel and signal properties - -2008-05-07 Arek Korbik - - * flumotion/component/producers/bttv/bttv.py (BTTV.configure_pipeline): - Allow the 'signal' property to be optional in the code, too. - -2008-05-07 Thomas Vander Stichele - - * flumotion/component/encoders/speex/speex.xml: - * flumotion/component/encoders/vorbis/vorbis.xml: - unify encoder description. - -2008-05-06 Jordi Massaguer i Pla - - reviewed by: Johan Dahlin - - * flumotion/wizard/conversionsteps.py: - Added theora and vorbis as default encoders. Fixes #926. - -2008-05-06 Pedro Gracia - - * po/es.po: - New spanish strings translated. - -2008-05-06 Pedro Gracia - - * po/es.po: - Spanish translation up to date. - -2008-05-06 Johan Dahlin - - * data/glade/ondemand-wizard.glade: - * data/glade/production-wizard.glade: - * flumotion/ui/wizard.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/ondemandstep.py: - * flumotion/wizard/productionsteps.py: - Add ondemand step to the wizard, fixes #932 - -2008-05-06 Thomas Vander Stichele - - * flumotion/service/service.py: - Invoke cert generation through sh, fix for installed version. - -2008-05-06 Thomas Vander Stichele - - * doc/random/styleguide: - Clear up trailing commas in tuples/lists case. - * flumotion/common/gstreamer.py: - * flumotion/common/keycards.py: - * flumotion/common/medium.py: - * flumotion/common/signals.py: - * flumotion/component/bouncers/saltsha256.py: - * flumotion/extern/log/log.py: - * flumotion/extern/unixcrypt.py: - * flumotion/test/test_common.py: - * flumotion/test/test_common_messages.py: - * flumotion/test/test_pb.py: - * flumotion/twisted/checkers.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/rtsp.py: - * flumotion/worker/checks/check.py: - fix them up. - -2008-05-06 Thomas Vander Stichele - - * flumotion/component/component.py: - properly document uiState ivar. - -2008-05-06 Thomas Vander Stichele - - * flumotion/launch/main.py: - Respect ComponentStartError's prototype by passing it a "fake" - component state it can complain about. - -2008-05-06 Thomas Vander Stichele - - * flumotion/common/registry.py: - Use getExceptionMessage to convert an exception into a string. - Only show the exception if it's fatal. - -2008-05-06 Thomas Vander Stichele - - * flumotion/common/registry.py: - * flumotion/project/project.py: - Add some debugging. Fix up some debugging text. - -2008-05-06 Thomas Vander Stichele - - * flumotion/common/gstreamer.py: - Offset balance in the force by adding whitespace. - -2008-05-06 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - Commenting and code reformatting. - -2008-05-05 Johan Dahlin - - * data/glade/Makefile.am: - * data/glade/wizard.glade: - * data/glade/wizard_audio_encoder.glade: - * data/glade/wizard_consumption.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_license.glade: - * data/glade/wizard_overlay.glade: - * data/glade/wizard_overview.glade: - * data/glade/wizard_production.glade: - * data/glade/wizard_summary.glade: - * data/glade/wizard_welcome.glade: - * flumotion/ui/wizard.py: - * flumotion/wizard/basesteps.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/overlaystep.py: - * flumotion/wizard/productionsteps.py: - * po/POTFILES.in: - Rename most glade files, wizard_* -> *-wizard and - wizard -> section-wizard - -2008-05-05 Thomas Vander Stichele - - * flumotion/common/worker.py: - Counterintuitively, list.index() triggers a ValueError exception, - so catch that instead. - -2008-05-05 Arek Korbik - - * flumotion/component/encoders/smoke/smoke.xml: - * flumotion/component/encoders/vorbis/vorbis.xml: - Remove duplicate bundle entries. - -2008-05-05 Thomas Vander Stichele - - * doc/random/runtime-versions: - * flumotion/common/server.py: - * flumotion/manager/manager.py: - Document more. Add original document on versioning of .py files - (which shows the URL bit is missing to know whether it's trunk or - not) - -2008-05-05 Arek Korbik - - * po/POTFILES.in: - Update filename: test_bundle.py -> test_common_bundle.py. - -2008-05-05 Arek Korbik - - * flumotion/component/plugs/cortado/Makefile.am: - * flumotion/component/plugs/cortado/cortado.xml: - * flumotion/component/plugs/cortado/wizard_gtk.py: - * flumotion/component/encoders/dirac/dirac.xml: - * flumotion/component/encoders/dirac/wizard.glade: - * flumotion/component/encoders/dirac/wizard_gtk.py: - * flumotion/component/encoders/theora/theora.xml: - * flumotion/component/encoders/theora/wizard.glade: - * flumotion/component/encoders/theora/wizard_gtk.py: - * flumotion/component/encoders/speex/speex.xml: - * flumotion/component/encoders/speex/wizard_gtk.py: - * flumotion/component/encoders/vorbis/vorbis.xml: - * flumotion/component/encoders/vorbis/wizard.glade: - * flumotion/component/encoders/vorbis/wizard_gtk.py: - * flumotion/component/encoders/jpeg/jpeg.xml: - * flumotion/component/encoders/jpeg/wizard.glade: - * flumotion/component/encoders/jpeg/wizard_gtk.py: - * flumotion/component/encoders/mulaw/mulaw.xml: - * flumotion/component/encoders/mulaw/wizard.glade: - * flumotion/component/encoders/mulaw/wizard_gtk.py: - * flumotion/component/encoders/Makefile.am: - * flumotion/component/encoders/smoke/wizard.glade: - * flumotion/component/encoders/smoke/wizard_gtk.py: - * flumotion/component/encoders/smoke/smoke.xml: - * flumotion/component/producers/bttv/Makefile.am: - * flumotion/component/producers/bttv/wizard.glade: - * flumotion/component/producers/bttv/wizard_gtk.py: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/component/producers/soundcard/Makefile.am: - * flumotion/component/producers/soundcard/wizard.glade: - * flumotion/component/producers/soundcard/wizard_gtk.py: - * flumotion/component/producers/webcam/Makefile.am: - * flumotion/component/producers/webcam/wizard.glade: - * flumotion/component/producers/webcam/wizard_gtk.py: - * flumotion/component/producers/webcam/webcam.xml: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/audiotest/Makefile.am: - * flumotion/component/producers/audiotest/wizard.glade: - * flumotion/component/producers/audiotest/wizard_gtk.py: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/component/producers/videotest/Makefile.am: - * flumotion/component/producers/videotest/wizard.glade: - * flumotion/component/producers/videotest/wizard_gtk.py: - * flumotion/component/producers/firewire/Makefile.am: - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/component/producers/firewire/wizard.glade: - * flumotion/component/producers/firewire/wizard_gtk.py: - * flumotion/component/consumers/disker/Makefile.am: - * flumotion/component/consumers/disker/wizard.glade: - * flumotion/component/consumers/disker/wizard_gtk.py: - * flumotion/component/consumers/httpstreamer/Makefile.am: - * flumotion/component/consumers/httpstreamer/wizard.glade: - * flumotion/component/consumers/httpstreamer/wizard_gtk.py: - * flumotion/component/consumers/shout2/Makefile.am: - * flumotion/component/consumers/shout2/wizard.glade: - * flumotion/component/consumers/shout2/wizard_gtk.py: - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/consumptionsteps.py: - * po/POTFILES.in: - - Rename all the *_wizard.py files into wizard_gtk.py, and all - the *-wizard.glade files into wizard.glade. Update makefiles and - references in a few other files. - -2008-05-02 Johan Dahlin - - * flumotion/common/Makefile.am: - * flumotion/common/mimetypes.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/misc/httpserver/admin_gtk.py: - Abstract launching an application and move it to f.c.mimetypes and - also move conversion of a mime type to a file extension. - Use subprocess instead of os.system on linux. - Implement support for launching an app on win32. - -2008-05-02 Johan Dahlin - - * flumotion/ui/Makefile.am: - * flumotion/ui/url.py: - * po/POTFILES.in: - Remove flumotion.ui.url which is unused. - -2008-05-02 Johan Dahlin - - * flumotion/common/bundle.py (Unbundler.unbundle): - Remove the target file before renaming. - - * flumotion/component/base/admin_gtk.py - (BaseAdminGtkNode.loadGladeFile): - Fixes #942. Manager is assumed to work on / for now, while the - admin client is using os.path.sep and converts back and forth - when talking to the manager. - -2008-05-02 Thomas Vander Stichele - - * common/common.mk: - put FLUMOTION_DIR first on PYTHONPATH. - -2008-05-02 Johan Dahlin - - * flumotion/admin/gtk/componentview.py - (ComponentView._get_widget_constructor.got_entry_point): - Ditto for componentview. Part of #942 - -2008-05-02 Johan Dahlin - - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - * flumotion/wizard/configurationwizard.py - (ConfigurationWizard._gotEntryPoint): Move out of - (ConfigurationWizard.getWizardPlugEntry): this - (ConfigurationWizard.getWizardEntry): and this. - Make getWizardPlugEntry public, refactor component/plug callback to a - common path. - Also replace the path separator given from the manager - with os.path.sep, since that is what is expected on the - admin client side of the story. - Part of #942. - -2008-05-01 Thomas Vander Stichele - - * common/common.mk: - Also get top_srcdir on the PYTHONPATH for when building nonscrdir. - -2008-05-01 Thomas Vander Stichele - - * flumotion/project/project.py: - Tell us the reason of an import error when trying to load a project. - -2008-05-01 Thomas Vander Stichele - - * misc/validate-registry.py: - * common/validate-registry.py: - Move from misc to common. - * Makefile.am: - * common/Makefile.am: - * common/common.mk: - Fix up files for the move. - -2008-05-01 Thomas Vander Stichele - - * misc/validate-registry.py: - Set up the package path as well. - -2008-05-01 Thomas Vander Stichele - - * common/common.mk: - Run inside environment so flumotion can be imported. - -2008-05-01 Thomas Vander Stichele - - * misc/validate-registry.py: - Add a simple script to validate the registry. - * Makefile.am: - * common/common.mk: - Run it as part of make check. - * flumotion/common/bundle.py: - Add a method to get bundle names ... - * flumotion/test/test_bundle.py: - ... and test it. - -2008-04-30 Johan Dahlin - - * flumotion/ui/url.py: Fix typo which broke the case - where gnomevfs is not installed. - -2008-04-30 Johan Dahlin - - * flumotion/common/fxml.py: - * flumotion/common/xmlwriter.py: - * flumotion/manager/config.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_common_xmlwriter.py: - * flumotion/wizard/configurationwriter.py: - Wrap long lines in the xml output by using xmlwriter when - exporting xml from the planet. Sort the components and - add a new function for ordering components by type. - Fixes #939. - -2008-04-30 Johan Dahlin - - * flumotion/test/Makefile.am: - * flumotion/test/test_common_xmlwriter.py: - Add xmlwriter tests. - -2008-04-29 Arek Korbik - - * flumotion/component/encoders/theora/theora.py (Theora.do_check): - Import the used modules and invoke the check function properly. - -2008-04-28 Johan Dahlin - - * flumotion/wizard/configurationwizard.py (ConfigurationWizard.waitForTask): - prevent a raise from happening when shutting down the wizard, check - so the GdkWindow isn't None when setting a cursor. - -2008-04-28 Johan Dahlin - - * flumotion/admin/gtk/connections.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/consumers/disker/admin_gtk.py: - * flumotion/component/consumers/disker/disker_wizard.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - * flumotion/component/consumers/shout2/shout2_wizard.py: - * flumotion/component/effects/colorbalance/admin_gtk.py: - * flumotion/component/effects/volume/admin_gtk.py: - * flumotion/component/encoders/dirac/dirac_wizard.py: - * flumotion/component/encoders/jpeg/jpeg_wizard.py: - * flumotion/component/encoders/mulaw/mulaw_wizard.py: - * flumotion/component/encoders/smoke/smoke_wizard.py: - * flumotion/component/encoders/speex/speex_wizard.py: - * flumotion/component/encoders/theora/theora_wizard.py: - * flumotion/component/encoders/vorbis/vorbis_wizard.py: - * flumotion/component/misc/httpserver/admin_gtk.py: - * flumotion/component/producers/audiotest/admin_gtk.py: - * flumotion/component/producers/audiotest/audiotest_wizard.py: - * flumotion/component/producers/bttv/bttv_wizard.py: - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/component/producers/looper/admin_gtk.py: - * flumotion/component/producers/soundcard/soundcard_wizard.py: - * flumotion/component/producers/videotest/videotest_wizard.py: - * flumotion/component/producers/webcam/webcam_wizard.py: - * flumotion/test/test_wizard.py: - * flumotion/ui/glade.py: - * flumotion/ui/kiwipatches.py: - * flumotion/ui/simplewizard.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/basesteps.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/overlaystep.py: - * flumotion/wizard/productionsteps.py: - More camelCase renaming: - * _use_main -> _useMain - * current_section -> currentSection - * current_step -> currentStep - * gettext_domain -> gettextDomain - * glade_file -> gladeFile - * glade_typedict -> gladeTypedict - * has_next -> hasNext - * last_step -> lastStep - * next_step -> nextStep - * nexstep_class -> nextStepClass - * section_class -> sectionClass - * sidebar_name -> sidebarName - -2008-04-28 Johan Dahlin - - * flumotion/common/xmlwriter.py: - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/configurationwriter.py: - Update xmlwriter from gobject-introspection copy, it - can line write attributes properly. - Update tests and change callsite slightly. - -2008-04-28 Johan Dahlin - - * flumotion/common/xmlwriter.py: - * flumotion/wizard/configurationwriter.py: - Move xmlwriter out of the wizard. - -2008-04-28 Johan Dahlin - - * flumotion/component/consumers/disker/disker_wizard.py: - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - * flumotion/component/consumers/shout2/shout2_wizard.py: - * flumotion/component/encoders/dirac/dirac_wizard.py: - * flumotion/component/encoders/jpeg/jpeg_wizard.py: - * flumotion/component/encoders/mulaw/mulaw_wizard.py: - * flumotion/component/encoders/smoke/smoke_wizard.py: - * flumotion/component/encoders/speex/speex_wizard.py: - * flumotion/component/encoders/theora/theora_wizard.py: - * flumotion/component/encoders/vorbis/vorbis_wizard.py: - * flumotion/component/plugs/cortado/cortado_wizard.py: - * flumotion/component/producers/audiotest/audiotest_wizard.py: - * flumotion/component/producers/bttv/bttv_wizard.py: - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/component/producers/soundcard/soundcard_wizard.py: - * flumotion/component/producers/videotest/videotest_wizard.py: - * flumotion/component/producers/webcam/webcam_wizard.py: - * flumotion/test/test_wizard.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/basesteps.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/interfaces.py: - * flumotion/wizard/overlaystep.py: - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/worker.py: - * flumotion/wizard/workerstep.py: - Rename wizard variables, private and public API to use camelCase - instead of under_scores. - -2008-04-28 Johan Dahlin - - * flumotion/admin/admin.py: - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - Clean up thomas' "refactoring". - -2008-04-28 Johan Dahlin - - * flumotion/test/test_common_messages.py: - Remove a deferred generator - -2008-04-26 Thomas Vander Stichele - - * flumotion/test/test_http.py: - Remove the defer generator to bring out the traceback - that was being papered over as an actual error. - Fix the error by adding a .path to FakeRequest. - -2008-04-26 Thomas Vander Stichele - - * flumotion/common/keycards.py: - Properly document Keycard attributes instead of commenting. - Deprecate inconsistently named HTTPDigestKeycard. - * flumotion/test/test_keycards.py: - Drive up coverage to 100%. - -2008-04-25 Thomas Vander Stichele - - * flumotion/common/signals.py: - Use the right variable. Actually chain through to the - non-deprecated method. - -2008-04-25 Thomas Vander Stichele - - * flumotion/component/encoders/theora/theora.py: - Use the correctly imported module. - -2008-04-25 Thomas Vander Stichele - - * flumotion/admin/multi.py: - * flumotion/common/signals.py: - * flumotion/test/test_common_signals.py: - Fix naming, but using DeprecationWarning - -2008-04-25 Thomas Vander Stichele - - * flumotion/admin/multi.py: - * flumotion/component/component.py: - Privatize variables and camelCase. - -2008-04-25 Thomas Vander Stichele - - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/encoders/theora/theora.xml: - Remove bundle with same name. - Use the check that was moved to the check module. - -2008-04-25 Thomas Vander Stichele - - * flumotion/monitor/nagios/main.py: - Return the exit code. - Don't traceback on Nagios Exceptions - -2008-04-25 Thomas Vander Stichele - - * doc/reference/Makefile.am: - * flumotion/admin/admin.py: - * flumotion/common/common.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/feed.py: - * flumotion/manager/admin.py: - * flumotion/twisted/integration.py: - * flumotion/twisted/rtsp.py: - * flumotion/ui/glade.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/worker/base.py: - * flumotion/worker/feedserver.py: - * flumotion/worker/medium.py: - * flumotion/worker/worker.py: - Fix a bunch of documentation errors. - -2008-04-25 Johan Dahlin - - * flumotion/extern/Makefile.am: - * flumotion/extern/unixcrypt.py: - * flumotion/twisted/credentials.py: - Add a unixcrypt module as a fallback for crypt for platforms - where it's not available fixes #941 - -=== release 0.5.2 === - -2008-04-25 Arek Korbik - - * NEWS: - * RELEASE: - * configure.ac: - * flumotion.doap: - Releasing 0.5.2 "Can Tomas". - -2008-04-25 Arek Korbik - - * flumotion/component/component.py (BaseComponent.do_check, - BaseComponent.check_properties, BaseComponent.do_setup, - checkErrorCallback): - Resurect a part of the code that was removed in r5566 (and - mostly resurected in r6499): add checking for component's mood - before continuing with do_setup(). Update API docstrings. - Fixes #924. - - * doc/random/component-initialization-protocol: - Make the documentation bits consistent with the implementation. - -2008-04-24 Arek Korbik - - * flumotion.doap: - Update trac and repository URLs. - -2008-04-24 Johan Dahlin - - * flumotion/component/producers/bttv/bttv.py: - Workaround the case where no channels are specified, - fixes #934 - -2008-04-24 Arek Korbik - - * flumotion/component/consumers/shout2/shout2.py - (Shout2Consumer.get_pipeline_string, - Shout2Consumer.configure_pipeline): - Quote the properties passed to parse_launch, they may contain - spaces. Fix warning logging. - -2008-04-24 Johan Dahlin - - * flumotion/component/consumers/shout2/shout2_wizard.py - (Shout2Consumer.__init__): Make sure that all properties - are saved to the configuration file - - * flumotion/component/consumers/shout2/shout2_wizard.py - (Shout2Consumer.__init__): - mount_point is a required property, always set it - (Shout2Step.worker_changed): Set the worker name of the model. - - * flumotion/wizard/save.py (WizardSaver.addConsumer): - it's called shout2-consumer, not shout2. - - * flumotion/ui/kiwipatches.py (_open_glade): Use os.path.sep instead - of /. - -2008-04-23 Johan Dahlin - - * flumotion/wizard/overlaystep.py: - show_text moved to properties, fixes #936 - -2008-04-23 Thomas Vander Stichele - - * flumotion/admin/admin.py: - Store the connector when a connection is being made, so - we can mention it when we fail. - -2008-04-23 Thomas Vander Stichele - - * flumotion/admin/admin.py: - Tell us what we fail to connect to so we can solve the problem. - -2008-04-21 Johan Dahlin - - * flumotion/component/plugs/cortado/cortado_location.py.in: - Add OpenSuSE location here too. - -2008-04-21 Arek Korbik - - * flumotion/common/planet.py (ManagerAtmosphereState.empty): - Make a copy of a list before removing from it while iterating. - Fixes #931. - -2008-04-20 Thomas Vander Stichele - - * common/epydoc.mk: - * common/filterdoc.py: - Filter the output when generating epydoc, suppressing output from - modules outside of flumotion, like gobject, gtk, and twisted. - -2008-04-18 Johan Dahlin - - * flumotion/wizard/overlaystep.py (Overlay.getProperties): show-text - should be saved as a real property. Fixes #929 - - * flumotion/test/test_wizard_save.py (TestWizardSave): - Update tests - -2008-04-18 Johan Dahlin - - reviewed by: Zaheer - - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - * flumotion/component/plugs/cortado/cortado_wizard.py: - * flumotion/worker/checks/Makefile.am: - * flumotion/worker/checks/http.py: - * flumotion/worker/checks/package.xml: - - Don't use localhost for the porter, guess the public hostname instead. - Fixes #923 - -2008-04-17 Johan Dahlin - - * common/deb.mk: - * pkg/debian-common/NEWS: - * pkg/debian-common/README.Debian: - * pkg/debian-common/TODO.Debian: - * pkg/debian-common/compat: - * pkg/debian-common/control: - * pkg/debian-common/copyright: - * pkg/debian-common/default.xml: - * pkg/debian-common/dirs: - * pkg/debian-common/flumotion.docs: - * pkg/debian-common/flumotion.examples: - * pkg/debian-common/flumotion.init: - * pkg/debian-common/flumotion.install: - * pkg/debian-common/flumotion.postinst: - * pkg/debian-common/flumotion.postrm: - * pkg/debian-common/flumotion.rtupdate: - * pkg/debian-common/planet.xml: - * pkg/debian-common/pycompat: - * pkg/debian-common/rules: - * pkg/debian-common/watch: - * pkg/ubuntu-gutsy/NEWS: - * pkg/ubuntu-gutsy/README.Debian: - * pkg/ubuntu-gutsy/TODO.Debian: - * pkg/ubuntu-gutsy/changelog: - * pkg/ubuntu-gutsy/compat: - * pkg/ubuntu-gutsy/control: - * pkg/ubuntu-gutsy/copyright: - * pkg/ubuntu-gutsy/default.xml: - * pkg/ubuntu-gutsy/dirs: - * pkg/ubuntu-gutsy/flumotion.docs: - * pkg/ubuntu-gutsy/flumotion.examples: - * pkg/ubuntu-gutsy/flumotion.init: - * pkg/ubuntu-gutsy/flumotion.install: - * pkg/ubuntu-gutsy/flumotion.postinst: - * pkg/ubuntu-gutsy/flumotion.postrm: - * pkg/ubuntu-gutsy/flumotion.rtupdate: - * pkg/ubuntu-gutsy/planet.xml: - * pkg/ubuntu-gutsy/pycompat: - * pkg/ubuntu-gutsy/rules: - * pkg/ubuntu-gutsy/watch: - * pkg/ubuntu-hardy/changelog: - * pkg/ubuntu-hardy/control: - - Move most of the files over from ubuntu-gutsy to debian-common. - Add a new directory for ubuntu-hardy packages. - Change the deb makerules to take this into account. - -2008-04-16 Johan Dahlin - - * Makefile.am: - * pkg/ubuntu-gutsy/NEWS: - * pkg/ubuntu-gutsy/README.Debian: - * pkg/ubuntu-gutsy/TODO.Debian: - * pkg/ubuntu-gutsy/changelog: - * pkg/ubuntu-gutsy/compat: - * pkg/ubuntu-gutsy/control: - * pkg/ubuntu-gutsy/copyright: - * pkg/ubuntu-gutsy/default.xml: - * pkg/ubuntu-gutsy/dirs: - * pkg/ubuntu-gutsy/flumotion.docs: - * pkg/ubuntu-gutsy/flumotion.examples: - * pkg/ubuntu-gutsy/flumotion.init: - * pkg/ubuntu-gutsy/flumotion.install: - * pkg/ubuntu-gutsy/flumotion.postinst: - * pkg/ubuntu-gutsy/flumotion.postrm: - * pkg/ubuntu-gutsy/flumotion.rtupdate: - * pkg/ubuntu-gutsy/planet.xml: - * pkg/ubuntu-gutsy/pycompat: - * pkg/ubuntu-gutsy/rules: - * pkg/ubuntu-gutsy/watch: - Add a package for ubuntu-gutsy - -2008-04-16 Johan Dahlin - - * common/deb.mk: Add a makefile for building debian packages. - - * autogen.sh: Copy and force installation of missing files from automake - and libtool. - -2008-04-16 Arek Korbik - - * flumotion/component/combiners/composite/composite.xml: - Add note that z-order needs to be unique. - -2008-04-15 Johan Dahlin - - * flumotion/wizard/basesteps.py (VideoEncoderStep.get_next): - Move the get_next() method from all subclasses of VideoEncoderStep - to VideoEncoderStep itself, avoids duplication - -2008-04-15 Thomas Vander Stichele - - * flumotion/monitor/nagios/util.py: - Return the exit codes as well, for convenience. - Add some exceptions, so we can use errbacks to handle error cases. - -2008-04-15 Johan Dahlin - - * flumotion/component/producers/soundcard/soundcard_wizard.py - (SoundcardStep._update_inputs): - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py - (HTTPStep._check_elements.importError): - Add annoying fixmes to remind us to fix these errbacks - - * flumotion/worker/checks/check.py (do_check): Add this function, - missing from #921. - -2008-04-15 Thomas Vander Stichele - - * flumotion/component/encoders/dirac/dirac.xml: - Add component xml too. - -2008-04-15 Thomas Vander Stichele - - * flumotion/component/encoders/Makefile.am: - * flumotion/component/encoders/dirac/__init__.py: - * flumotion/component/encoders/dirac/dirac-wizard.glade: - * flumotion/component/encoders/dirac/dirac.py: - * flumotion/component/encoders/dirac/dirac_wizard.py: - * flumotion/component/muxers/muxers.xml: - Add a Dirac encoder component. Fixes #921. - -2008-04-14 Thomas Vander Stichele - - * Makefile.am: - * conf/Makefile.am: - * misc/validate-config.py: - Add a script to validate config files. - Run it as part of make check on some sample config files. - -2008-04-11 Johan Dahlin - - * flumotion/wizard/overlaystep.py: - Do not add a overlay component if we're missing elements/python modules. - Fixes #914 - -2008-04-11 Johan Dahlin - - Rubber-stamped by Arek - - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - * flumotion/component/producers/bttv/bttv_wizard.py: - * flumotion/component/producers/soundcard/soundcard_wizard.py: - * flumotion/component/producers/webcam/webcam_wizard.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - Introduce waitForTask/taskFinished methods on the configuration wizard - which blocks the interface and prevents you from clicking next. - This replaces the old block_next(True/False) calls which were - dangerous since they weren't stacked. - Fixes #917 and #888 - -2008-04-10 Thomas Vander Stichele - - * bin/flumotion-nagios.in: - Don't use GStreamer. as a side effect, makes -h/--help work. - -2008-04-09 Thomas Vander Stichele - - * flumotion/admin/gtk/dialogs.py: - Add 2008. - -2008-04-09 Thomas Vander Stichele - - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/producers/looper/looper.py: - * flumotion/worker/checks/check.py: - Fix some translatables. - -2008-04-09 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - Fix wrong translation string. - -2008-04-09 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/manager/admin.py: - Add a message to some asserts. - -2008-04-09 Thomas Vander Stichele - - * flumotion/configure/configure.py: - Give programs more time to react to a TERM before getting KILLed. - -2008-04-09 Thomas Vander Stichele - - * po/nl.po: - Update translation. - -2008-04-09 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/basicwatchdog.py: - Use correct variable when iterating. - * flumotion/component/combiners/switch/switch.py: - Extra debuging. - -2008-04-09 Johan Dahlin - - * flumotion/component/producers/videotest/videotest_wizard.py - (TestVideoProducerStep.worker_changed): Check for the level element, - fixes #915 - -2008-04-08 Johan Dahlin - - * data/glade/wizard_encoding.glade: - * flumotion/component/encoders/mulaw/mulaw-wizard.glade: - Add a label to the encoding page. - Don't expand vertically on the label on the mulaw page - -2008-04-08 Arek Korbik - - * flumotion/component/misc/httpserver/httpserver.py - (CancellableRequest.finish): Use stored fd number, in case the - transport's fd was closed early. Fixes #920. - -2008-04-08 Thomas Vander Stichele - - * flumotion/component/base/component.glade: - * flumotion/component/base/eaters.glade: - * flumotion/component/consumers/disker/disker.glade: - * flumotion/component/consumers/httpstreamer/httpstreamer-wizard.glade: - * flumotion/component/consumers/shout2/shout2-wizard.glade: - * flumotion/component/encoders/theora/theora-wizard.glade: - * flumotion/component/producers/looper/flufileinfo.glade: - * flumotion/component/producers/looper/looper.glade: - Unmark strings for translation. - Add/fix some tooltips. - -2008-04-04 Thomas Vander Stichele - - * flumotion/common/keycards.py: - Put the id in the repr of keycards. - -2008-04-04 Thomas Vander Stichele - - Reviewed by: Arek - - * flumotion/component/misc/httpserver/file.py: - Log the fd's and transfer ends. Fixes #919. - -2008-04-03 Johan Dahlin - - Reviewed by: Arek - - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/save.py: - Allow the firewire audio & video to be in different workers. - Fixes #909 - -2008-04-03 Thomas Vander Stichele - - * po/es.po: - Fix argument count mismatch. - -2008-04-03 Thomas Vander Stichele - - * flumotion/wizard/overlaystep.py: - Click Forward, not Next. - -2008-04-02 Pedro Gracia - - * flumotion/common/keycards.py: - * flumotion/component/base/http.py: - Added "path" to keycards in order to use a timed bouncer type. - -2008-04-02 Johan Dahlin - - * data/glade/wizard_production.glade: Add description label - and tooltips for the checkboxes - -2008-04-02 Johan Dahlin - - * flumotion/component/producers/firewire/firewire-wizard.glade: - * flumotion/component/producers/firewire/firewire_wizard.py: - Refactor signal handles, make a method private, rename and - merge a few others. - -2008-04-02 Thomas Vander Stichele - - * flumotion.spec.in: - Add intltool buildrequires - -2008-04-01 Pedro Gracia - - * po/es.po: - Spanish translation up to date. - -2008-04-01 Pedro Gracia - - * flumotion/wizard/worker.py: - Add spacing between worker label and worker combo. - Fixes #883. - -2008-03-28 Johan Dahlin - - * flumotion/component/producers/firewire/firewire_wizard.py - (_FireWireCommon.trapRemoteError): trap RemoteRunFailure, to avoid - printing warnings when firewire does not exist on a worker. - - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/save.py: - http-server components should be in the atmosphere and not the flow. - Fixes #901 - -2008-03-28 Michael Smith - - * flumotion/component/base/component.glade: - Make the debug header visible, so it's shown if debug is enabled. - -2008-03-28 Johan Dahlin - - * flumotion/admin/gtk/componentview.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/component.glade: - * flumotion/component/component.py: - Add an interface to the components tab to modify the - gstreamer/flumotion logging on the fly. - Introduce a new remote method setFluDebug on BaseComponentMedium. - -2008-03-28 Arek Korbik - - * flumotion/manager/config.py (PlanetConfigParser._parseFlow): - Humanize error message. - -2008-03-28 Johan Dahlin - - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/productionsteps.py: - Remove the worker list from the production page. - Remove canSelectWorker which is now unused. - -2008-03-27 Johan Dahlin - - * flumotion/wizard/save.py (WizardSaver.setVideoProducer) - (WizardSaver.setAudioProducer): Update exception messages. - - * flumotion/test/test_wizard_save.py - (TestWizardSave.testFirewireStreamer): - Unbreak the testsuite too. - - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/wizard/save.py: - Make firewire finally work again, this fixes #867 - -2008-03-27 Johan Dahlin - - * misc/clean-flumotion: - * scripts/run-local-manager: - Add a script to run a local manager, move and rename the clean - one to misc. - -2008-03-27 Johan Dahlin - - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/models.py: - * flumotion/wizard/overlaystep.py: - Generate proper feeder names and fix a typo of the step name - Part of #867 - -2008-03-27 Johan Dahlin - - * flumotion/admin/command/main.py: - Print errors on stderr and return an error code when it fails. - Fixes #908 - -2008-03-26 Thomas Vander Stichele - - * flumotion/component/producers/soundcard/soundcard.py: - Handle BUSY and OPEN_READ/OPEN_WRITE better so we get a nicer - message. Fixes #743. - * po/nl.po: - Add translation. - -2008-03-26 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - Wrap subclass method invoke into something that can catch - programming errors and shows them. - -2008-03-26 Pedro Gracia - - * flumotion/component/consumers/httpstreamer/httpstreamer-wizard.glade - Missing changes to fix #882. - -2008-03-26 Thomas Vander Stichele - - * flumotion/wizard/models.py: - Subclass from log.Loggable so we can debug. - * flumotion/component/encoders/theora/theora_wizard.py: - * flumotion/test/test_wizard_save.py: - Fix test by setting a default delta and checking for it. Really - fixes #885 - -2008-03-26 Johan Dahlin - - * flumotion/wizard/configurationwizard.py - (ConfigurationWizard._save): - Unbreak non-audio streams bug introduced in last commit. - -2008-03-26 Johan Dahlin - - reviewed by: Zaheer - - * flumotion/wizard/productionsteps.py: - Add a public hasVideo() method - - * flumotion/wizard/configurationwizard.py: - Use hasVideo() on the production step instead of - checking if the overlay step has been shown. - - Fixes #906 - -2008-03-26 Sebastien Merle - - reviewed by: Zaheer Abbas Merali - - * flumotion/component/bouncers/admin_gtk.py: - Updated to let the base class BaseAdminGtkNode handle - the listener registration and cleanup. - Fixes #900. - -2008-03-26 Michael Smith - - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - Pass the correct medium (the porter client medium) to - PorterClientFactory.startLogin(). - Fixes #904. - -2008-03-26 Thomas Vander Stichele - - reviewed by: Johan Dahlin - - * flumotion/component/encoders/theora/theora-wizard.glade: - * flumotion/component/encoders/theora/theora_wizard.py: - Use keyframe delta (in seconds), which is more natural than - keyframe spacing in frames. Fixes #885. - -2008-03-26 Zaheer Abbas Merali - - * flumotion/component/producers/soundcard/soundcard_wizard.py: - Remove 8 bit option for soundcard completely. - -2008-03-26 Zaheer Abbas Merali - - reviewed by: Johan Dahlin - - * flumotion/component/producers/soundcard/soundcard_wizard.py: - Use sensible defaults for soundcard producer. - Fixes #870. - -2008-03-26 Thomas Vander Stichele - - * flumotion/component/producers/audiotest/audiotest-wizard.glade: - Add units. - -2008-03-26 Thomas Vander Stichele - - * flumotion/component/producers/videotest/videotest-wizard.glade: - Add units. - -2008-03-26 Zaheer Abbas Merali - - reviewed by: Michael Smith - - * flumotion/admin/gtk/client.py: - * flumotion/manager/admin.py: - Remove dangerous debug options. Fixes #893. - -2008-03-26 Sebastien Merle - - reviewed by: Johan Dahlin - - * flumotion/admin/gtk/parts.py: - Do not use data function for PID column, it cannot be sorted. - Fixes #312. - -2008-03-26 Thomas Vander Stichele - - * data/glade/Makefile.am: - * data/glade/wizard_source.glade: - * data/glade/wizard_production.glade: - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - * flumotion/component/producers/audiotest/audiotest_wizard.py: - * flumotion/component/producers/bttv/bttv_wizard.py: - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/component/producers/soundcard/soundcard_wizard.py: - * flumotion/component/producers/videotest/videotest_wizard.py: - * flumotion/component/producers/webcam/webcam_wizard.py: - * flumotion/test/test_wizard.py: - * flumotion/wizard/basesteps.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/overlaystep.py: - * flumotion/wizard/productionsteps.py: - * po/POTFILES.in: - Change wrongly named source/Source instances to (p|P)roduc(er|tion). - Fixes #901. - -2008-03-26 Michael Smith - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/httpstreamer.glade: - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - Add a row to the http admin showing the current aggregate client bitrate - usage. Rename 'Bitrate' to 'Average bitrate' to clarify what the other - one is. - Fixes #815. - -2008-03-26 Pedro Gracia - - * data/glade/authenticate.glade: - * data/glade/open-connection.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_source.glade: - * flumotion/component/consumers/disker/disker-wizard.glade: - * flumotion/component/consumers/httpstreamer/httpstreamer-wizard.glade: - * flumotion/component/consumers/shout2/shout2-wizard.glade: - * flumotion/component/encoders/jpeg/jpeg-wizard.glade: - * flumotion/component/encoders/smoke/smoke-wizard.glade: - * flumotion/component/producers/audiotest/audiotest-wizard.glade: - * flumotion/component/producers/soundcard/soundcard-wizard.glade: - * flumotion/component/producers/videotest/videotest-wizard.glade: - xalign property in labels and alignments changed to 0. - Fixes #882. - -2008-03-26 Johan Dahlin - - * flumotion/component/base/component.glade: - Make all the labels in the newly added statistics tab selectable, - as suggested by Mike. - -2008-03-26 Michael Smith - - * flumotion/admin/gtk/componentview.py: - Don't attempt to display UI for sad components. - Fixes #899. - -2008-03-26 Johan Dahlin - - * data/cortado-template.html: - Add a check and redirect to www.flumotion.com/java if java is not installed. - Fixes #887 - -2008-03-26 Johan Dahlin - - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - Require multifdsink and twisted.web. - - * flumotion/wizard/configurationwizard.py: - Block based on presence of missing elements - -2008-03-26 Sebastien Merle - - reviewed by: Johan Dahlin - - * flumotion/admin/gtk/componentview.py: - * flumotion/component/bouncers/admin_gtk.py: - Made the NodeBook a Loggable instance. - Made the bouncer GTK admin set the keycard title to prevent warnings. - -2008-03-26 Thomas Vander Stichele - - * flumotion/wizard/configurationwizard.py: - Fix typo in API. - -2008-03-26 Zaheer Abbas Merali - - reviewed by: Johan Dahlin - - * flumotion/component/encoders/Makefile.am: - * flumotion/component/encoders/mulaw/mulaw-wizard.glade: - * flumotion/component/encoders/mulaw/mulaw.xml: - * flumotion/component/encoders/mulaw/mulaw_wizard.py: - * po/POTFILES.in: - Create a mulaw wizard. Fixes #194. - -2008-03-26 Michael Smith - - * flumotion/manager/manager.py: - Delete messages from component state when stopping a sad component. - Fixes #797. - -2008-03-26 Thomas Vander Stichele - - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/save.py: - Make saving of config with a producer-video use consistent naming. - -2008-03-26 Thomas Vander Stichele - - * flumotion/common/documentation.py: - Forgot to rename an attribute to .section here too. Fixes #897. - -2008-03-20 Michael Smith - - * flumotion/configure/configure.py: - Figure out our directory early on, when configure is first imported - (before daemonising). - * flumotion/worker/job.py: - Spawn jobs from this directory - Fixes #873. - -2008-03-26 Johan Dahlin - - * flumotion/admin/gtk/connections.py (Connections.__init__): - Make the recent hostname column in the connection dialog searchable. - Fixes #880 - -2008-03-26 Johan Dahlin - - * flumotion/wizard/configurationwizard.py - (ConfigurationWizard.hasAudio): - Use the hasAudio method on the production step to find out - if we will include audio. We can't just get the model, because - it's not created yet. - - * flumotion/wizard/productionsteps.py (ProductionStep.hasAudio): - New method. - - Fixes #884 - -2008-03-26 Johan Dahlin - - * flumotion/wizard/models.py: - (Component.__repr__): print the fully qualified name of the class - instead of always showing 'Component' - - * flumotion/wizard/models.py: - Make the AudioProducer inheirt from Producer, not Component. - - * flumotion/wizard/save.py: - Allow video and audio producers to be subclasses of Producer. - - * flumotion/test/test_wizard_save.py: - Create one producer and use it for both audio and video - -2008-03-26 Johan Dahlin - - * flumotion/test/test_wizard_save.py - (TestWizardSave): avoid hard coding the version, otherwise we'll - just break when the version number is bumped. - - * flumotion/test/test_wizard_save.py - (TestWizardSave.testDefaultStream): Add a firewire test. - - * flumotion/wizard/productionsteps.py (ProductionStep.setup): - Populate production combos in setup() instead of activate(), to - avoid reverting to the default state when going back to this step. - -2008-03-25 Zaheer Abbas Merali - - * doc/random/wizard-plugin: - Fix up docs based on start of doing dvb wizard. - -2008-03-25 Thomas Vander Stichele - - * flumotion/component/base/Makefile.am: - Actually dist the base component.glade so the admin works again. - -2008-03-25 Johan Dahlin - - * flumotion/component/producers/firewire/firewire_wizard.py - (FireWireVideoProducer.getFeeders): chain up to VideoProducer, not - AudioProducer - - * flumotion/wizard/productionsteps.py (ProductionStep.plugin_loaded): - Do not call worker_changed an extra time, it's not necessary since - the wizard is already calling it for us a bit later. - -2008-03-24 Thomas Vander Stichele - - * flumotion/admin/connections.py: - The recent connections code also uses registry dir, so ensure it. - -2008-03-24 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - - configure.get() should not have side effects like creating - directories. Fixes #875. - -2008-03-24 Thomas Vander Stichele - - reviewed by: Johan Dahlin - - * flumotion/admin/gtk/message.py: - * flumotion/common/Makefile.am: - * flumotion/common/documentation.py: - * flumotion/common/messages.py: - * flumotion/common/worker.py: - Add a way for messages to link to online documentation. - Fixes #874. - -2008-03-24 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/componentview.py: - * flumotion/admin/gtk/main.py: - Add an enable debug option in the admin interface. - Reviewed by Zaheer, fixes #825 - -2008-03-20 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/basicwatchdog.py: - Make sure autoswitch() is only run when all sink pads - of all switch elements have received data, ie not in - middle of startup. - * flumotion/component/combiners/switch/switch.py: - Set active-pad property on switch elements at start. - Add some extra debug. - -2008-03-20 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py: - Actually make idealFeed respect its definition and only - change it when requested to by user or by external influence - such as by ical event or pattern switch. This entails do_switch() - allowing switch to feed other than the ideal feed and switch_to() - only called when a change to the ideal feed is required. - -2008-03-20 Michael Smith - - * flumotion/component/base/admin_gtk.py: - Don't pass unset values. Avoids an exception subtracting None from an - integer. - * flumotion/component/producers/soundcard/soundcard.py: - Zero is not a good number to divide by. - -2008-03-19 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py: - Emit signal with the pad not the name of the pad, maybe this - will help it work. - -2008-03-18 Arek Korbik - - * flumotion/worker/base.py (JobProcessProtocol.processEnded): - Don't blame GStreamer's corrupt registry for any early exit. - -2008-03-18 Arek Korbik - - * flumotion/common/python.py (makedirs): - For python < 2.5 provide a local copy of python2.5's os.makedirs() - that adds checks for EEXIST. - - * flumotion/common/bundle.py (Unbundler.unbundle): - * flumotion/common/common.py (ensureDir): - * flumotion/common/registry.py (ComponentRegistry.save): - * flumotion/manager/admin.py (AdminAvatar._saveFlowFile): - * flumotion/service/service.py (Servicer.createManager, - Servicer.createWorker): - Use our new local makedirs() function. Fixes #865. - -2008-03-18 Michael Smith - - * flumotion/component/base/admin_gtk.py: - Check for None and 0. - -2008-03-18 Johan Dahlin - - * flumotion/component/base/admin_gtk.py - (ComponentAdminGtkNode._updateVSize): check for None instead of 0, - remove trailing whitespace. - -2008-03-17 Michael Smith - - * flumotion/component/base/component.glade: - Change the glade file to remove some unused rows, and to set the label - defaults to N/A, rather than nonsense values. - -2008-03-17 Michael Smith - - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/base.xml: - * flumotion/component/base/component.glade: - * po/POTFILES.in: - Add a component tab for all components. - Displays uptime, cpu usage, virtual size, etc. - Fixes #806. - -2008-03-17 Johan Dahlin - - * data/glade/connection-dialog.glade: - * data/glade/greeter-load_connection.glade: - * flumotion/admin/gtk/connections.py: - * flumotion/admin/gtk/greeter.py: - Remove dead selection code, prevents warnings - in the test suite and fixes #863 - -2008-03-13 Michael Smith - - * doc/random/component-initialization-protocol: - Fix naming in docs to match actual implementation. - -2008-03-12 Michael Smith - - * doc/random/component-initialization-protocol: - Update to describe the changes in this commit. - * flumotion/component/component.py: - Call an instance method (setup_completed) when the do_setup chain is - completed. - Set mood to happy in base class implementation of this. - * flumotion/component/feedcomponent010.py: - Override setup_completed to not set mood to happy (that is done when - the pipeline reaches PLAYING) - Do not wait for pipeline to get to playing in do_setup. - Fixes #862. - -2008-03-12 Thomas Vander Stichele - - * flumotion/component/producers/firewire/firewire_wizard.py: - Run a check that actually exists. Amazingly, my Fedora 7 with - new firewire stack actually works as is with GStreamer. But - the device is named /dev/fw0 so the check needs further fixing. - -2008-03-10 Michael Smith - - * flumotion/component/base/http.py: - Ensure that all authentication errors (no matter what type) result in an - appropriate error code being sent to the user, and the user being - disconnected. - -2008-03-07 Michael Smith - - * flumotion/component/misc/httpserver/file.py: - Allow createProducerConsumerProxy to return a deferred. - * flumotion/component/misc/httpserver/ratecontrol.py: - Document this. - -2008-03-07 Johan Dahlin - - * misc/clean-flumotion: - Add a horribly broken, but still pretty useful script to - clean up all flumotion temporary files in /tmp, when - starting from the manager from the wizard. - -2008-03-06 Johan Dahlin - - * data/glade/admin-wizard.glade: - * data/glade/wizard.glade: - Put the wizard buttons in the end, instead of separately. - -2008-03-06 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py: - Sets are not jellyable, so convert to list otherwise error - does not show. - -2008-03-06 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py: - It actually changed name to input-selector not selector, but - the plugin name is selector. - Capsfilter was given an extra , between framerate and par. - Properties are video-framerate and video-pixel-aspect-ratio - not framerate and pixel-aspect-ratio. - -2008-03-06 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py: - switch element changed name to selector between 0.10.5 and - 0.10.6 - -2008-03-05 Johan Dahlin - - * flumotion/manager/admin.py (AdminAvatar.perspective_cleanComponents): - Undeprecate, since there are no alternatives. - -2008-03-05 Michael Smith - - * configure.ac: - * misc/flumotion-verify-config.in: - Add a simple test script to check that a config file is valid. - -2008-03-05 Zaheer Abbas Merali - - * flumotion/twisted/compat.py: - Fix typo. - -2008-03-05 Johan Dahlin - - * flumotion/common/server.py (IServable): Remove self argument from - methods. - - * flumotion/twisted/compat.py: Print a warning when imported, so - extenal modules depend on it can be migrated. - -2008-03-05 Arek Korbik - - * flumotion/component/misc/httpserver/httpserver.py: - Comment on the not-necessary-obvious calling context of the - connectionLost() handler. - -2008-03-04 Johan Dahlin - - * flumotion/wizard/configurationwizard.py (_set_worker_from_step): - Remove unused method. - - * flumotion/wizard/Makefile.am: - * flumotion/wizard/interfaces.py: - Add a new file with wizard plugin interfaces: - - IProductionPlugin - - IEncoderPlugin - - IHTTPConsumerPlugin - - * flumotion/component/encoders/jpeg/jpeg_wizard.py: - * flumotion/component/encoders/smoke/smoke_wizard.py: - * flumotion/component/encoders/speex/speex_wizard.py: - * flumotion/component/encoders/theora/theora_wizard.py: - * flumotion/component/encoders/vorbis/vorbis_wizard.py: - * flumotion/component/plugs/cortado/cortado_wizard.py: - * flumotion/component/producers/audiotest/audiotest_wizard.py: - * flumotion/component/producers/bttv/bttv_wizard.py: - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/component/producers/soundcard/soundcard_wizard.py: - * flumotion/component/producers/videotest/videotest_wizard.py: - * flumotion/component/producers/webcam/webcam_wizard.py: - Mark the plugin steps as implementing one of the three added interfaces - - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - Add FIXME's so we remember to check the interfaces in the future - - Fixes #858 - -2008-03-04 Johan Dahlin - - * flumotion/common/interfaces.py: General maintainance: - - Remove self from arguments - - add @param to missing parameters - - Add two empty new lines between classes (PEP-8) - - Remove initial newline in docstring (PEP-8) - - Remove unnecessary pass statements - -2008-03-03 Johan Dahlin - - * flumotion/admin/gtk/greeter.py (Greeter.__init__): Fix the height of the - greeter to avoid re-sizing it later on. - Hopefully this will make me clear the list of recent connections by mistakes - less times. - - * flumotion/wizard/productionsteps.py (ProductionStep._verify): Un-bitrot, - - wait for all producers to be loaded before trying to figure out if - something should be prevented - - use new canSelectWorker() method on parent, instead of relying of - external poking at internal variables from productionstep - (ProductionStep._populate_combos): set an instance variable when we're done, - so it can be checked in _verify. - - * flumotion/wizard/configurationwizard.py: - Use isinstance instead of hasttr(worker), simplify model selection. - (ConfigurationWizard.canSelectWorker): New method - - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py - (HTTPStreamer.getProperties) - (HTTPStep.setup): Even if we use a porter, set the port of the streamer so - it shows up correctly in the component admin interface. - This makes fixes so the right port is shown when we use audio only or video - only which has a different default port. - - * flumotion/component/consumers/httpstreamer/admin_gtk.py - (StatisticsAdminGtkNode._updateLabels): set_uri/linkbutton constructor - does not accept None, add a workaround for that. - - * flumotion/wizard/configurationwizard.py: - Do not add an overlay step if we didn't visit one - - * flumotion/wizard/save.py: - Don't allow a video overlay component to be added unless we haven't - set a video producer first. - - * flumotion/test/test_wizard_save.py: - Add a test for the above - - Should fix #854 - -2008-03-03 Johan Dahlin - - * flumotion/test/test_wizard_save.py (TestWizardSave.testOggStream): - New test for audiotest/videotest/vorbis/theora and ogg - - * flumotion/wizard/save.py (WizardSaver._handleVideoProducer) - (WizardSaver._handleAudioProducer): Raise ValueError exceptions if there - are no encoders set - -2008-03-03 Johan Dahlin - - * flumotion/test/test_wizard_save.py (TestWizardSave.testDefaultStream) : - Refactor tests into methods, and reuse by other tests. - -2008-03-03 Johan Dahlin - - * flumotion/test/test_wizard_save.py (TestWizardSave.testDefaultStream) - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - set burst-on-connect to False by default, update tests. - -2008-03-03 Johan Dahlin - - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - Make it work with kiwi 1.9.14, by setting a default value for booleans - -2008-03-03 Pedro Gracia - - * flumotion/component/bouncers/bouncer.py: - Added getEnabled function in bouncer. - Fixes #856. - -2008-03-01 Johan Dahlin - - * flumotion/worker/checks/encoder.py: - * flumotion/worker/checks/gst010.py: - * flumotion/worker/checks/video.py: - * flumotion/worker/feedserver.py: - * flumotion/worker/main.py: - * flumotion/worker/medium.py: - * flumotion/worker/worker.py: - Remove unused imports to make pyflakes happier. - -2008-02-29 Johan Dahlin - - * flumotion/test/test_wizard.py: - * flumotion/ui/wizard.py: - Remove get_state, get_step_option and get_step_options which are not used any - longer. Horray! - -2008-02-29 Johan Dahlin - - * flumotion/wizard/configurationwizard.py (ConfigurationWizard.hasAudio) - (ConfigurationWizard.hasVideo): New methods - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/overlaystep.py: - Replace get_step_option() for checking if there's audio or video - with method calls to wizard. - -2008-02-29 Johan Dahlin - - * flumotion/wizard/save.py (WizardSaver._handleProducers): Check so both - audio and video producer exists before comparing their component_type. - -2008-02-29 Johan Dahlin - - * flumotion/test/test_wizard_models.py: - * flumotion/wizard/models.py: - Do _ -> - conversion in __contains__ too, add tests. - -2008-02-29 Johan Dahlin - - * flumotion/wizard/Makefile.am: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/enums.py: - * po/POTFILES.in: - Get rid of LicenseType and use prefill directly. - Kill flumotion/wizard/enums.py! - -2008-02-29 Johan Dahlin - - * flumotion/test/test_wizard_save.py: - (TestWizardSave.testMultiFeedProducer): Add another test for a multi feed - component such as firewire. - - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py - (HTTPStreamer.getProperties): Only delete properties if they were set. - * flumotion/wizard/configurationwriter.py: - Add an assert on None, we want only strings here. - * flumotion/test/test_wizard_save.py: - Write a test which tests wizard saving class. - -2008-02-29 Johan Dahlin - - * flumotion/wizard/save.py (WizardSaver._handleVideoOverlay): - Simplify overlay handling by always linking video and then let the overlay - unlink and relink. Rename and reorganize some methods. - - * flumotion/wizard/models.py (Component.unlink): New method - - * flumotion/component/consumers/httpstreamer/httpstreamer.glade: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/misc/httpserver/httpserver.glade: - * flumotion/component/misc/httpserver/admin_gtk.py: - Tweak the UI by moving the URL out of the toplevel table - -2008-02-29 Johan Dahlin - - * flumotion/test/test_wizard_save.py: Remove unused imports - - * flumotion/wizard/save.py: Remove extra 4 at the top of the file. Grr. - - * flumotion/test/test_wizard_models.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/models.py: - Remove the Flow class and the tests, we never ended up using it, since the - state is fetched after the completion of the wizard, not during. - -2008-02-29 Johan Dahlin - - * flumotion/ui/wizard.py: - Remove flowName here, it should only be set in a subclass - - * flumotion/wizard/conversionsteps.py: - Remove get_muxer, we're not using it any longer. - - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - * flumotion/wizard/basesteps.py: - Move getServerConsumers and getPorters to the base class - - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/save.py: - Separate the component building from extraction of step state, - so the save logic can be reused by other interfaces. - This completes the wizard MVC separation! - -2008-02-29 Michael Smith - - * flumotion/component/converters/overlay/overlay.py: - Add a warning to the component if we're running with videomixer 0.10.7, - since it has a bug that results in many CRITICALs being printed (one per - frame). - -2008-02-29 Johan Dahlin - - * flumotion/component/encoders/vorbis/vorbis_wizard.py - (VorbisAudioEncoder.__init__): - * flumotion/component/encoders/vorbis/vorbis-wizard.glade: - Make the bitrate selected by default, both in the glade file - and in the model. - -2008-02-28 Johan Dahlin - - * flumotion/wizard/configurationwizard.py - (ConfigurationWizard.getConsumtionSteps): New method - - * flumotion/ui/wizard.py (SectionWizard.getVisitedSteps): - New method - - * flumotion/wizard/basesteps.py (ConsumerStep): New base class - for all consumption steps. - - * flumotion/wizard/save.py (WizardSaver._handleConsumers): - Simplify considerably, with help of the getConsumptionSteps method - and ConsumerStep base class. - - * flumotion/component/consumers/disker/disker_wizard.py - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py - * flumotion/component/consumers/shout2/shout2_wizard.py - Update consumption steps to the new api. - - * flumotion/wizard/consumptionsteps.py: Avoid using strings to - construct the steps we want to use, just use class references - instead. - -2008-02-27 Johan Dahlin - - * flumotion/test/test_wizard_save.py: - Use the new Component class instead of the old one in save.py which - is removed. - -2008-02-27 Johan Dahlin - - * flumotion/wizard/save.py: - Remove Component which is now unused, and disable Loggable in - the WizardSaver is not used. - -2008-02-27 Johan Dahlin - - * flumotion/component/consumers/shout2/shout2_wizard.py: - * flumotion/wizard/save.py: - Convert the shout2 step to use a model and proxy. - -2008-02-27 Johan Dahlin - - * flumotion/component/consumers/disker/disker-wizard.glade: - * flumotion/component/consumers/disker/disker_wizard.py: - * flumotion/wizard/save.py: - Convert the disker step to use a model and proxy. - -2008-02-27 Johan Dahlin - - * flumotion/component/producers/firewire/firewire_wizard.py: - Move old bits specific for the wirefire components from save.py - to here. - - * flumotion/wizard/configurationwriter.py: - eaters is a generator, so use list() around it. - Call getProperties() instead of accessing props directly - - * flumotion/wizard/models.py: - Add getFeeders() and link() methods and move over fraction logic - here, since it only applies to producers. - - * flumotion/wizard/save.py: - Send the components directly instead of using the middle layer component - class. Still need to port over disker and shout2 components. - Add getProperties and simplify getFeeders() - -2008-02-27 Johan Dahlin - - * flumotion/component/producers/videotest/videotest-wizard.glade: - * flumotion/component/producers/videotest/videotest_wizard.py: - Make the width/height/framerate entries smaller and right align them - - * flumotion/wizard/conversionsteps.py (ConversionStep.get_muxer): - Add a new method to get the muxer model. - (ConversionStep.activated): When going back to this step, do not - reset the options made by the user. - (setup): Remove, code in here is unused. - (ConversionStep._muxer_changed): Remove dead assignment to self._muxer - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - Prevent error on component shutdown. - - * flumotion/admin/gtk/client.py: Fix a typo in a docstring - - * data/glade/wizard_summary.glade: - * data/glade/wizard_welcome.glade: - - Use GtkLabel instead of GtkTextView - -2008-02-27 Michael Smith - - * flumotion/component/consumers/disker/disker.py: - Remove a bitrotten remote method; the implementation was obviously - broken, and Zaheer says the semantics are no longer meaningful. - - * flumotion/component/misc/httpserver/ratecontrol.py: - Add some comment, tweak the drip interval for lower CPU usage. - - * flumotion/component/producers/playlist/playlist.py: - Fix up for API changes. - - * flumotion/component/producers/unixdomain/unixdomain.py: - Add a TODO to fix this one up for API changes. - -2008-02-26 Michael Smith - - * flumotion/test/test_common_netutils.py: - Add a test to check that route iteration correctly goes from - most-specific to least specific. - -2008-02-25 Johan Dahlin - - * flumotion/admin/gtk/greeter.py: - Reset the stock label of the next button when going back. - - * flumotion/ui/simplewizard.py: - on_next is not a callback, so put it in WizardStep section. - Change the next button to 'connect' where appropriate. - Grab focus, so the enter->enter->enter use case works as expected - -2008-02-25 Johan Dahlin - - * flumotion/admin/gtk/greeter.py: Reorganize imports, group - and annotate the methods of the wizard steps. - - * flumotion/wizard/configurationwizard.py: - Add an new API to fetch a wizard entries - - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - Use the new API here. - - * flumotion/manager/admin.py: - Fix a syntax typo in a doc string - -2008-02-25 Michael Smith - - * flumotion/component/misc/httpserver/ratecontrol.py: - Rewrite buffer handling to avoid doing so many buffer copies, in an - attempt to make it use less cpu. - Mostly unsuccessful. - -2008-02-25 Johan Dahlin - - * flumotion/component/consumers/httpstreamer/httpstreamer.py: - Do not unconditionally append the result of remove_all_clients, it might - return None if the components bootstrap failed. - - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - Use the registry data before trying to instantiate the plugin, avoids - importing a plugin which is not supported. - -2008-02-25 Arek Korbik - - * flumotion/common/medium.py (PingingMedium._ping): - Add errback handler for the 'ping' remote call. - -2008-02-25 Johan Dahlin - - * flumotion/test/test_wizard_save.py: remove the now unused socket - attribute too. - -2008-02-25 Michael Smith - - * flumotion/test/test_wizard_save.py: - Fix up test now that we're not writing the socket. - -2008-02-25 Michael Smith - - * flumotion/component/plugs/cortado/cortado_wizard.py: - Remove 'socket' here; no longer needed since the config writer doesn't - use it now. - -2008-02-25 Michael Smith - - * flumotion/common/config.py: - Nothing uses the 'socket' attribute on a plug. So, make it - optional/deprecated. - * flumotion/manager/config.py: - Don't write the deprecated socket attribute. - * flumotion/wizard/configurationwriter.py: - Don't write the deprecated socket attribute. - -2008-02-25 Michael Smith - - * flumotion/component/misc/httpserver/httpserver.py: - Don't assert for things that aren't programming errors. - * flumotion/component/misc/httpserver/httpserver.xml: - Clean up after Johan's renaming; finish it. - -2008-02-25 Michael Smith - - * flumotion/admin/admin.py: - Revert r6273. The added code was wrong, as was the commit message it came - with. - -2008-02-22 Johan Dahlin - - * configure.ac: - * flumotion/component/misc/Makefile.am: - * flumotion/component/misc/cortado/Makefile.am: - * flumotion/component/misc/cortado/__init__.py: - * flumotion/component/misc/cortado/cortado.py: - * flumotion/component/misc/cortado/cortado.xml: - * flumotion/component/misc/cortado/cortado_location.py.in: - * flumotion/component/misc/cortado/cortado_wizard.py: - * flumotion/component/plugs/Makefile.am: - * flumotion/component/plugs/cortado/Makefile.am: - * flumotion/component/plugs/cortado/cortado.py: - * flumotion/component/plugs/cortado/cortado_wizard.py: - - Move the cortado plug from misc/ to plugs/ - -2008-02-22 Johan Dahlin - - * flumotion/component/consumers/httpstreamer/Makefile.am: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http-wizard.glade: - * flumotion/component/consumers/httpstreamer/http.glade: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/consumers/httpstreamer/http_wizard.py: - * flumotion/component/consumers/httpstreamer/httpstreamer.xml: - * flumotion/component/consumers/httpstreamer/httpstreamer_wizard.py: - * flumotion/test/test_component_httpstreamer.py: - * flumotion/wizard/consumptionsteps.py: - * po/POTFILES.in: - - Rename httpstreamer/http* to httpstreamer/httpstreamer. - -2008-02-22 Johan Dahlin - - * configure.ac: - * flumotion/component/misc/Makefile.am: - * flumotion/component/misc/httpfile/Makefile.am: - * flumotion/component/misc/httpfile/__init__.py: - * flumotion/component/misc/httpfile/admin_gtk.py: - * flumotion/component/misc/httpfile/file.py: - * flumotion/component/misc/httpfile/httpfile.glade: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/httpfile.xml: - * flumotion/component/misc/httpfile/ratecontrol.py: - * flumotion/component/misc/httpserver/Makefile.am: - * flumotion/component/misc/httpserver/admin_gtk.py: - * flumotion/component/misc/httpserver/file.py: - * flumotion/component/misc/httpserver/httpfile.xml: - * flumotion/component/misc/httpserver/httpserver.glade: - * flumotion/component/misc/httpserver/httpserver.py: - * flumotion/component/misc/httpserver/httpserver.xml: - * flumotion/component/misc/httpserver/ratecontrol.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_component_httpserver.py: - * flumotion/test/test_misc_httpfile.py: - * po/POTFILES.in: - - Rename httpfile to httpserver in the file system hierarchy. - Merge test_misc_httpfile into test_component_httpserver. - Change the socketname to point to a class, check for plug - presence by examining the dictionary value, not just the key. - -2008-02-22 Michael Smith - - * flumotion/component/misc/httpfile/file.py: - Rename 'request' to 'consumer' in FileTransfer: it has always been used - as a generic consumer here; now in practice it's not a request object if - we use the rate control plug. - * flumotion/component/misc/httpfile/httpfile.py: - Move RateController plug interface class to ratecontrol.py - * flumotion/component/misc/httpfile/ratecontrol.py: - Add a concrete implementation of RateController: FixedRatePlug, which - serves all files at the same (fixed; in the config file) speed. - * flumotion/component/misc/httpfile/httpfile.xml: - Add new plug and bundle for it. - -2008-02-22 Michael Smith - - * flumotion/component/misc/httpfile/file.py: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/httpfile.xml: - Add a plug interface for httpfile to put a producer/consumer proxy - between filetransfer and request. This can be used to hook up the rate - control stuff. - -2008-02-22 Johan Dahlin - - * flumotion/admin/gtk/connections.py (Connections.grab_focus): - Select and grab the focus of the treeview here instead of the - constructor which is called too early. - - * flumotion/test/test_component_httpserver.py - (PlugTest.testSetRootResourceMultiple): Add a new (disabled) test which - shows that you cannot add two plugs to the same httpfile. - - * flumotion/component/consumers/httpstreamer/http_wizard.py: - Enable all http consumer plugins by default and - fix a bug in the plugin code to make that possible. - * flumotion/component/misc/cortado/cortado_wizard.py: - Check the type of the framerate property before attempting to - parse it as a fraction. - -2008-02-22 Johan Dahlin - - * flumotion/component/consumers/httpstreamer/http.py: - PEP-8ify imports and docstrings - Remove unused imports - - * flumotion/wizard/models.py (Plug.getProperties): Make a copy - of the properties dict when saving, so we can freely delete properties - we don't want to save without messing up the internal state of - the component models. - - * flumotion/component/misc/cortado/cortado.py: - Use endswith instead of [-1] - - * flumotion/component/misc/cortado/cortado_wizard.py: - Export /cortado/, so clicking on the link works. - - * flumotion/component/misc/httpfile/admin_gtk.py: - * flumotion/component/misc/httpfile/httpfile.glade: - Use the new linkwidget to display the stream url. - - * flumotion/component/misc/httpfile/httpfile.py: - Export the stream-url handler. Handle trailing / in resource names. - -2008-02-22 Johan Dahlin - - * flumotion/ui/linkwidget.py: Do not import gobject - * Makefile.am (PYCHECKER_BLACKLIST): Blacklist linkwidget.py - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.glade: - * flumotion/ui/Makefile.am: - * flumotion/ui/linkwidget.py: - - Clean up the http streamers admin interface, refactor the - link widget to a separate file and add support for gtk.LinkButton - present in gtk+ 2.10. - -2008-02-22 Sebastien Merle - - * flumotion/admin/admin.py: - The Deferred returned by connectToManager was never fired on success. - -2008-02-22 Michael Smith - - * flumotion/component/misc/httpfile/ratecontrol.py: - Add a bunch of comments, rename class, clean up code. - -2008-02-22 Sebastien Merle - - * flumotion/admin/admin.py: - Only check one time for failure type :) - -2008-02-22 Johan Dahlin - - * flumotion/component/misc/httpfile/admin_gtk.py: - Clean up, make a few methods private and organize methods by type. - Make all internal attributes private and avoid hasattr. - -2008-02-21 Johan Dahlin - - * flumotion/component/misc/cortado/cortado_wizard.py - (CortadoHTTPPlug.getProperties): the streamers framerate property - is a fraction, convert it to an integer here which is what cortado - expects. - - * flumotion/component/consumers/httpstreamer/http_wizard.py - (HTTPStreamer.getProperties): Do not delete the ports property, it's - used by the plugs. - -2008-02-20 Johan Dahlin - - * flumotion/wizard/configurationwriter.py (ConfigurationWriter): - Handle fractions, write x/y instead of (x, y). - - * flumotion/test/test_manager_config.py (TestPlanetConfigParser): - Add a couple of new planet tests, clean up manager config ones to be - consistent - -2008-02-20 Johan Dahlin - - * flumotion/test/test_manager_config.py: - * flumotion/manager/config.py: - Add a new test file - - * flumotion/test/Makefile.am: - Reindent and remove trailing whitespace - -2008-02-20 Johan Dahlin - - * flumotion/test/test_component_httpserver.py - Version test twisted using twisted.copyright.version, available - since twisted 1.0.0. - (PlugTest.testSetRootResource): Disable all tests on old twisted for now - (PlugTest.setUp): Set component to None, in case it never gets set later. - (MountTest.testFileMountEmpty): Re-enable all tests except the one which does not run - locally on twisted 2.0.1/2.2.0. - - * flumotion/test/test_component_httpserver.py - (MountTest.testDirMountEmpty, MountTest.properties): - Disable on pre twisted 2.5.0, to make buildbots happy. - - * flumotion/test/test_component_httpserver.py (MountTest): - Chain deferred by using DeferredList with fireOnOneErroback enabled, half of - the tests before this change were actually failing. - - * flumotion/component/misc/httpfile/httpfile.py - (HTTPFileStreamer._getDefaultRootResource): Do not strip the leading character, - it will be done later in _createRootResourceForPath(). - -2008-02-19 Michael Smith - - * flumotion/component/misc/httpfile/Makefile.am: - * flumotion/component/misc/httpfile/ratecontrol.py: - Add rate control code; not committing the bits to hook it into - http-server yet. First working version; still needs lots of cleanup. - -2008-02-19 Johan Dahlin - - * flumotion/worker/checks/cortado.py (checkCortado): Oops, forgot - pychecker again. msg instead of filename - - * flumotion/admin/gtk/greeter.py (Initial.setup): - Fix a long-standing annoying bug: always keep a radio button focus on the - first greeter page and make pressing enter go to the next step. - Also refactor the initial step a bit, so it's actually understandable. - - * flumotion/worker/checks/cortado.py (checkCortado): Add debugging to the - cortado check - - * flumotion/admin/gtk/componentview.py - (ComponentView._get_widget_constructor): Add component view wire - compatibility with platform-3. - -2008-02-18 Johan Dahlin - - * flumotion/component/misc/cortado/cortado_location.py.in - (getCortadoFilename): - Check for cortado.jar in /usr/share/cortado, where debian/ubuntu installs - it. - - * flumotion/manager/config.py (exportPlanetXml.component): - Break up into pieces which allows a simple if statement instead of crazy - and/or conditionals. Fixes a pychecker bug and makes the code easier to - understand. - -2008-02-18 Michael Smith - - * flumotion/manager/config.py: - When exporting a planet config, ensure that we don't add clock-master - for atmosphere components, since those aren't valid in the XML. - -2008-02-18 Johan Dahlin - - * flumotion/component/misc/cortado/cortado_location.py.in - (getCortadoFilename): - Check the location ubuntu/debian installs cortado. - - * flumotion/wizard/configurationwriter.py: - (XMLWriter._collectAttributes): - Quote the attribute values properly - - * flumotion/test/Makefile.am: - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/configurationwriter.py: - * flumotion/wizard/save.py: - Move configuration writer out to a separate module. - Separate common parts to another class and subclass it in the - configuration writer. - Use a generic API for all xml generation. - -2008-02-18 Johan Dahlin - - * flumotion/test/test_registry.py (TestRegistry._compareRegistryAfterDump): - Use testsuite.diffStrings here. - -2008-02-18 Johan Dahlin - - * flumotion/common/testsuite.py: - New api diffStrings which helps when comparing large strings - - * flumotion/test/test_wizard_save.py: - * flumotion/wizard/save.py: - Decouple xml saving from fetching state from the wizard. - Write proper tests - -2008-02-18 Johan Dahlin - - * flumotion/test/test_wizard_models.py: - * flumotion/wizard/models.py: - Map underscore to dashes for attribute accesses. - This simplifies the getProperties() implementations as a side effect. - - * flumotion/component/consumers/httpstreamer/http_wizard.py: - * flumotion/component/encoders/jpeg/jpeg_wizard.py: - * flumotion/component/encoders/speex/speex_wizard.py: - * flumotion/component/encoders/theora/theora_wizard.py: - * flumotion/component/encoders/vorbis/vorbis_wizard.py: - * flumotion/component/misc/cortado/cortado_wizard.py: - * flumotion/wizard/overlaystep.py: - * flumotion/wizard/save.py: - We can use attributes instead of the uglier dictionary interface now. - -2008-02-15 Johan Dahlin - - * configure.ac: - * flumotion/component/consumers/httpstreamer/http-wizard.glade: - * flumotion/component/consumers/httpstreamer/http_wizard.py: - * flumotion/component/misc/cortado/Makefile.am: - * flumotion/component/misc/cortado/cortado.py: - * flumotion/component/misc/cortado/cortado.xml: - * flumotion/component/misc/cortado/cortado_location.py.in: - * flumotion/component/misc/cortado/cortado_wizard.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/models.py: - * flumotion/wizard/save.py: - * flumotion/worker/checks/Makefile.am: - * flumotion/worker/checks/package.xml: - * flumotion/worker/checks/cortado.py - Make the http consumption step pluggable. - Make the cortado presence detectable in runtime instead of at - configure time. - Migrate the cortado step to be a pluggable plug. - Fixes #823 - -2008-02-15 Johan Dahlin - - reviewed by: Mike - - * flumotion/common/config.py: - * flumotion/common/registry.py: - * flumotion/component/component.py: - * flumotion/component/muxers/muxers.xml: - * flumotion/manager/admin.py: - * flumotion/test/test_component_bouncers_component.py: - * flumotion/test/test_component_httpserver.py: - * flumotion/test/test_config.py: - * flumotion/test/test_registry.py: - * flumotion/worker/worker.py: - - In preparation for bug 823. - Registry changes: - * Allow multiple 's for a . - * Allow to be placed in in the registry - * Improve validation of format media types. - Admin PB API: - * Add getPlugEntry, which can be used to fetch an entry point in a plug - * Update getWizardEntries to also return entries for plugs, not just - components - Update worker, config, component modules, muxer xml and tests to take - into account these changes. - -2008-02-15 Johan Dahlin - - * flumotion/test/test_component_base_scheduler.py - (EventTest.testRecurringOnce): - Check if dateutil is installed before running this test - -2008-02-15 Johan Dahlin - - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/consumptionsteps.py: - Fix a few more imports - -2008-02-15 Johan Dahlin - - * flumotion/wizard/productionstep.py: Forgot to save this file. - * flumotion/wizard/workerstep.py: Import WizardStep too. - -2008-02-15 Johan Dahlin - - * flumotion/component/consumers/disker/disker_wizard.py: - * flumotion/component/consumers/httpstreamer/http_wizard.py: - * flumotion/component/consumers/shout2/shout2_wizard.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/basesteps.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/models.py: - * flumotion/wizard/overlaystep.py: - * flumotion/wizard/save.py: - * flumotion/wizard/workerstep.py: - * po/POTFILES.in: - Rewrite overlay wizard step to use a model+proxy. - Move overlay and worker step out of basesteps. - Update import callsites. - -2008-02-14 Johan Dahlin - - * flumotion/admin/gtk/client.py: - Display tooltips when hovering over menu entries and tool buttons. - Add tooltips for all actions. Fixes #827 - -2008-02-14 Johan Dahlin - - * flumotion/wizard/basesteps.py (VideoSourceStep.get_state): - Remove, all videosource steps uses separate model classes now. - - * flumotion/ui/wizard.py (WizardStep): - Remove unused method before_show. - - * flumotion/wizard/configurationwizard.py (LicenseStep) - (WelcomeStep): - Disable changing of the style. Juse use the default background color. - - * flumotion/wizard/conversionsteps.py: - Use setup/activated instead of calling private methods from the wizard. - - * flumotion/component/consumers/shout2/shout2_wizard.py - (Shout2Step.worker_changed): - Check elements in worker_changed instead of before_show. - - * flumotion/wizard/conversionsteps.py (ConversionStep._populate_combos): - Put ... in the combos while querying the manager and block the next - button meanwhile. Disable the combos sensitivy while querying. - * flumotion/wizard/productionsteps.py (ProductionStep._populate_combos): - Disable the combos sensitivy while querying. - -2008-02-13 Johan Dahlin - - * flumotion/wizard/productionsteps.py (ProductionStep.__init__): - Get rid of a FIXME; remove _setup() and split it into setup/activated logic. - Put ... in the combos while querying the manager and block the next button - meanwhile. - -2008-02-13 Johan Dahlin - - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - Block next while fetching the next page. - -2008-02-09 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - Use the correct API to add messages to a component. - -2008-02-09 Thomas Vander Stichele - - * flumotion/component/component.py: - Make sure we at least debug exceptions, even if they're handled. - -2008-02-07 Johan Dahlin - - * flumotion/wizard/productionsteps.py: - (ProductionStep.plugin_loaded): - First part of unifying the way plugins are fetched - in production/converstion - - * flumotion/component/consumers/httpstreamer/http_wizard.py: - * flumotion/component/encoders/jpeg/jpeg_wizard.py: - * flumotion/component/encoders/smoke/smoke_wizard.py: - * flumotion/component/encoders/speex/speex_wizard.py: - * flumotion/component/encoders/theora/theora_wizard.py: - * flumotion/component/encoders/vorbis/vorbis_wizard.py: - * flumotion/component/producers/audiotest/audiotest_wizard.py: - * flumotion/component/producers/bttv/bttv_wizard.py: - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/component/producers/soundcard/soundcard_wizard.py: - * flumotion/component/producers/videotest/videotest_wizard.py: - * flumotion/component/producers/webcam/webcam_wizard.py: - * flumotion/wizard/basesteps.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - - Change worker_changed to take a worker argument to simplify the - callsites slightly. - -2008-02-07 Johan Dahlin - - * flumotion/wizard/configurationwizard.py: - Call block_next before requiring an element and block_next when - we're done. - - * flumotion/component/producers/videotest/videotest_wizard.py - (TestVideoSourceStep.worker_changed): - Move the element check to worker_changed - - * data/glade/Makefile.am: - * data/glade/wizard_http.glade: - * flumotion/component/consumers/httpstreamer/Makefile.am: - * flumotion/component/consumers/httpstreamer/http_wizard.py: - * po/POTFILES.in: - Move (and rename) wizard_http.glade to the httpstreamer directory. - -2008-02-07 Johan Dahlin - - * flumotion/component/consumers/shout2/Makefile.am: - (component_PYTHON): Add shout2_wizard.py - - * data/glade/Makefile.am: - * data/glade/wizard_shout2.glade: - * flumotion/component/consumers/shout2/Makefile.am: - * flumotion/component/consumers/shout2/shout2_wizard.py: - * flumotion/wizard/consumptionsteps.py: - Move the shout2 component out of consumptionsteps.py - -2008-02-07 Johan Dahlin - - * flumotion/component/misc/httpfile/httpfile.py: - Raise an exception if the path property isn't set or if the - setRootResource is not called. - Fix the build by accessing self.filePath instead of just filePath. - - * data/glade/Makefile.am (glade_DATA): Remove wizard_disk.glade - from here. - - * data/glade/wizard_disk.glade: - * flumotion/component/consumers/disker/Makefile.am: - * flumotion/component/consumers/disker/disker_wizard.py: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/wizard/consumptionsteps.py: - - Move disk steps out of wizard/consumptionsteps.py and the - disker glade file into the component directory. - -2008-02-07 Johan Dahlin - - * flumotion/component/producers/soundcard/soundcard_wizard.py: - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/enums.py: - - Move out enums which are only used once of wizard/enums.py into - their respective callsites. - -2008-02-06 Johan Dahlin - - * flumotion/component/misc/cortado/cortado.py: - document and check the component type. remove unused methods. - - * flumotion/component/consumers/httpstreamer/http_wizard.py: - improve documentation - - * data/Makefile.am (templatedir): Install .html files - to pkgdatadir, not datadir. - * flumotion.spec.in (user): Include all .html files - - * flumotion/component/misc/cortado/Makefile.am (cortado_DATA): Attempt to - fix distcheck - (cortado_PYTHON): Add cortado_location.py to cortado_PYTHON - - * configure.ac: - * flumotion/component/misc/cortado/cortado_location.py.in: - * README: - - Add an optional cortado dependency, store the location and - update README. - - * data/Makefile.am: - * data/cortado-template.html: - * flumotion/component/misc/Makefile.am: - * flumotion/component/misc/cortado/Makefile.am: - * flumotion/component/misc/cortado/__init__.py: - * flumotion/component/misc/cortado/cortado.py: - * flumotion/component/misc/cortado/cortado.xml: - - Create a CortadoPlug which can be plugged into a http streaming - component. - - * data/glade/wizard_http.glade: - * flumotion/component/consumers/httpstreamer/http_wizard.py: - * flumotion/wizard/models.py: - * flumotion/wizard/save.py: - - Add support for streaming to cortado widgets in the admin wizard. - - Fixes #824 - -2008-02-06 Johan Dahlin - - (HTTPFileStreamer._createRootResourceForPath): Remove factory variable - to silence pychecker. - - * flumotion/component/misc/httpfile/httpfile.xml: - * flumotion/component/misc/httpfile/httpfile.py - (HTTPFileStreamer.do_setup): - Refactor root resource creation into two separate methods. - (HTTPFileStreamer._fetchProperties): Rename from have_properties - and make the path property optional - (HTTPFileStreamer.setRootResource) - (HTTPFileStreamer.getMountPoint): New methods - - * flumotion/test/test_component_httpserver.py: - Add new tests for httpstreamer plugs - -2008-01-31 Arek Korbik - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.update_ui_state): - Don't erase delayed call id if the method wasn't called by the - reactor from a timeout - fixes memory leak introduced in r5661. - -2008-01-31 Johan Dahlin - - * flumotion/component/misc/httpfile/httpfile.py - (HTTPFileStreamer.updatePorterDetails): - Refactor and clean up updatePorterDetails. Bump copyright and pep8ify. - (HTTPFileStreamer._updatePath): comment and style changes - - * flumotion/ui/wizard.py (SectionWizard._set_step): Set the step earlier - since the worker-changed signal is triggered before the end of this - method, which will end up using the worker from the wrong step. - - * flumotion/component/consumers/httpstreamer/Makefile.am: - * flumotion/component/consumers/httpstreamer/http_wizard.py: - * flumotion/wizard/consumptionsteps.py: - Move http_wizard over to the httpstreamer directory. - Not yet pluggable, just separated. - -2008-01-31 Johan Dahlin - - * flumotion/component/misc/porter/porter.py: - * flumotion/test/realm.py: - * flumotion/test/test_pbstream.py: - * flumotion/worker/feedserver.py: - Get rid of most __implements__ in favor of implements() - -2008-01-31 Johan Dahlin - - * flumotion/wizard/productionsteps.py (ProductionStep): - * flumotion/wizard/conversionsteps.py (ConversionStep): - Fix production_step.get_audio/video_producer() to actually - return None if there's no component selected. - Update callsites. - - * flumotion/wizard/consumptionsteps.py (HTTPStep): - Clean up the internal blocking api - -2008-01-30 Johan Dahlin - - * flumotion/common/registry.py (RegistryParser._parseWizard): - Verify that the wizard entries are somewhat correct. - - * doc/random/wizard-plugin: Add an initial draft of - describing how to create a wizard-plugin. - - * configure.ac: Pointless change to trigger a new autogen. - * common/intltool-Makefile.in.in: - (check): Add back check which does nothing - -2008-01-30 Johan Dahlin - - * flumotion/component/producers/firewire/firewire_wizard.py: - (__pychecker__): Do not check return values - - * flumotion/component/producers/audiotest/audiotest_wizard.py: - * flumotion/component/producers/bttv/bttv_wizard.py: - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/component/producers/soundcard/soundcard_wizard.py: - * flumotion/component/producers/videotest/videotest_wizard.py: - * flumotion/component/producers/webcam/webcam_wizard.py: - * flumotion/wizard/productionsteps.py: - - Rename get_production_step to getProductionStep. - Make the api similar to the conversion api by creating the models - in the steps themselves instead of just point to a class. - -2008-01-30 Johan Dahlin - - * flumotion/component/encoders/jpeg/jpeg_wizard.py: - * flumotion/component/encoders/smoke/smoke_wizard.py: - * flumotion/component/encoders/speex/speex_wizard.py: - * flumotion/component/encoders/theora/theora_wizard.py: - * flumotion/component/encoders/vorbis/vorbis_wizard.py: - * flumotion/wizard/conversionsteps.py: - - Rename get_conversion_step to getConversionStep - -2008-01-30 Johan Dahlin - - * configure.ac: Pointless change to trigger a new autogen. - * common/intltool-Makefile.in.in: - (check): Remove maintainer hack and checks - - * common/intltool-Makefile.in.in (itlocaledir): - Don't depend on DATADIRNAME, just hardcode to $(prefix)/share - (check): Clean up rpm directory before checking for files missing - in POTFILES.in - -2008-01-29 Arek Korbik - - * flumotion/component/producers/firewire/firewire.py - (Firewire.get_pipeline_string): - * flumotion/component/producers/firewire/firewire.xml: - Add support for selecting device by GUID in the firewire producer. - -2008-01-28 Johan Dahlin - - * autogen.sh: - * common/intltool-Makefile.in.in: - * intltool-extract.in: - * intltool-merge.in: - * intltool-update.in: - - Include intltool 0.37.0 files instead of depending on - the system version. - -2008-01-28 Johan Dahlin - - * flumotion/component/encoders/Makefile.am: - Add a few missing \ - -2008-01-28 Arek Korbik - - * flumotion/test/test_http.py - (TestHTTPStreamingResource.deferAssertUnauthorized): - Make sure the tests actually check that the authentication - deferred is errbacked with NotAuthenticatedError on authentication - failure. - -2008-01-28 Johan Dahlin - - Make encoding and muxers pluggable in the wizard, fixes #822. - - * flumotion/ui/wizard.py: - Make it possible for defered steps to return None, which means go to - the next step in the section. This is used by the mulaw step. - - * flumotion/common/componentui.py: - * flumotion/common/registry.py: - Make sure that we can send the whole wizard entry class, including the - formats over the fire. This is necessary to be able to do proper type - finding. Add methods to the WizardEntryState to simplify this. - - * flumotion/component/encoders/base.xml: - * flumotion/component/encoders/encodingprofile.py: - * flumotion/component/encoders/encodingwizardplugin.py: - Remove encodingprofile and encoding wizard plugin. They are unused, - since we're still using the normal wizard steps. Remove the - encoding-wizard bundle. - - * data/glade/Makefile.am: - * flumotion/component/encoders/Makefile.am: - * data/glade/wizard_audio_encoder.glade: - * flumotion/component/encoders/jpeg/jpeg-wizard.glade: - * flumotion/component/encoders/jpeg/jpeg.xml: - * flumotion/component/encoders/jpeg/jpeg_wizard.py: - * flumotion/component/encoders/mulaw/mulaw.xml: - * flumotion/component/encoders/smoke/smoke.xml: - * flumotion/component/encoders/smoke/smoke_wizard.py: - * flumotion/component/encoders/speex/speex.xml: - * flumotion/component/encoders/speex/speex_wizard.py: - * flumotion/component/encoders/theora/theora-wizard.glade: - * flumotion/component/encoders/theora/theora.xml: - * flumotion/component/encoders/theora/theora_wizard.py: - * flumotion/component/encoders/vorbis/vorbis-wizard.glade: - * flumotion/component/encoders/vorbis/vorbis.xml: - * flumotion/component/encoders/vorbis/vorbis_wizard.py: - * flumotion/component/muxers/muxers.xml: - - Move over all glade files from the data directory, and put them - into the encoder bundles. - Remove encoding profiles. Use kiwi proxy for all properties. - Create subclasses for the models. - Add tags for missing components. - - * data/glade/wizard_encoding.glade: - Rename format to muxer. - - * flumotion/wizard/productionsteps.py: - Reset the component type in the producers when disabling audio or video - - * flumotion/wizard/enums.py: - Remove EncodingFormat, EncodingVideo, EncodingAudio - - * flumotion/wizard/models.py: - Make component_type a class variable, so we can define it in a subclass - Replace _ with - here in getProperties() instead of in save.py - - * flumotion/wizard/save.py: - Adopt getAudioEncoder/getVideoEncoder to use the models. - - * flumotion/wizard/conversionsteps.py: - Rewrite to be pluggable, add new method for fetching audio and video - encoders. Move steps into plugins. - - * po/POTFILES.in: - Update for renamed and new files - -2008-01-28 Johan Dahlin - - * autogen.sh: Run libtoolize first, and aclocal after - intltoolisize, run autopoint --force, mimics the behavior - of gnome-autogen.sh and avoids autopoints complaints. - - * flumotion/wizard/productionsteps.py (ProductionStep.got_entries): - Put the videotest-producer and audiotest-producer as the first - entries. Fixes #840 - - * configure.ac: - * doc/Makefile.am: - Add a --disable-docs option, fixes #838 - -2008-01-28 Johan Dahlin - - * common/common.mk (locale-uninstalled): Rewrite and simplify - most of the rule - -2008-01-28 Johan Dahlin - - * common/common.mk (locale-uninstalled): We're already inside - the po dir - (locale-uninstalled): Use basename instead of cut. - -2008-01-25 Johan Dahlin - - * flumotion/test/test_wizard_models.py: We're back from the future - -2008-01-24 Johan Dahlin - - * flumotion/admin/__init__.py: - * flumotion/admin/admin.py: - * flumotion/admin/command/commands.py: - * flumotion/admin/command/main.py: - * flumotion/admin/command/utils.py: - * flumotion/admin/config.py: - * flumotion/admin/connections.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/connections.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/main.py: - * flumotion/admin/gtk/message.py: - * flumotion/admin/gtk/parts.py: - * flumotion/admin/multi.py: - * flumotion/admin/rrdmon/__init__.py: - * flumotion/admin/rrdmon/config.py: - * flumotion/admin/rrdmon/main.py: - * flumotion/admin/rrdmon/rrdmon.py: - * flumotion/admin/text/admin_text.py: - * flumotion/admin/text/connection.py: - * flumotion/admin/text/greeter.py: - * flumotion/admin/text/main.py: - * flumotion/admin/text/misc_curses.py: - * flumotion/admin/text/view.py: - * flumotion/common/__init__.py: - * flumotion/common/avltree.py: - * flumotion/common/boot.py: - * flumotion/common/bundle.py: - * flumotion/common/bundleclient.py: - * flumotion/common/common.py: - * flumotion/common/componentui.py: - * flumotion/common/config.py: - * flumotion/common/connection.py: - * flumotion/common/dag.py: - * flumotion/common/debug.py: - * flumotion/common/enum.py: - * flumotion/common/errors.py: - * flumotion/common/fxml.py: - * flumotion/common/gstreamer.py: - * flumotion/common/identity.py: - * flumotion/common/interfaces.py: - * flumotion/common/keycards.py: - * flumotion/common/log.py: - * flumotion/common/manhole.py: - * flumotion/common/medium.py: - * flumotion/common/messages.py: - * flumotion/common/netutils.py: - * flumotion/common/options.py: - * flumotion/common/package.py: - * flumotion/common/planet.py: - * flumotion/common/pygobject.py: - * flumotion/common/python.py: - * flumotion/common/reflectcall.py: - * flumotion/common/registry.py: - * flumotion/common/reload.py: - * flumotion/common/server.py: - * flumotion/common/setup.py: - * flumotion/common/signals.py: - * flumotion/common/startset.py: - * flumotion/common/testsuite.py: - * flumotion/common/worker.py: - * flumotion/component/__init__.py: - * flumotion/component/base/__init__.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/admin_text.py: - * flumotion/component/base/http.py: - * flumotion/component/base/scheduler.py: - * flumotion/component/base/watcher.py: - * flumotion/component/bouncers/__init__.py: - * flumotion/component/bouncers/admin_gtk.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/component.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/bouncers/icalbouncer.py: - * flumotion/component/bouncers/ipbouncer.py: - * flumotion/component/bouncers/plug.py: - * flumotion/component/bouncers/saltsha256.py: - * flumotion/component/bouncers/tokentest.py: - * flumotion/component/bouncers/tokentestbouncer.py: - * flumotion/component/combiners/composite/composite.py: - * flumotion/component/combiners/switch/admin_gtk.py: - * flumotion/component/combiners/switch/basicwatchdog.py: - * flumotion/component/combiners/switch/patternswitch.py: - * flumotion/component/combiners/switch/switch.py: - * flumotion/component/component.py: - * flumotion/component/consumers/disker/admin_gtk.py: - * flumotion/component/consumers/disker/admin_text.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/disker/disker_plug.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/consumers/preview/preview.py: - * flumotion/component/consumers/shout2/shout2.py: - * flumotion/component/converters/overlay/genimg.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/converters/pipeline/pipeline.py: - * flumotion/component/eater.py: - * flumotion/component/effects/__init__.py: - * flumotion/component/effects/colorbalance/admin_gtk.py: - * flumotion/component/effects/colorbalance/colorbalance.py: - * flumotion/component/effects/volume/admin_gtk.py: - * flumotion/component/effects/volume/volume.py: - * flumotion/component/encoders/encodingprofile.py: - * flumotion/component/encoders/encodingwizardplugin.py: - * flumotion/component/encoders/jpeg/jpeg.py: - * flumotion/component/encoders/jpeg/jpeg_wizard.py: - * flumotion/component/encoders/mulaw/mulaw.py: - * flumotion/component/encoders/smoke/smoke.py: - * flumotion/component/encoders/smoke/smoke_wizard.py: - * flumotion/component/encoders/speex/speex.py: - * flumotion/component/encoders/speex/speex_wizard.py: - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/encoders/theora/theora_wizard.py: - * flumotion/component/encoders/vorbis/vorbis.py: - * flumotion/component/encoders/vorbis/vorbis010.py: - * flumotion/component/encoders/vorbis/vorbis_wizard.py: - * flumotion/component/feed.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/feeder.py: - * flumotion/component/misc/httpfile/admin_gtk.py: - * flumotion/component/misc/httpfile/file.py: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/porter/__init__.py: - * flumotion/component/misc/porter/porter.py: - * flumotion/component/misc/porter/porterclient.py: - * flumotion/component/misc/repeater/__init__.py: - * flumotion/component/misc/repeater/repeater.py: - * flumotion/component/muxers/checks.py: - * flumotion/component/muxers/multipart.py: - * flumotion/component/muxers/ogg.py: - * flumotion/component/padmonitor.py: - * flumotion/component/plugs/__init__.py: - * flumotion/component/plugs/adminaction.py: - * flumotion/component/plugs/base.py: - * flumotion/component/plugs/identity.py: - * flumotion/component/plugs/lifecycle.py: - * flumotion/component/plugs/loggers.py: - * flumotion/component/plugs/manhole.py: - * flumotion/component/plugs/streamdata.py: - * flumotion/component/producers/audiotest/admin_gtk.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/bttv/admin_gtk.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/producers/checks.py: - * flumotion/component/producers/firewire/admin_gtk.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/gdp/__init__.py: - * flumotion/component/producers/gdp/gdp.py: - * flumotion/component/producers/icecast/icecast.py: - * flumotion/component/producers/ivtv/ivtv.py: - * flumotion/component/producers/looper/admin_gtk.py: - * flumotion/component/producers/looper/looper.py: - * flumotion/component/producers/pipeline/pipeline.py: - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/playlist/playlistparser.py: - * flumotion/component/producers/playlist/singledecodebin.py: - * flumotion/component/producers/playlist/smartscale.py: - * flumotion/component/producers/rtsp/rtsp.py: - * flumotion/component/producers/screencast/screencast.py: - * flumotion/component/producers/soundcard/admin_gtk.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/unixdomain/__init__.py: - * flumotion/component/producers/unixdomain/unixdomain.py: - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/component/producers/videotest/admin_text.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/webcam/admin_gtk.py: - * flumotion/component/producers/webcam/webcam.py: - * flumotion/configure/__init__.py: - * flumotion/configure/configure.py: - * flumotion/extern/log/test_log.py: - * flumotion/extern/pytrayicon/__init__.py: - * flumotion/job/__init__.py: - * flumotion/job/job.py: - * flumotion/job/main.py: - * flumotion/launch/__init__.py: - * flumotion/launch/inspect.py: - * flumotion/launch/main.py: - * flumotion/launch/parse.py: - * flumotion/manager/__init__.py: - * flumotion/manager/admin.py: - * flumotion/manager/base.py: - * flumotion/manager/component.py: - * flumotion/manager/config.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/monitor/nagios/main.py: - * flumotion/monitor/nagios/util.py: - * flumotion/project/project.py: - * flumotion/test/__init__.py: - * flumotion/test/bouncertest.py: - * flumotion/test/comptest.py: - * flumotion/test/gtkunit.py: - * flumotion/test/realm.py: - * flumotion/test/test_admin_admin.py: - * flumotion/test/test_admin_config.py: - * flumotion/test/test_admin_connections.py: - * flumotion/test/test_admin_multi.py: - * flumotion/test/test_bundle.py: - * flumotion/test/test_checkers.py: - * flumotion/test/test_common.py: - * flumotion/test/test_common_avltree.py: - * flumotion/test/test_common_componentui.py: - * flumotion/test/test_common_connection.py: - * flumotion/test/test_common_gstreamer.py: - * flumotion/test/test_common_messages.py: - * flumotion/test/test_common_netutils.py: - * flumotion/test/test_common_package.py: - * flumotion/test/test_common_planet.py: - * flumotion/test/test_common_pygobject.py: - * flumotion/test/test_common_signals.py: - * flumotion/test/test_component.py: - * flumotion/test/test_component_base_scheduler.py: - * flumotion/test/test_component_base_watcher.py: - * flumotion/test/test_component_bouncers_bouncer.py: - * flumotion/test/test_component_bouncers_component.py: - * flumotion/test/test_component_bouncers_plug.py: - * flumotion/test/test_component_feed.py: - * flumotion/test/test_component_feeder.py: - * flumotion/test/test_component_httpserver.py: - * flumotion/test/test_component_httpstreamer.py: - * flumotion/test/test_component_init.py: - * flumotion/test/test_component_padmonitor.py: - * flumotion/test/test_component_playlist.py: - * flumotion/test/test_comptest.py: - * flumotion/test/test_config.py: - * flumotion/test/test_configure.py: - * flumotion/test/test_credentials.py: - * flumotion/test/test_dag.py: - * flumotion/test/test_defer.py: - * flumotion/test/test_dialogs.py: - * flumotion/test/test_enum.py: - * flumotion/test/test_flavors.py: - * flumotion/test/test_greeter.py: - * flumotion/test/test_htpasswdcrypt.py: - * flumotion/test/test_http.py: - * flumotion/test/test_i18n.py: - * flumotion/test/test_keycards.py: - * flumotion/test/test_logfilter.py: - * flumotion/test/test_manager_admin.py: - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_manager_worker.py: - * flumotion/test/test_misc_httpfile.py: - * flumotion/test/test_options.py: - * flumotion/test/test_parts.py: - * flumotion/test/test_pb.py: - * flumotion/test/test_pbstream.py: - * flumotion/test/test_porter.py: - * flumotion/test/test_public_ui_api.py: - * flumotion/test/test_reflect.py: - * flumotion/test/test_registry.py: - * flumotion/test/test_saltsha256.py: - * flumotion/test/test_testclasses.py: - * flumotion/test/test_twisted_integration.py: - * flumotion/test/test_ui_fgtk.py: - * flumotion/test/test_wizard.py: - * flumotion/test/test_worker_config.py: - * flumotion/test/test_worker_job.py: - * flumotion/test/test_worker_medium.py: - * flumotion/test/test_worker_worker.py: - * flumotion/test/test_workerconfig.py: - * flumotion/tester/clientfactory.py: - * flumotion/tester/httpclient.py: - * flumotion/twisted/__init__.py: - * flumotion/twisted/checkers.py: - * flumotion/twisted/compat.py: - * flumotion/twisted/credentials.py: - * flumotion/twisted/defer.py: - * flumotion/twisted/fdserver.py: - * flumotion/twisted/flavors.py: - * flumotion/twisted/integration.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - * flumotion/twisted/reflect.py: - * flumotion/twisted/rtsp.py: - * flumotion/ui/fgtk.py: - * flumotion/ui/fvumeter.py: - * flumotion/ui/glade.py: - * flumotion/ui/icons.py: - * flumotion/ui/sidebar.py: - * flumotion/ui/simplewizard.py: - * flumotion/ui/trayicon.py: - * flumotion/ui/url.py: - * flumotion/wizard/basesteps.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/worker.py: - * flumotion/worker/__init__.py: - * flumotion/worker/base.py: - * flumotion/worker/checks/audio.py: - * flumotion/worker/checks/check.py: - * flumotion/worker/checks/encoder.py: - * flumotion/worker/checks/gst010.py: - * flumotion/worker/checks/video.py: - * flumotion/worker/config.py: - * flumotion/worker/feedserver.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - * flumotion/worker/medium.py: - * flumotion/worker/worker.py: - - Move down __version__ from the first part of the module, - avoids breaking doc strings. Fixes #836 - -2008-01-24 Johan Dahlin - - * flumotion/common/errors.py: - * flumotion/test/test_wizard_models.py: - * flumotion/wizard/models.py: - Use ComponentError from flumotion.common.errors - Move ComponentValidationError to flumotion.common.errors, add - a docstring. - Add license headers to test. - -2008-01-24 Johan Dahlin - - * flumotion/wizard/models.py (Properties): - Implement __repr__ to help debugging saying that we really are - a Properties object and not a dictionary. - Do not allow properties to be set which clashes with dict methods. - Improve documentation a bit - - * flumotion/test/test_wizard_models.py: - Add tests - -2008-01-24 Johan Dahlin - - Make all dialogs modal, so we can't click on the parent's while they - are open. - - * flumotion/admin/gtk/client.py: - Send in parents and make file chooser dialogs modal. - * flumotion/admin/gtk/greeter.py: - Add parent arguments and chain up - * flumotion/ui/simplewizard.py (SimpleWizard): add a parent - constructor argument and document it. Pass it on to GladeWindow. - -2008-01-24 Johan Dahlin - - * flumotion/ui/glade.py (GladeWindow.__init__): Make the - window modal too, so you can't click on the main window when - running the configurationwizard. - -2008-01-21 Zaheer Abbas Merali - - * flumotion/admin/gtk/parts.py: - Fix KeyError when hovering on a lost component. - -2008-01-20 Thomas Vander Stichele - - * flumotion/test/test_component_base_scheduler.py: - Add a test case for when a recurring event has an UNTIL that is - past "now". - * flumotion/component/base/scheduler.py: - Fix Event.__init__() for it - -2008-01-20 Thomas Vander Stichele - - * flumotion/component/base/scheduler.py: - * flumotion/test/test_component_base_scheduler.py: - Add test-case-name lines. - Move public now() to test suite, which is its only consumer. - Document API some more. - -2008-01-18 Johan Dahlin - - * flumotion/admin/gtk/client.py (AdminClientWindow._open_connection): - Add an assert, to make sure we always send in a PBConnectionInfo - instance. - (AdminClientWindow.recent_activate): Send in conn.info. - Fixes #835 - - * flumotion/admin/gtk/parts.py (ComponentsView.__init__): - Check for PyGTK 2.12.1 or higher, to avoid a crash in PyGTK bug #479012 - -2008-01-17 Johan Dahlin - - * flumotion/admin/gtk/componentview.py: - * flumotion/admin/text/view.py: - * flumotion/manager/admin.py: - * flumotion/wizard/configurationwizard.py: - Rename getEntry back to getEntryByType, reverses part of [6081] - -2008-01-15 Johan Dahlin - - * flumotion/common/componentui.py: - Update the name here too, to avoid breaking the build - - * flumotion/common/registry.py: - * flumotion/manager/admin.py: - * flumotion/wizard/productionsteps.py: - Make RegistryWizardEntry Copyable. - Return a list of WizardEntryState in getWizardEntries, update - documentation and callsite. - -2008-01-15 Johan Dahlin - - * flumotion/component/producers/soundcard/soundcard_wizard.py - (SoundcardStep.setup): Make sure that it works using kiwi 1.9.14 - -2008-01-15 Thomas Vander Stichele - - * autogen.sh: - Fail if there is no intltoolize (I have no idea why it wasn't - made to fail in the first place) - -2008-01-15 Thomas Vander Stichele - - * common/Makefile.am: - * common/intltool.m4: - Add macro for people who don't have intltool installed. - -2008-01-11 Johan Dahlin - - * common/gendoc.py: Import from posixbase, to avoid a deprecation - message when running the testsuite. - -2008-01-11 Johan Dahlin - - * flumotion/wizard/basesteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/save.py: - Get remove of a few (double) translations, left-overs from - previous commit. - -2008-01-11 Johan Dahlin - - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/save.py: - Get rid of stupid _() to get_step() & friends. - -2008-01-11 Johan Dahlin - - * flumotion/wizard/enums.py (EncodingVideo): Remove two - unused enums - - * common/common.mk (locale-uninstalled): Workaround intltool bug - and inline the whole target to copy the .gmo files. - -2008-01-11 Johan Dahlin - - * common/common.mk (locale-uninstalled): Set itlocaledir too, intltool - uses this rule to install .mo files instead of datadir which normal - gettext uses - -2008-01-10 Johan Dahlin - - * flumotion/test/test_registry.py (TestComponentEntry.setUp): - Update the tests - - * configure.ac: - * Makefile.am: - * autogen.sh: - * flumotion/admin/admin.py: - * flumotion/common/registry.py: - * flumotion/wizard/productionsteps.py: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/component/producers/webcam/webcam.xml: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/manager/admin.py: - * po/POTFILES.in: - Add a new registry entry , which specifies how - a page should appear in the wizard. - Annotate all old production plugins. - Add a new method for fetching wizard entries and use it in the - wizard, removing the old hard coded list of components. - Add intltool support, add the xml files to POTFILES.in - -2008-01-10 Johan Dahlin - - * data/glade/Makefile.am: - * data/glade/wizard_firewire.glade: - * flumotion/component/producers/audiotest/audiotest_wizard.py: - * flumotion/component/producers/bttv/bttv_wizard.py: - * flumotion/component/producers/firewire/Makefile.am: - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/component/producers/firewire/firewire_wizard.py: - * flumotion/component/producers/soundcard/soundcard_wizard.py: - * flumotion/component/producers/videotest/videotest_wizard.py: - * flumotion/component/producers/webcam/webcam_wizard.py: - * flumotion/wizard/productionsteps.py: - * po/POTFILES.in: - Move the firewire step + glade file out to a separate bundle. - Change the API slightly to handle components which provides - both an audio and video producer and update callsites. - -2008-01-09 Johan Dahlin - - * po/POTFILES.in: - Fix a typo - - * data/glade/Makefile.am: - * data/glade/wizard_tvcard.glade: - * flumotion/component/producers/bttv/Makefile.am: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/bttv/bttv_wizard.py: - * flumotion/wizard/productionsteps.py: - * po/POTFILES.in: - Move the bttv step + glade file out to a separate bundle - -2008-01-09 Johan Dahlin - - * po/sv.po: Update swedish translation - - * data/glade/Makefile.am: - * data/glade/wizard_webcam.glade: - * flumotion/component/producers/webcam/Makefile.am: - * flumotion/component/producers/webcam/webcam.xml: - * flumotion/component/producers/webcam/webcam_wizard.py: - * flumotion/wizard/productionsteps.py: - * po/POTFILES.in: - Move the webcam step + glade file out to a separate bundle - -2008-01-09 Johan Dahlin - - * data/glade/Makefile.am: - * data/glade/wizard_soundcard.glade: - * flumotion/component/producers/soundcard/Makefile.am: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/component/producers/soundcard/soundcard_wizard.py: - * flumotion/wizard/productionsteps.py: - * po/POTFILES.in: - Move the soundcard step + glade file out to a separate bundle - -2008-01-09 Johan Dahlin - - * data/glade/Makefile.am (glade_DATA): Remove old glade files here. - - * data/glade/wizard_audiotest.glade: - * data/glade/wizard_testsource.glade: - * flumotion/component/producers/audiotest/Makefile.am: - * flumotion/component/producers/audiotest/audiotest-wizard.glade: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/audiotest/audiotest_wizard.py: - * flumotion/component/producers/videotest/Makefile.am: - * flumotion/component/producers/videotest/videotest-wizard.glade: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/component/producers/videotest/videotest_wizard.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/productionsteps.py: - * po/POTFILES.in: - - Make the productionstep of the wizard pluggable. Move the - audiotest and videotest steps to the component and put them in - separate bundles. - Add a new method to the configuration wizard to fetch a wizard bundle. - -2008-01-09 Johan Dahlin - - * flumotion/manager/admin.py (AdminAvatar.perspective_getEntryByType): - Remove, in favor of getEntry. - * flumotion/manager/admin.py (AdminAvatar.perspective_getEntry): - A new simpler version of getEntryByType which takes a component type - string instead of a component state. Also rename type to componentType - to avoid clashing with the builtin 'type' and remove unused imports. - As discussed in bug #812 - - * flumotion/admin/text/view.py (AdminTextView.gotBundles): - * flumotion/admin/gtk/componentview.py - (ComponentView.sleeping_component): - Update callsites - - * flumotion/ui/wizard.py: - (SectionWizard.on_button_next_clicked): Sort out confusion, - do not define _show_next_step twice. Pychecker actually caught - a real bug, must be a first! - - * flumotion/ui/wizard.py (SectionWizard.run) - (WizardStep.get_next): Improve documentation - - * flumotion/wizard/configurationwizard.py: - Rename show_next_step to prepare_next_step. - Split it into two parts, add support for returning a deferred - instead of a wizard step instance. - -2008-01-08 Johan Dahlin - - * Makefile.am (PYCHECKER_BLACKLIST): Put kiwipatches here. - - * flumotion/ui/kiwipatches.py (_open_glade): Another pychecker workaround - (proxy_entry_init): - - * flumotion/admin/gtk/parts.py: - Enable tooltips for moods, conditionally for Gtk 2.12 or higher. - Fixes #820 - - * flumotion/ui/kiwipatches.py: - (old_proxy_entry_init): Attempt to fix pychecker - - * flumotion/ui/Makefile.am: - * flumotion/ui/glade.py: - * flumotion/ui/kiwipatches.py: - * flumotion/wizard/basesteps.py: - * flumotion/wizard/productionsteps.py: - * po/POTFILES.in: - Refactor kiwi monkey patches to a separate file. - Add a monkey patch to workaround a bug fixed in kiwi 1.9.15. - -2008-01-08 Johan Dahlin - - * data/glade/wizard_audiotest.glade: - * data/glade/wizard_testsource.glade: - * data/glade/wizard_tvcard.glade: - * data/glade/wizard_webcam.glade: - * flumotion/test/test_wizard.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/models.py: - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/save.py: - - Use proxies for all production steps so we can get rid - of get_state(). Remove most of the enum usage in the production - step at the same time. Merge firewire audio/video steps to a common - step to avoid duplication. - -2008-01-08 Johan Dahlin - - * po/sv.po: Update swedish translation - -2008-01-07 Johan Dahlin - - * flumotion/worker/job.py (CheckJobHeaven.timeout): job.pid, not - process.pid. Remove unused import too. - -2008-01-07 Arek Korbik - - * flumotion/admin/gtk/main.py: - Add missing '_' definition for gettext. - -2008-01-07 Johan Dahlin - - * flumotion/admin/gtk/componentview.py: - Import gettext and set _ - -2008-01-07 Thomas Vander Stichele - - * flumotion/manager/admin.py: - Raise SleepingComponentError with the proper argument, the state. - -2008-01-04 Johan Dahlin - - * flumotion/admin/gtk/: Audit and mark more strings as translatable - - * flumotion/admin/gtk/client.py (AdminClientWindow._open_connection): - Accept a PBConnectionInfo - (AdminClientWindow.on_have_connection): Send in PBConnectionInfo here. - Fixes #817 - - * flumotion/admin/gtk/dialogs.py (connection_refused_message): Mark - a few more strings as translatable, reorder classes and functions. - - * flumotion/admin/gtk/client.py: Avoid importing a few more modules, - import the attributes directly instead - -2008-01-04 Johan Dahlin - - * flumotion/admin/gtk/client.py (AdminClientWindow.refused_later): - Send in the window instead of the instance, fixes #818 - (AdminClientWindow._fatal_error): Add a new method to show an error - which is fatal. - (AdminClientWindow._connection_refused) - (AdminClientWindow._connection_failed): Refactor to use _fatal_error. - -2008-01-03 Michael Smith - - * flumotion/component/component.py: - If login of a component fails for _any_ reason, ensure that we - disconnect immediately, so that the ReconnectingClientFactory can - schedule a reconnect attempt later. - -2008-01-02 Johan Dahlin - - * flumotion/test/Makefile.am: - * flumotion/test/test_admin_connections.py: Add a test. - - * flumotion/admin/connections.py (RecentConnection.parse_connection): - Refactor try/except clause - -2008-01-02 Michael Smith - - * flumotion/admin/config.py: - * flumotion/component/encoders/encodingprofile.py: - * flumotion/component/encoders/encodingwizardplugin.py: - * flumotion/component/encoders/jpeg/jpeg_wizard.py: - * flumotion/component/encoders/smoke/smoke_wizard.py: - * flumotion/component/encoders/speex/speex_wizard.py: - * flumotion/component/encoders/theora/theora_wizard.py: - * flumotion/component/encoders/vorbis/vorbis_wizard.py: - * flumotion/manager/config.py: - * flumotion/test/test_admin_config.py: - Set svn:keywords on newly added files. - -2008-01-02 Zaheer Abbas Merali - - * flumotion/admin/gtk/client.py: - Fix recent connections shown on connections menu. - -2007-12-28 Johan Dahlin - - * data/glade/wizard_disk.glade: - * flumotion/wizard/consumptionsteps.py - (DiskStep.on_checkbutton_rotate_toggled) - (DiskStep._update_radio): Avoid relying on __nonzero__ which is gone. - (DiskStep.on_radiobutton_has_time_toggled) - (DiskStep.on_radiobutton_has_size_toggled): - Use a separate method callback for each widget. - -2007-12-28 Michael Smith - - * flumotion/manager/component.py: - When stopping explicitly, create a deferred. Fire it once shutdown is - complete. Return it from remote stop method. - Allows restart to work non-racily (it mostly worked in the normal admin - anyway, because the normal admin uses stop then start, not restart). - -2007-12-28 Michael Smith - - * flumotion/manager/manager.py: - Raise an exception rather than silently returning if we fail to stop a - lost component when the worker says it's still running. - Don't disconnect avatar explicitly when stopping a running component; - it'll be disconnected when the shutdown completes. Add a FIXME here. - Remove some dead code in unregisterComponent. Remove a stale FIXME. - -2007-12-28 Michael Smith - - * flumotion/admin/gtk/dialogs.py: - Replace "Seek your satisfaction via existing routes" with a more helpful - message. - -2007-12-28 Michael Smith - - * flumotion/admin/Makefile.am: - * flumotion/admin/config.py: - Split out admin config parser from common/config.py - * flumotion/common/config.py: - Split out admin and manager config parsers into seperate files, keep - only the generic bits here. - * flumotion/common/testsuite.py: - * flumotion/launch/parse.py: - Use manager.config - * flumotion/manager/Makefile.am: - * flumotion/manager/config.py: - Split out manager/flow config parsers into here. - Fixed some debug messages. - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/manager/component.py: - Adapted for new imports. - * flumotion/test/Makefile.am: - Added test_admin_config.py - * flumotion/test/test_admin_config.py: - Moved these tests from test_config.py - * flumotion/test/test_config.py: - Changes for file/import movements, move admin config tests into another - file. - -2007-12-27 Johan Dahlin - - * flumotion/component/encoders/encodingwizardplugin.py: - * flumotion/configure/configure.py: - * flumotion/manager/manager.py: - Fix a couple of docstrings. - -2007-12-27 Michael Smith - - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_wizard.py: - Our testsuite should no longer print messages to Andy, as he's unlikely - to do anything about them. - -2007-12-27 Johan Dahlin - - * flumotion/admin/rrdmon/config.py (ConfigParser): use fxml.Parser - instead of common.BaseConfigParser - - * flumotion/common/bundle.py (MergedBundler.getSubBundlers): Move - makeBundleFromLoadedModules from bundle to registry - - * flumotion/admin/text/view.py (AdminTextView.doRead): Remove - a particularly evil try/except. - -2007-12-27 Michael Smith - - * flumotion/admin/multi.py: - Remove private copy of WatchedDict, use one in common. - * flumotion/common/watched.py: - Make a WatchedDict here too. - -2007-12-27 Michael Smith - - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/bouncers/icalbouncer.py: - * flumotion/component/bouncers/saltsha256.py: - Don't import common.config, directly import errors and use ConfigError - from there. - * flumotion/component/component.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/job/job.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/worker/config.py: - * flumotion/worker/worker.py: - Remove unused imports. - -2007-12-26 Johan Dahlin - - * flumotion/*.py: Some simple low-hanging fruit cases of except: - removed, part of bug #791 - - * flumotion/ui/wizard.py (_WalkableStack.skip_to): Cleanup, use - enumerate instead of range+len+getitem. - -2007-12-24 Johan Dahlin - - * po/sv.po: Avoid mnemonic conflict for menubar items - -2007-12-21 Johan Dahlin - - * flumotion/admin/admin/main.py (__version__): - * flumotion/admin/command/main.py (__version__): - * flumotion/admin/text/main.py (__version__): - Remove pyflakes hacks, since it breaks pychecker - - * flumotion/twisted/Makefile.am: - * flumotion/twisted/rtsp.py: - * po/POTFILES.in: - - Remove flumotion.twisted.http and import twisted.web.http directly, - since we're requiring twisted 2.0 anyway. - -2007-12-21 Johan Dahlin - - * flumotion/admin/*: Make pyflakes clean - - * flumotion/component/encoders/encodingprofile.py (Int.__init__): - Don't use **kwargs to make pychecker happy - - * flumotion/ui/icons.py (register_icons): Refactor the icon registration - to be generic and explicit. Register stock icons for all moods, to be - used by the admin client. - - * flumotion/ui/simplewizard.py (SimpleWizard.__init__): Forgot to - commit which should have been a part of the fix for rev 6014 - - * flumotion/component/encoders/*: - - Add encoding profiles and encoding wizard plugins, - part of bug 812. - -2007-12-21 Johan Dahlin - - * flumotion/admin/text/connection.py (connected): Remove e, - should make pychecker happy. - - * flumotion/admin/text/view.py: - Make sure it works again after some things got moved around - - * flumotion/admin/connections.py (RecentConnection.__init__): - set the name attribute which is used by the text client - - * flumotion/admin/text/greeter.py (AdminTextGreeter.connectionLost): - Implement a stub here, it might be called if an error happens very early on - - * flumotion/admin/text/connection.py (connected): - Add some tracebacks helper, to print clean tracebacks instead of curses mangled ones - -2007-12-20 Johan Dahlin - - * flumotion/component/effects/volume/admin_gtk.py - (VolumeAdminGtkNode.volumeSet): - Ensure that the scale has an adjustment. - This is not a proper solution to a problem that can be when switching - components, but it avoids an unexpected segfault in set_value which - expects range->adjustment to be non-NULL - - * flumotion/common/registry.py (RegistryDirectory._rebuildNeeded): - Remove bogus assert, so FLU_PROJECT_PATH can be set to a directory - without registry files. Makes it possible to have a unified environment - for running both manager and fgc. - -2007-12-19 Andy Wingo - - * flumotion/admin/gtk/componentview.py: Make sure unjelliers - for the componentui are registered. - -2007-12-19 Johan Dahlin - - * data/glade/connections.glade: - * flumotion/admin/gtk/connections.py (Connections): - Reuse using ObjectList. Add a new column and sorting - - * flumotion/admin/connections.py (RecentConnection): New class, - use this instead of a dictionary to represent a recently - used connection - - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/text/greeter.py: - Update callsites - - * flumotion/admin/gtk/client.py: - Update the timestamp after successfully connecting to a manager - - Fixes #810 - -2007-12-19 Johan Dahlin - - * misc/pycheckerrc (blacklist): Add kiwi and kiwi.ui - -2007-12-19 Michael Smith - - * flumotion/admin/command/commands.py: - Allow lists in flumotion-command invoke arguments. - -2007-12-19 Andy Wingo - - * flumotion/manager/manager.py - (Vishnu._componentStopNoAvatar.stopLost) - (Vishnu._componentStopWithAvatar): - * flumotion/common/planet.py - (ManagerComponentState.clearJobState): Fix #793. - - * flumotion/component/combiners/switch/switch.py - (Switch.do_check): Check for a sufficiently new switch. - - * flumotion/worker/checks/check.py (checkPlugin): Add crack to - allow user-defined checks to be run on particular plugin features. - - * flumotion/component/combiners/switch/patternswitch.py - (PatternEventSwitcher._markers_event_probe): Minor fixes; this one - is still bitrotten. Not an AP tho. - -2007-12-18 Andy Wingo - - * flumotion/component/combiners/switch/basicwatchdog.py - (SingleBasicWatchdog.feedSetInactive) - (SingleBasicWatchdog.feedSetActive) - (AVBasicWatchdog.feedSetInactive, AVBasicWatchdog.feedSetActive): - Use auto_switch(). - - * flumotion/component/combiners/switch/switch.py (Switch.init): - (Switch.create_pipeline): Don't throw away the priority ordering - of get_logical_feeds() in the feedsByPriority list. - (Switch.auto_switch): New function, automatically selects the - highest-priority active feed. Should be used in the watchdogs. - - * flumotion/component/combiners/switch/switch.py (Switch.init): - Remove self._started state variable -- subclasses should hack this - in if needed. - (Switch.configure_pipeline, Switch.install_logical_feed_watches) - (Switch.feedSetActive, Switch.feedSetInactive): Rework to provide - an activation api in terms of logical feeds instead of eaters, for - simpler client code. - (Switch.do_switch): Rename from try_switch(). Always succeed. The - caller is responsible for ensuring that the feed is active, if - necessary. Remove some comments fixed by improvements to the - switch gstreamer element. - - * flumotion/component/component.py (BaseComponent._pollMemory): Be - less verbose. - - * flumotion/component/combiners/switch/switch.py (Switch.init): - Remove some unneeded variables. - (Switch.try_switch): Change to reflect changes in the gst switch - element. - -2007-12-18 Johan Dahlin - - * data/glade/authenticate.glade: - * flumotion/admin/gtk/connections.py - (Authenticate.on_passwd_entry_activate): - Go to the next step of the wizard when pressing enter in the password - entry. - -2007-12-18 Michael Smith - - * flumotion/manager/admin.py: - Unserialise PB arguments before passing them to admin action checkers. - Use new perspectiveMessageReceivedUnserialised function to avoid - double-unserialisation. - * flumotion/twisted/pb.py: - Add perspectiveMessageReceivedUnserialised. - -2007-12-18 Johan Dahlin - - * flumotion/test/test_common_signals.py - (TestSignalMixin.testDisconnectByFunc): - Add new function, to avoid having to save all signal ids - - * flumotion/common/signals.py (SignalMixin.disconnect_by_func): - Add tests for disconnect_by_func - - * flumotion/admin/gtk/client.py (AdminClientWindow._clear_admin): - Simplify reactor shutdown, do the right thing by disconnecting - all admin callbacks before shutting down - -2007-12-17 Johan Dahlin - - * flumotion/common/options.py: Unconditionally disable GOption, since - it doesn't work to launch a manager + worker yet. - (GOptionOptionParserClass): Fix import. - -2007-12-17 Andy Wingo - - * flumotion/component/combiners/switch/switch.py - (Switch.try_switch): Drastically simplify, requiring the new - switch from gst-plugins-bad. - (withlock, collect_single_shot_buffer_probe): Throw our treasures - into the deep, to one day be found by an unwitting aqualunged - diver. - - * conf/managers/default/flows/switch-av.xml: Change to have two - flows that will actually have the same caps. Different caps will - bork most all encoders. - -2007-12-17 Sebastien Merle - - * flumotion.spec.in: - Fixes the build dependency declaration for kiwi. - -2007-12-17 Johan Dahlin - - * flumotion/ui/simplewizard.py (SimpleWizard.on_finished): - Workaround gtk+ bug #56070 - - * flumotion/component/consumers/httpstreamer/resources.py - (HTTPStreamingResource.getMaxAllowedClients): - Fix indentation. - -2007-12-10 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/resources.py: - Log when we set the maximum fd # because of a python 2.4.3 bug. - -2007-12-10 Johan Dahlin - - * flumotion/admin/gtk/client.py (AdminClientWindow._close): Call - reactor.iterate after shutting down the reactor to make sure that - the progress dialog is not flashing when shutting down the admin - client in a normal way. - -2007-12-07 Johan Dahlin - - * flumotion/component/encoders/theora/theora.py - (Theora.checkCallback): inline defered callback - (Theora.configure_pipeline): avoid duplication and - improve readability. - -2007-12-06 Johan Dahlin - - * flumotion/component/producers/videotest/admin_gtk.py: - Remove unused imports and update to use FCProxyComboBox. - -2007-12-05 Johan Dahlin - - * po/sv.po: Update swedish translation - - * flumotion/admin/gtk/client.py - (AdminClientWindow._show_connection_lost_dialog): - Use ProgressDialog instead of a MessageDialog, fixes #790 - -2007-12-05 Johan Dahlin - - * flumotion/admin/gtk/client.py - (AdminClientWindow._connection_lost): - Brain-o. Don't call boolean state, just check if it's set. - -2007-12-05 Michael Smith - - * flumotion/component/component.py: - Add uiState keys, and code to update them: - - virtual-size (virtual memory usage in bytes) - - start-time - - current-time (these two for uptime reporting) - This will all be used by the component tab when it gets added. - -2007-12-05 Johan Dahlin - - * flumotion/admin/gtk/componentview.py (ComponentView): - Mark attributes and methods as private, - (NodeBook.render): Simplify and refactor label creation. - -2007-12-05 Michael Smith - - * flumotion/component/component.py: - When time.clock() wraps around, make sure we've already updated the - measurements, so that the next polling interval will give us a useful - answer. - -2007-12-05 Johan Dahlin - - * data/glade/admin.glade: - Add an etched in shadow border around the components view - - * flumotion/admin/gtk/main.py (failure): - Trap WizardCancelled here. - Clear up addCallbacks() confusion. - Add a fallback exception handler which prints out the error - to stderr. Move default greeter creation to inside - startAdminFromGreeter, delay gtk initialization a bit more. - -2007-12-05 Pedro Gracia - - * po/es.po: - More strings translated. - -2007-12-05 Johan Dahlin - - * po/sv.po: Update swedish translation - - * po/POTFILES.in: Add more glade files - - * po/sv.po: Update swedish translation - -2007-12-05 Michael Smith - - * flumotion/manager/manager.py: - When overwriting a (non-running) component, delete the old one first. - -2007-12-05 Johan Dahlin - - * flumotion/component/producers/looper/admin_gtk.py - (FileInfo.set_audio): Call set_text instead of set_markup. - - * flumotion/ui/glade.py: - Monkey patch _open_glade and remove LibgladeWidgeTree monkey patch. - Which allows you to specify a path instead of a resource string. - - * flumotion/component/producers/looper/flufileinfo.glade: - Hide the window by default. - * flumotion/component/producers/looper/looper.glade: - Rename the main window to window1 for consistency - -2007-12-05 Michael Smith - - * flumotion/manager/component.py: - Make a message a little more explicit when a stale config logs in. - * flumotion/manager/manager.py: - Allow overwriting configuration for non-running components, as the code - appears to have intended to do. - -2007-12-05 Johan Dahlin - - * flumotion/component/producers/looper/looper.glade: Remove () here - too. - - * flumotion/wizard/configurationwizard.py - (ConfigurationWizard.destroy): set self._admin to None instead of - deleting it, the gc will collect the old instance. - Avoids a race when shutting down the wizard with pending worker jobs. - - * flumotion/admin/gtk/connections.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/parts.py: - * flumotion/test/test_common_pygobject.py: - * flumotion/tester/httpclient.py: - * flumotion/ui/sidebar.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/worker.py: - * tests/videotest.py: - We're depending on PyGTK 2.8 now, so use gobject.type_register() - directly. It won't print out silly deprecation warnings any longer. - -2007-12-05 Johan Dahlin - - * flumotion/admin/gtk/message.py (MessagesView.__init__): Add - an etched in border around the message view. - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/main.py (main): - Rename Window to AdminClientWindow. - Delay ui imports until they're actually used, in an attempt to - make --help and command line parsing faster. - - * data/glade/Makefile.am: - * data/glade/spyglass.glade: - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/gtk/spyglass.py: - * po/POTFILES.in: - Remove spyglass, it's been bitrotten since 0.10. - -2007-12-05 Johan Dahlin - - * flumotion/test/test_greeter.py: - Update imports after moving simplewizard - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/wizard.py: - * flumotion/ui/simplewizard.py: - Rename wizard to simplewizard to avoid confusion with the sectionwizard - and move it to flumotion/ui. - -2007-12-05 Andy Wingo - - * flumotion/component/combiners/switch/switch.py - (Switch.configure_pipeline): More debug. - (Switch.try_switch.set_switching): More debug. - (Switch.try_switch.set_blocked): Block and unblock all pads. - (AVSwitch.get_pipeline_string): Fix pipeline. - - * conf/managers/default/flows/switch-simple.xml: - * conf/managers/default/flows/switch-av.xml: Add switch example - configs. - -2007-12-05 Johan Dahlin - - * flumotion/admin/gtk/client.py: - Clean up imports - - * flumotion/admin/gtk/client.py (Window): - Do not show the connection lost dialog when shutting - down the application normally. - - * flumotion/wizard/basesteps.py (OverlayStep.setup): Set - the default text here to workaround ProxyEntry bug. - -2007-12-04 Michael Smith - - * flumotion/admin/gtk/client.py: - Don't use automated pretty-printer, didn't output very nicely. - * flumotion/common/fxml.py: - Make the sxml outputter pretty-print in a nice custom way. - Fixes #801 - -2007-12-04 Andy Wingo - - * flumotion/component/combiners/switch/switch.py - (Switch.do_check): Require new switch to avoid locking badness. - -2007-12-04 Johan Dahlin - - * flumotion/*.py: - Move __version__ from the end of the file to - the beginning, just after the license header - -2007-12-04 Michael Smith - - * flumotion/admin/command/commands.py: - Add 'workerremoteinvoke' to invoke a pb method, mirroring invoke - for components and managerinvoke. - * flumotion/common/debug.py: - Add a getVersions() method that traverses sys.modules, and for all - flumotion modules with __version__ info, packages up that info and - returns it. - * flumotion/component/component.py: - * flumotion/manager/admin.py: - * flumotion/worker/medium.py: - Provide PB method to get versions via debug.getVersions() in components, - managers, workers. - -2007-12-04 Andy Wingo - - * flumotion/admin/gtk/client.py (Window._component_kill): - * flumotion/admin/gtk/parts.py (ComponentMenu.__init__): Add "kill - job" to component right-click menu. - - * flumotion/component/feedcomponent.py - (MultiInputParseLaunchComponent.get_pipeline_string): Put the - muxer string at the end so that even if there are elements after - the muxer element, a default ! @feeder:default@ will work. - - * flumotion/component/combiners/switch/switch.py - (Switch.do_setup, Switch.create_pipeline): Fix some bugaboos. - (Switch.configure_pipeline.getDownstreamElement): Element.pads is - a function, not an attribute. Ghetto! - (Switch.try_switch.set_switching): Return True on success. - (Switch.try_switch.set_stop_time): Only update stop-value when it - is not CLOCK_TIME_NONE. - (Switch.try_switch.switch): Hrm, turns out active-pad is a string - property, not an object property. Whoops! - - * flumotion/common/gstreamer.py (verbose_deep_notify_cb): %r - instead of %s. - -2007-12-04 Michael Smith - - * flumotion/__init__.py: - * flumotion/admin/__init__.py: - * flumotion/admin/admin.py: - * flumotion/admin/command/__init__.py: - * flumotion/admin/command/commands.py: - * flumotion/admin/command/main.py: - * flumotion/admin/command/utils.py: - * flumotion/admin/connections.py: - * flumotion/admin/gtk/__init__.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/componentview.py: - * flumotion/admin/gtk/connections.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/main.py: - * flumotion/admin/gtk/message.py: - * flumotion/admin/gtk/parts.py: - * flumotion/admin/gtk/spyglass.py: - * flumotion/admin/gtk/wizard.py: - * flumotion/admin/multi.py: - * flumotion/admin/rrdmon/__init__.py: - * flumotion/admin/rrdmon/config.py: - * flumotion/admin/rrdmon/main.py: - * flumotion/admin/rrdmon/rrdmon.py: - * flumotion/admin/text/__init__.py: - * flumotion/admin/text/admin_text.py: - * flumotion/admin/text/connection.py: - * flumotion/admin/text/greeter.py: - * flumotion/admin/text/main.py: - * flumotion/admin/text/misc_curses.py: - * flumotion/admin/text/view.py: - * flumotion/common/__init__.py: - * flumotion/common/avltree.py: - * flumotion/common/boot.py: - * flumotion/common/bundle.py: - * flumotion/common/bundleclient.py: - * flumotion/common/common.py: - * flumotion/common/componentui.py: - * flumotion/common/config.py: - * flumotion/common/connection.py: - * flumotion/common/dag.py: - * flumotion/common/debug.py: - * flumotion/common/enum.py: - * flumotion/common/errors.py: - * flumotion/common/fxml.py: - * flumotion/common/gstreamer.py: - * flumotion/common/identity.py: - * flumotion/common/interfaces.py: - * flumotion/common/keycards.py: - * flumotion/common/log.py: - * flumotion/common/manhole.py: - * flumotion/common/medium.py: - * flumotion/common/messages.py: - * flumotion/common/netutils.py: - * flumotion/common/options.py: - * flumotion/common/package.py: - * flumotion/common/planet.py: - * flumotion/common/pygobject.py: - * flumotion/common/python.py: - * flumotion/common/reflectcall.py: - * flumotion/common/registry.py: - * flumotion/common/reload.py: - * flumotion/common/server.py: - * flumotion/common/setup.py: - * flumotion/common/signals.py: - * flumotion/common/startset.py: - * flumotion/common/testsuite.py: - * flumotion/common/watched.py: - * flumotion/common/worker.py: - * flumotion/component/__init__.py: - * flumotion/component/base/__init__.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/admin_text.py: - * flumotion/component/base/http.py: - * flumotion/component/base/scheduler.py: - * flumotion/component/base/watcher.py: - * flumotion/component/bouncers/__init__.py: - * flumotion/component/bouncers/admin_gtk.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/component.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/bouncers/icalbouncer.py: - * flumotion/component/bouncers/ipbouncer.py: - * flumotion/component/bouncers/plug.py: - * flumotion/component/bouncers/saltsha256.py: - * flumotion/component/bouncers/tokentest.py: - * flumotion/component/bouncers/tokentestbouncer.py: - * flumotion/component/combiners/__init__.py: - * flumotion/component/combiners/composite/__init__.py: - * flumotion/component/combiners/composite/composite.py: - * flumotion/component/combiners/switch/__init__.py: - * flumotion/component/combiners/switch/admin_gtk.py: - * flumotion/component/combiners/switch/basicwatchdog.py: - * flumotion/component/combiners/switch/patternswitch.py: - * flumotion/component/combiners/switch/switch.py: - * flumotion/component/component.py: - * flumotion/component/consumers/__init__.py: - * flumotion/component/consumers/disker/__init__.py: - * flumotion/component/consumers/disker/admin_gtk.py: - * flumotion/component/consumers/disker/admin_text.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/disker/disker_plug.py: - * flumotion/component/consumers/httpstreamer/__init__.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/consumers/preview/__init__.py: - * flumotion/component/consumers/preview/preview.py: - * flumotion/component/consumers/shout2/__init__.py: - * flumotion/component/consumers/shout2/shout2.py: - * flumotion/component/converters/__init__.py: - * flumotion/component/converters/overlay/__init__.py: - * flumotion/component/converters/overlay/genimg.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/converters/pipeline/__init__.py: - * flumotion/component/converters/pipeline/pipeline.py: - * flumotion/component/eater.py: - * flumotion/component/effects/__init__.py: - * flumotion/component/effects/colorbalance/__init__.py: - * flumotion/component/effects/colorbalance/admin_gtk.py: - * flumotion/component/effects/colorbalance/colorbalance.py: - * flumotion/component/effects/volume/__init__.py: - * flumotion/component/effects/volume/admin_gtk.py: - * flumotion/component/effects/volume/volume.py: - * flumotion/component/encoders/__init__.py: - * flumotion/component/encoders/jpeg/__init__.py: - * flumotion/component/encoders/jpeg/jpeg.py: - * flumotion/component/encoders/mulaw/__init__.py: - * flumotion/component/encoders/mulaw/mulaw.py: - * flumotion/component/encoders/smoke/__init__.py: - * flumotion/component/encoders/smoke/smoke.py: - * flumotion/component/encoders/speex/__init__.py: - * flumotion/component/encoders/speex/speex.py: - * flumotion/component/encoders/theora/__init__.py: - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/encoders/vorbis/__init__.py: - * flumotion/component/encoders/vorbis/vorbis.py: - * flumotion/component/encoders/vorbis/vorbis010.py: - * flumotion/component/encoders/vorbis/vorbisutils.py: - * flumotion/component/feed.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/feeder.py: - * flumotion/component/misc/__init__.py: - * flumotion/component/misc/httpfile/__init__.py: - * flumotion/component/misc/httpfile/admin_gtk.py: - * flumotion/component/misc/httpfile/file.py: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/porter/__init__.py: - * flumotion/component/misc/porter/porter.py: - * flumotion/component/misc/porter/porterclient.py: - * flumotion/component/misc/repeater/__init__.py: - * flumotion/component/misc/repeater/repeater.py: - * flumotion/component/muxers/__init__.py: - * flumotion/component/muxers/checks.py: - * flumotion/component/muxers/multipart.py: - * flumotion/component/muxers/ogg.py: - * flumotion/component/padmonitor.py: - * flumotion/component/plugs/__init__.py: - * flumotion/component/plugs/adminaction.py: - * flumotion/component/plugs/base.py: - * flumotion/component/plugs/identity.py: - * flumotion/component/plugs/lifecycle.py: - * flumotion/component/plugs/loggers.py: - * flumotion/component/plugs/manhole.py: - * flumotion/component/plugs/streamdata.py: - * flumotion/component/producers/__init__.py: - * flumotion/component/producers/audiotest/__init__.py: - * flumotion/component/producers/audiotest/admin_gtk.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/bttv/__init__.py: - * flumotion/component/producers/bttv/admin_gtk.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/producers/checks.py: - * flumotion/component/producers/firewire/__init__.py: - * flumotion/component/producers/firewire/admin_gtk.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/gdp/__init__.py: - * flumotion/component/producers/gdp/gdp.py: - * flumotion/component/producers/icecast/__init__.py: - * flumotion/component/producers/icecast/icecast.py: - * flumotion/component/producers/ivtv/__init__.py: - * flumotion/component/producers/ivtv/ivtv.py: - * flumotion/component/producers/looper/__init__.py: - * flumotion/component/producers/looper/admin_gtk.py: - * flumotion/component/producers/looper/looper.py: - * flumotion/component/producers/pipeline/__init__.py: - * flumotion/component/producers/pipeline/pipeline.py: - * flumotion/component/producers/playlist/__init__.py: - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/playlist/playlistparser.py: - * flumotion/component/producers/playlist/singledecodebin.py: - * flumotion/component/producers/playlist/smartscale.py: - * flumotion/component/producers/rtsp/__init__.py: - * flumotion/component/producers/rtsp/rtsp.py: - * flumotion/component/producers/screencast/__init__.py: - * flumotion/component/producers/screencast/screencast.py: - * flumotion/component/producers/soundcard/__init__.py: - * flumotion/component/producers/soundcard/admin_gtk.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/unixdomain/__init__.py: - * flumotion/component/producers/unixdomain/unixdomain.py: - * flumotion/component/producers/videotest/__init__.py: - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/component/producers/videotest/admin_text.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/webcam/__init__.py: - * flumotion/component/producers/webcam/admin_gtk.py: - * flumotion/component/producers/webcam/webcam.py: - * flumotion/configure/__init__.py: - * flumotion/configure/configure.py: - * flumotion/extern/__init__.py: - * flumotion/extern/code.py: - * flumotion/extern/fdpass/__init__.py: - * flumotion/extern/log/__init__.py: - * flumotion/extern/log/log.py: - * flumotion/extern/log/termcolor.py: - * flumotion/extern/log/test_log.py: - * flumotion/extern/pytrayicon/__init__.py: - * flumotion/extern/pytrayicon/ltihooks.py: - * flumotion/job/__init__.py: - * flumotion/job/job.py: - * flumotion/job/main.py: - * flumotion/launch/__init__.py: - * flumotion/launch/inspect.py: - * flumotion/launch/main.py: - * flumotion/launch/parse.py: - * flumotion/manager/__init__.py: - * flumotion/manager/admin.py: - * flumotion/manager/base.py: - * flumotion/manager/component.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/monitor/__init__.py: - * flumotion/monitor/nagios/__init__.py: - * flumotion/monitor/nagios/main.py: - * flumotion/monitor/nagios/util.py: - * flumotion/project/__init__.py: - * flumotion/project/project.py: - * flumotion/service/__init__.py: - * flumotion/service/main.py: - * flumotion/service/service.py: - * flumotion/test/__init__.py: - * flumotion/test/bouncertest.py: - * flumotion/test/comptest.py: - * flumotion/test/gtkunit.py: - * flumotion/test/realm.py: - * flumotion/test/test_admin_admin.py: - * flumotion/test/test_admin_multi.py: - * flumotion/test/test_bundle.py: - * flumotion/test/test_checkers.py: - * flumotion/test/test_common.py: - * flumotion/test/test_common_avltree.py: - * flumotion/test/test_common_componentui.py: - * flumotion/test/test_common_connection.py: - * flumotion/test/test_common_gstreamer.py: - * flumotion/test/test_common_messages.py: - * flumotion/test/test_common_netutils.py: - * flumotion/test/test_common_package.py: - * flumotion/test/test_common_planet.py: - * flumotion/test/test_common_pygobject.py: - * flumotion/test/test_common_signals.py: - * flumotion/test/test_component.py: - * flumotion/test/test_component_base_scheduler.py: - * flumotion/test/test_component_base_watcher.py: - * flumotion/test/test_component_bouncers_bouncer.py: - * flumotion/test/test_component_bouncers_component.py: - * flumotion/test/test_component_bouncers_plug.py: - * flumotion/test/test_component_feed.py: - * flumotion/test/test_component_feeder.py: - * flumotion/test/test_component_httpserver.py: - * flumotion/test/test_component_httpstreamer.py: - * flumotion/test/test_component_init.py: - * flumotion/test/test_component_padmonitor.py: - * flumotion/test/test_component_playlist.py: - * flumotion/test/test_comptest.py: - * flumotion/test/test_config.py: - * flumotion/test/test_configure.py: - * flumotion/test/test_credentials.py: - * flumotion/test/test_dag.py: - * flumotion/test/test_defer.py: - * flumotion/test/test_dialogs.py: - * flumotion/test/test_enum.py: - * flumotion/test/test_flavors.py: - * flumotion/test/test_greeter.py: - * flumotion/test/test_htpasswdcrypt.py: - * flumotion/test/test_http.py: - * flumotion/test/test_i18n.py: - * flumotion/test/test_keycards.py: - * flumotion/test/test_logfilter.py: - * flumotion/test/test_manager_admin.py: - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_manager_worker.py: - * flumotion/test/test_misc_httpfile.py: - * flumotion/test/test_options.py: - * flumotion/test/test_parts.py: - * flumotion/test/test_pb.py: - * flumotion/test/test_pbstream.py: - * flumotion/test/test_porter.py: - * flumotion/test/test_public_ui_api.py: - * flumotion/test/test_reflect.py: - * flumotion/test/test_registry.py: - * flumotion/test/test_saltsha256.py: - * flumotion/test/test_testclasses.py: - * flumotion/test/test_twisted_integration.py: - * flumotion/test/test_ui_fgtk.py: - * flumotion/test/test_wizard.py: - * flumotion/test/test_wizard_models.py: - * flumotion/test/test_worker_config.py: - * flumotion/test/test_worker_job.py: - * flumotion/test/test_worker_medium.py: - * flumotion/test/test_worker_worker.py: - * flumotion/test/test_workerconfig.py: - * flumotion/tester/__init__.py: - * flumotion/tester/client.py: - * flumotion/tester/clientfactory.py: - * flumotion/tester/httpclient.py: - * flumotion/twisted/__init__.py: - * flumotion/twisted/checkers.py: - * flumotion/twisted/compat.py: - * flumotion/twisted/credentials.py: - * flumotion/twisted/defer.py: - * flumotion/twisted/fdserver.py: - * flumotion/twisted/flavors.py: - * flumotion/twisted/http.py: - * flumotion/twisted/integration.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - * flumotion/twisted/reflect.py: - * flumotion/twisted/rtsp.py: - * flumotion/ui/__init__.py: - * flumotion/ui/fgtk.py: - * flumotion/ui/fvumeter.py: - * flumotion/ui/glade.py: - * flumotion/ui/icons.py: - * flumotion/ui/sidebar.py: - * flumotion/ui/trayicon.py: - * flumotion/ui/url.py: - * flumotion/ui/wizard.py: - * flumotion/wizard/__init__.py: - * flumotion/wizard/basesteps.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/models.py: - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/save.py: - * flumotion/wizard/worker.py: - * flumotion/worker/__init__.py: - * flumotion/worker/base.py: - * flumotion/worker/checks/__init__.py: - * flumotion/worker/checks/audio.py: - * flumotion/worker/checks/check.py: - * flumotion/worker/checks/encoder.py: - * flumotion/worker/checks/gst010.py: - * flumotion/worker/checks/video.py: - * flumotion/worker/config.py: - * flumotion/worker/feedserver.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - * flumotion/worker/medium.py: - * flumotion/worker/worker.py: - For all python code: - - add __version__ = "$Rev$" - - set svn:keywords to substitute $Rev$ - -2007-12-04 Johan Dahlin - - Revert commit: - - * data/glade/wizard_consumption.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_license.glade: - * data/glade/wizard_overlay.glade: - * data/glade/wizard_soundcard.glade: - * data/glade/wizard_source.glade: - * data/glade/wizard_tvcard.glade: - Remove signals which are connected automatically by Kiwi. - -2007-12-04 Andy Wingo - - * flumotion/component/combiners/switch/switch.py - (collect_single_shot_buffer_probe): New helper, runs a function on - one buffer from all pads, firing a deferred in the main thread - when all values are collected. - (SwitchMedium.remote_switchTo): New remote method. - (ICalSwitchPlug, Switch.do_setup): Factor ICal stuff out into a - plug, which currently is not exported as such, but in the future - could be. - (Switch.init): Rework the state of the switcher, and document it. - Going back to the idealEater formulation that Zaheer had. Removed - lock, unnecessary as all switch code happens in the main thread. - (Switch.clearWarning): New helper. - (Switch.is_active): Less evil. - (Switch.eaterSetActive): Don't muck with a dict of deferreds; the - idea is just to retry switching as necessary. - (Switch.switch_to): Rework to set the idealEater and then call - try_switch(). - (Switch.try_switch): Put prepare() and finish() code inside, which - I hope is more readable. The diff sucks tho. - -2007-12-04 Johan Dahlin - - * data/glade/wizard_consumption.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_license.glade: - * data/glade/wizard_overlay.glade: - * data/glade/wizard_soundcard.glade: - * data/glade/wizard_source.glade: - * data/glade/wizard_tvcard.glade: - Remove signals which are connected automatically by Kiwi. - -2007-12-04 Johan Dahlin - - * flumotion/ui/glade.py (FluLibgladeWidgetTree.get_sizegroups): Add a - kiwi monkey patch for the libglade loader - (GladeBacked.__init__): Port over to use the delegate. - (GladeWindow.destroy): Don't inherit from GObject direcetly the Delegate - already does that. - Remove unused modules. - - * data/glade/connection-dialog.glade: Rename the dialog to window1 too, - for consistency - - * flumotion/wizard/save.py (WizardSaver._set_fraction_property): Catch - ValueError, fixes the webcam step. - - * data/glade/admin-wizard.glade: - * data/glade/authenticate.glade: - * data/glade/greeter-authenticate.glade: - * data/glade/wizard.glade: - Call the toplevel names window1, for consistency - - * flumotion/ui/glade.py: Remove unused import. - (GladeWindow.__init__): Remove unused signal connection mechanism. - - * flumotion/ui/wizard.py (SectionWizard.__nonzero__): - Implement __nonzero__, so if wizard: works as expected. - - * flumotion/component/misc/porter/porterclient.py: - Avoid a mutable default function argument. - - * flumotion/wizard/save.py (WizardSaver.handleConsumers): - Link and add muxers after adding consumers, not before. - - * flumotion/wizard/consumptionsteps.py: - Use a separate signal handler for all three widgets, for consistency. - -2007-12-04 Andy Wingo - - * flumotion/common/registry.py (RegistryParser.parseRegistryFile) - (RegistryParser.parseRegistry): Fix code to match intentions, I - think. - -2007-12-03 Johan Dahlin - - * flumotion/common/common.py (argRepr): - * flumotion/test/test_common.py: - Kill argRepr and remove tests - -2007-12-03 Michael Smith - - * flumotion/common/registry.py: - Provide more useful debug output by using filenames where possible - * flumotion/twisted/pb.py: - Log remote calls slightly more correctly. - * flumotion/test/test_manager_manager.py: - Fix one of the skipped tests. - -2007-12-03 Johan Dahlin - - * data/glade/admin.glade: - * data/glade/connection-dialog.glade: - * data/glade/greeter-authenticate.glade: - * data/glade/greeter-connect_to_existing.glade: - * data/glade/greeter-load_connection.glade: - * data/glade/wizard.glade: - Remove trailing () so we can avoid eval. - - * flumotion/ui/glade.py (_flumotion_glade_custom_handler): - Rewrite, use namedAny instead of eval. - Remove unused methods and mark methods as private. - -2007-12-03 Johan Dahlin - - * flumotion/ui/glade.py: - * flumotion/ui/url.py: - * flumotion/ui/wizard.py: - Remove unused imports and make pyflakes happy. - -2007-12-03 Johan Dahlin - - * flumotion/ui/wizard.py (SectionWizard._jump_to_step): - When jumping to the same step don't do anything to - avoid unnecessary ui flashes - - * flumotion/ui/sidebar.py (SidebarSection.__init__): - rename steps to buttons - - * po/POTFILES.in: Updae path to sidebar.py - - * data/glade/wizard.glade: - * flumotion/ui/Makefile.am: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/sidebar.py: - Move sidebar.py from wizard/ to ui/ - -2007-12-03 Johan Dahlin - - * flumotion/test/test_wizard.py: Remove a bitrotten test case - - * flumotion/ui/wizard.py: - Refactor and simplify - - * flumotion/wizard/consumptionsteps.py (HTTPStep.__init__): - set _missing_element to none in the constructor, it happens - when clicking on the step in the sidebar. - - * flumotion/ui/wizard.py (WizardStep): Remove unused vmethods. - - * flumotion/wizard/conversionsteps.py (ConversionStep): - avoid duplication - - * data/glade/wizard_theora.glade: - * data/glade/wizard_vorbis.glade: - * flumotion/wizard/conversionsteps.py (VorbisStep) - (TheoraStep): move over values to the glade files. - (ConversionStep.hasOggmux): - - * po/sv.po: Update swedish translation - - * data/glade/wizard_http.glade: Make it a bit prettier by - aligning the spinbuttons/entries better and avoid expanding them - so much. - -2007-11-30 Johan Dahlin - - * data/glade/wizard_overlay.glade: - * flumotion/wizard/basesteps.py (OverlayStep): - Remove get_state() and widget naming prefix. Rename signals. - Rename widgets to match their state name, simplify element parts - - * flumotion/wizard/save.py (WizardSaver): - Refactor overlay saving - - * data/glade/wizard_soundcard.glade: - * flumotion/wizard/productionstep.py (SoundCardStep): - Remove get_state() and widget naming prefix. Rename signals. - Rename widgets to match their state name, simplify element parts - - * data/glade/wizard_encoding.glade: - * flumotion/wizard/productionstep.py (TVCardStep): - Remove get_state() and widget naming prefix. Rename signals. - Add default values to the model - - * flumotion/wizard/save.py: - Move fraction denomination from the step to the save logic - - * flumotion/test/test_wizard.py (WizardStepTest.testLoadSteps): - (WizardStepTest.testStepComponentProperties): Enable these, they are - working on my machine - - * flumotion/ui/fgtk.py: - Remove all now unused widgets, add SpinButton to the list - of converted widgets. - - * data/glade/wizard_smoke.glade: - * flumotion/wizard/conversionsteps.py (SmokeStep): - Remove get_state() and widget naming prefix. - - * data/glade/wizard_encoding.glade: - * flumotion/wizard/conversionsteps.py (ConversiontStep): - Remove get_state() and widget naming prefix. Rename signals. - - * data/glade/wizard_shout2.glade: - * flumotion/wizard/consumptionsteps.py (Shout2Step): - Remove get_state() and widget naming prefix. Rename signals. - - * data/glade/wizard_consumption.glade: - * flumotion/wizard/consumptionsteps.py (ConsumptionStep): - Remove get_state() and widget naming prefix. Rename signals. - - * data/glade/wizard_source.glade: - * flumotion/wizard/productionsteps.py (ProductionStep): - Remove get_state() and widget naming prefix. Rename signals. - - * data/glade/wizard_license.glade: - * flumotion/wizard/configurationwizard.py: - (LicenseStep): remove widget naming prefix, the name of the widget - is the state name - - * flumotion/ui/wizard.py (WizardStep.get_state): - reimplement using proxy widget state. - - * flumotion/ui/fgtk.py (ProxyWidgetMapping): Add - radio and entry. - - * flumotion/wizard/conversionsteps.py (JPEGStep.get_state): - _fraction_from_float, fix typo - - * flumotion/ui/wizard.py (WizardStep): use ProxyWidgetMapping here - and remove it on all known subclasses. - * flumotion/wizard/configurationwizard.py - (LicenseStep): use ProxyWidgetMapping - - * flumotion/wizard/basesteps.py: - * flumotion/wizard/conversionsteps.py: - (JPEGStep.get_state): - Move over the consumption steps to ProxyWidgetMapping - - * flumotion/wizard/conversionsteps.py (ConversionStep): - Use ProxyWidgetMapping, refactor/simplify video/audio page - (ConversionStep._get_video_page): Yay for pychecker - -2007-11-29 Andy Wingo - - * flumotion/component/combiners/switch/switch.py (withlock): New - helper. - (Switch.init, Switch._create_scheduler): Change idealEater to - _switchingToFeed, protected by the switch lock. The switch lock - just protects data, not code. - (Switch.create_pipeline, SingleSwitch.get_logical_feeds) - (AVSwitch.get_logical_feeds): get_logical_feeds returns a list of - tuples now instead of a dict so that it can be in order of - preference. Remove some code duplication. - (Switch._prepare_switch, Switch.switch_to) - (Switch._finish_switch): Rework switching so that it is the same - in the single and in the multiple case. Dunno if this is really a - good idea though. Untested! - -2007-11-29 Johan Dahlin - - * flumotion/wizard/basesteps.py: - * flumotion/wizard/configurationwizard.py: - Only inherit from WorkerWizardStep when necessary and - mark worker_list as private. - -2007-11-29 Johan Dahlin - - * flumotion/wizard/basesteps.py (AudioEncoderStep.get_next): - Use ProxyWidgetMapping - - * flumotion/wizard/configurationwizard.py (ConfigurationWizard.before_show_step): - Only do something interesting in workersteps. - - * flumotion/wizard/consumptionsteps.py: - Convert to ProxyWidgetMapping, - avoid inheriting workerstep where not necessary - - * flumotion/wizard/basesteps.py (WorkerWizardStep.run_in_worker): - * flumotion/wizard/productionsteps.py: - Move ProxyWidgetMapping to base classes, remove production section - where it is not necessary to specify it. - - * flumotion/wizard/productionsteps.py: - (SoundcardStep, TestSourceStep): Use ProxyWidgetMapping - and refactor away most of the enum usages, avoid catching - AttributeError it just leads to hard to find bugs. - (SoundcardStep._update_inputs): Add a message saying what's - going on when probing soundcard - (FireWireAudioStep): Use ProxyWidgetMapping, make the both firewire - steps consistent. - - * flumotion/wizard/enums.py (SoundcardSystem): Remove a couple of - enum abuses. - -2007-11-29 Andy Wingo - - * flumotion/component/combiners/switch/switch.py - (Switch.configure_pipeline): Populate an internal dict, - switchPads, mapping eater aliases to switch elements and the - corresponding sink pad. Watch feeds for activity, and set the - initially active pads on the switch elements. - (Switch.get_switch_elements, SingleSwitch.get_switch_elements) - (AVSwitch.get_switch_elements): New vmethod, returns a list of - switch elements in the pipeline. - (Switch.switch_to): Put a base implementation here. Will need to - expand to cover the AVSwitch case. - (Switch.eaterSetActive, Switch.eaterSetInactive): Debitrotten. - Fold in common functionality from subclasses. - (Switch.switch_to_for_event.feed_unavailable): Fix up for name - changes. - (SingleSwitch): Simplify, all code is in base class now. - (AVSwitch.addError): New helper. - (AVSwitch.do_check): Simplify with use of sets. - (AVSwitch.init): Store the prop name -> caps prop name mapping on - the class. - (AVSwitch.get_pipeline_string): Reflagellate to be more - entertaining. - - * flumotion/component/padmonitor.py (PadMonitor.addWatch) - (PadMonitor.addWatch, PadMonitor.setInactive) - (PadMonitor.__init__): Manage a list of functions that can be - notified when pads go active or inactive instead of just one pair - of functions. - - * flumotion/component/eater.py (Eater.addWatch): New API, takes - two functions, which will be called with the eater alias as an - argument when an eater goes active or inactive, respectively. - -2007-11-29 Johan Dahlin - - * flumotion/wizard/productionsteps.py (FireWireStep): - Use ProxyWidgetMapping - -2007-11-29 Pedro Gracia - - * po/es.po: - Spanish 100% again - -2007-11-29 Johan Dahlin - - * flumotion/wizard/productionsteps.py (TVCardStep.errRemoteRunError): - Remove defer_generator_method, add a probing message like the webcam - component, clear the combos when a device is not found. - (TVCardStep): use ProxyWidgetMapping - (FireWireStep): Use ProxyWidgetMapping - - * configure.ac: kiwi not found, not kiwi found when kiwi is not found. - - * flumotion/wizard/productionsteps.py - (WebcamStep.on_combobox_size_changed): Set the height to the height - of the selected size and not the width! - (WebcamStep._run_checks): Catch RemoteRunError and make it impossible - to select the device when it does not exist. - (TestVideoSourceStep, WebcamStep): use ProxyWidgetMapping - (WebcamStep._run_checks): get_string->get_selected, forgot to merge this - change from my rejected patch, grr. - -2007-11-28 Pedro Gracia - - * flumotion/admin/gtk/client.py: - Pretty print in XML export - fixes #801 - -2007-11-28 Johan Dahlin - - * flumotion/wizard/basesteps.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/save.py: - * flumotion/wizard/worker.py: - Mark strings visible in the user interface as translatable. - - * po/ca.po: - * po/de.po: - * po/es.po: - * po/fr.po: - * po/nl.po: - * po/no.po: - * po/pt_BR.po: - * po/sv.po: - Update translation files and update swedish translation. - -2007-11-28 Andy Wingo - - * flumotion/component/combiners/switch/switch.py: Shorten logging - categories. - (Switch.logicalFeeds, Switch.create_pipeline) - (Switch.get_logical_feeds, SingleSwitch.get_logical_feeds) - (AVSwitch.get_logical_feeds): There are only three important - numbers in computer science: 0, 1, and N. We have passed one. - (Switch.addWarning, Switch._create_scheduler, Switch.is_active) - (Switch.switch_to_for_event, SingleSwitch.switch_to): More - flagellation. - -2007-11-28 Johan Dahlin - - * README: - * configure.ac: - * flumotion.spec.in: - * flumotion/common/boot.py: - Add a dependency on Kiwi 1.9.13 - - * flumotion/ui/fgtk.py: - Add a ProxyWidgetMapping and a custom subclass of the - proxy that can handle flumotion enums - - * flumotion/wizard/productionsteps.py: - Use proxy comboboxes in the source step - -2007-11-28 Pedro Gracia - - * po/es.po: 100% traslated 100% to spanish - -2007-11-28 Andy Wingo - - * flumotion/component/combiners/switch/switch.py: Rework imports. - (Switch._create_scheduler.addWarning, Switch.do_check) - (Switch.do_setup): Reflaggelate some setup code. - - * configure.ac: Back to dev? - -2007-11-28 Pedro Gracia - - * po/es.po: updated spanish translation again - -2007-11-28 Johan Dahlin - - * configure.ac: - * flumotion/common/boot.py: - * flumotion/common/pygobject.py: - - Require PyGTK 2.8.4 and Twisted 2.0.1 - Remove PyGTK 2.6 comaptibility - - * README: - Document the new requirements - -2007-11-28 Johan Dahlin - - * flumotion/ui/fvumeter.py: - * flumotion/ui/fgtk.py: - Fixup imports in these two files, oops. - - * flumotion/component/effects/volume/admin_gtk.py: - * flumotion/test/test_ui_fgtk.py: - * flumotion/ui/Makefile.am: - * flumotion/ui/fgtk.py: - * flumotion/ui/fvumeter.py: - - Move FVUMeter out of fgtk.py to a separate file, update callsites. - -2007-11-28 Johan Dahlin - - * flumotion/ui/fgtk.py (FComboBox._get_column_content): Mark as private - (FComboBox.__len__) Remove, - Reorganize method order - - * data/glade/videotest.glade: - * data/glade/wizard_audiotest.glade: - * data/glade/wizard_disk.glade: - * data/glade/wizard_firewire.glade: - * data/glade/wizard_license.glade: - * data/glade/wizard_soundcard.glade: - * data/glade/wizard_source.glade: - * data/glade/wizard_testsource.glade: - * data/glade/wizard_tvcard.glade: - * data/glade/wizard_webcam.glade: - Remove all static ComboBox item strings, they are overwritten by the - enums later anyway. - - * flumotion/common/enum.py: - * flumotion/wizard/enums.py: - Mark strings that should be translatable as such. - Use lists instead of tuples for elements of the same kind, - reorganize to make it a bit more readable - - * po/sv.po: - Update swedish translation - -2007-11-28 Johan Dahlin - - * data/glade/wizard_audiotest.glade: - * data/glade/wizard_disk.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_http.glade: - * data/glade/wizard_jpeg.glade: - * data/glade/wizard_shout2.glade: - * data/glade/wizard_smoke.glade: - * data/glade/wizard_soundcard.glade: - * data/glade/wizard_source.glade: - * data/glade/wizard_testsource.glade: - Set label/checkbutton alignments, table width, - do not expand port spinbuttons - - * po/sv.po: Update swedish translation - -2007-11-28 Michael Smith - - * flumotion/component/combiners/switch/switch.py: - First steps towards making switch work again (it still doesn't work, but - some bits are cleaned up?) - -2007-11-28 Johan Dahlin - - * flumotion/wizard/productionsteps.py (WebcamStep._run_checks.errback): - Get rid of a defer generator method - -2007-11-27 Andy Wingo - - * flumotion.doap: Update for release. - - * configure.ac: Back to dev, again - -=== release 0.5.1 === - -2007-11-27 Andy Wingo - - * NEWS: - * RELEASE: - * configure.ac: Retag as 0.5.1 to change release name - - * configure.ac: Back to de - -2007-11-27 Andy Wingo - - * NEWS: - * RELEASE: - * configure.ac: Update for release - - * po/*.po: For some reason svn wants me to commit these. - -2007-11-27 Johan Dahlin - - * flumotion/admin/gtk/client.py: - Test all reload code and avoid throwing errors - -2007-11-27 Johan Dahlin - - * flumotion/component/base/admin_gtk.py (FeedersAdminGtkNode.setUIState): - Check if selection is not None, fixes a startup race. - - * data/glade/authenticate.glade: Avoid aligments, - label alignment fix and add trailing : - - * data/glade/open-connection.glade: Avoid alignments where - not necessary, shrink the size of the port entry, align the - labels to the right, add trailing : to their labels, and - put the radiobutton in alignment with the entries, not the - labels. - -2007-11-26 Michael Smith - - * flumotion/component/plugs/lifecycle.py: - * flumotion/component/plugs/plugs.xml: - Add component lifecycle plug (and sample implementation) mirroring the - manager lifecycle plug. - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/misc/httpfile/httpfile.xml: - Add socket for lifecycle plug to both streamers. - -2007-11-26 Michael Smith - - * flumotion/test/test_config.py: - * flumotion/test/test_registry.py: - Fix tests to provide base attribute now that the parser checks for it. - -2007-11-26 Michael Smith - - * flumotion/common/registry.py: - Make 'base' on components required (it is present on all of them - currently, and should be required. - Comment out 'inherit' handling; it's unreachable ('inherit' is not an - optional attribute in the parser) and needs redesigning anyway. - -2007-11-26 Johan Dahlin - - * po/LINGUAS: Add swedish here - - * po/sv.po: Fix errors and update translation - - * flumotion/admin/gtk/wizard.py: - (Wizard.__init__): Don't put state in the class, we have more - than one subclass of the wizard and we really want the steps - to be specific to instances, really. - -2007-11-26 Michael Smith - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/wizard.py: - * flumotion/admin/text/view.py: - * flumotion/common/bundleclient.py: - * flumotion/common/keycards.py: - * flumotion/common/netutils.py: - * flumotion/common/registry.py: - * flumotion/common/testsuite.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/watcher.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/misc/httpfile/file.py: - * flumotion/extern/log/log.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - * flumotion/twisted/rtsp.py: - * flumotion/ui/glade.py: - * flumotion/worker/base.py: - * flumotion/worker/medium.py: - * flumotion/worker/worker.py: - Documentation fixes to produce fewer epydoc warnings. - -2007-11-26 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/wizard.py: - Handle WizardCancelled for the ConnectionDialog - -2007-11-26 Johan Dahlin - - * data/glade/connection-dialog.glade: - * flumotion/admin/gtk/connections.py (ConnectionsDialog): - Don't connect ::delete-event directly to self.destroy(), - create a separate function which calls it in instead - - * po/sv.po: Add swedish translation - - * flumotion/wizard/productionsteps.py - (FireWireAudioStep.on_update_output_format) - (FireWireStep.on_update_output_format): width_corrections is not - private a class variable. - (SoundcardStep): Some methods are private now. - (SoundcardStep._update_inputs): Add an errback which clears the combos - and prevents the user from going forward, fixes #803 - -2007-11-26 Pedro Gracia - - * po/es.po: Spanish translation updated. - -2007-11-26 Johan Dahlin - - * flumotion/admin/gtk/greeter.py: Remove unused imports - -2007-11-23 Johan Dahlin - - * data/glade/Makefile.am (glade_DATA): Add videotest.glade - (glade_DATA): add spyglass.glade - - * flumotion/admin/gtk/Makefile.am (component_PYTHON): Add spyglass.py - - * flumotion/admin/text/Makefile.am (component_PYTHON): Add admin_text.py - - * flumotion/test/Makefile.am (EXTRA_DIST): Add all python files. - - * flumotion/extern/pytrayicon/Makefile.am (flumotion_PYTHON): - Add ltihooks.py - - * po/POTFILES.in: - * flumotion/component/producers/jukebox: Remove all traces of the - jukebox component - - * flumotion/twisted/fdserver.py: - use map() instead of a string to workaround gettext encoding problems. - - * po/POTFILES.in: Add all glade files and python files here. - - * po/*.po: Update - -2007-11-22 Johan Dahlin - - * flumotion/admin/gtk/connections.py (Connections.__init__): - use scroll_to_cell instead of set_cursor, to actually go to the select - the connection used the last time. - - * flumotion/wizard/conversionsteps.py (TheoraStep.worker_changed) - (VorbisStep.worker_changed.hasVorbis, ConversionStep._verify): - Get rid of defer_generator_method. - - * flumotion/wizard/basesteps.py: - (OverlayStep._worker_changed.importError): Get rid - of defer_generator_method. - -2007-11-22 Thomas Vander Stichele - - * doc/redhat/flumotion: - Make a better condrestart for the case where you restart only one - specific manager/worker. - -2007-11-21 Andy Wingo - - * flumotion/common/registry.py (READ_CACHE) - (ComponentRegistry.__init__): Don't read the cache on startup, so - as not to cause a memory usage spike. See #799. - -2007-11-21 Michael Smith - - * flumotion/common/config.py: - Serialise fractions correctly. - * flumotion/manager/admin.py: - Verify the registry when loading a new configuration, so that new - or changed components can be loaded successfully. - -2007-11-21 Michael Smith - - * flumotion/wizard/save.py: - Don't use the registry here; it's the only thing in the admin that - does, and it's slow and memory-hungry. The bugs we were using this - to detect haven't existed in a couple of years. - -2007-11-21 Johan Dahlin - - * data/glade/wizard_consumption.glade: - Set inconsistent to false for checkbutton_shout2_audio_video - -2007-11-21 Andy Wingo - - * flumotion/common/package.py (Packager.getPathsForPackage): - Style. - (Packager.registerPackagePath): Style, and a couple of checks that - we don't pass files to dir-walking functions. Potentially one of - the checks is redundant, but this function is so sucky that I - cannot be arsed to refactor. - (_listDirRecursively): Rework to require a directory, and to not - recurse into .svn directories. Reduces the IO load when running - uninstalled. - - * flumotion/common/bundle.py (BundledFile.__init__) - (BundledFile.hasChanged, BundledFile.pack, Bundler.bundle) - (Bundler._buildzip, BundlerBasket.add, BundlerBasket.add) - (BundlerBasket.add): Don't stat and md5sum files as they are - registered, rather, only as they are zipped up. Saves I/O costs on - startup, and over the long term because normally we only serve a - fraction of bundles. - -2007-11-21 Johan Dahlin - - * data/glade/wizard_consumption.glade: Revert the defaults to - False for all video only/audio only consumptions. - -2007-11-20 Thomas Vander Stichele - - * doc/redhat/flumotion: - * flumotion/service/main.py: - * flumotion/service/service.py: - Forward-port of platform-3 [5820] - -2007-11-20 Andy Wingo - - * flumotion/manager/manager.py - (Vishnu.loadManagerConfigurationXML): - * flumotion/common/registry.py (RegistryParser.parseRegistryFile) - (RegistryParser.parseRegistry): - * flumotion/common/config.py (FlumotionConfigXML.parse) - (ManagerConfigParser._parseManagerWithoutRegistry) - (ManagerConfigParser._parseManagerWithRegistry) - (ManagerConfigParser.unlink, AdminConfigParser._parse): Unlink DOM - objects, and try not to hold onto them. Frees up some memory. - -2007-11-20 Arek Korbik - - * flumotion/component/combiners/composite/composite.py: - * flumotion/component/combiners/composite/composite.xml: - * flumotion/component/combiners/composite/__init__.py: - * flumotion/component/combiners/composite/Makefile.am: - * flumotion/component/combiners/Makefile.am: - * configure.ac: - Initial import of the composite combiner component. - -2007-11-20 Johan Dahlin - - * flumotion/wizard/Makefile.am (flumotion_PYTHON): Add - configurationwizard.py here - - * po/POTFILES.in: Update - -2007-11-20 Andy Wingo - - * flumotion/common/options.py: Rewrite with some crazy crack so - that we don't import gobject unless boot.py tells us that we - should. - - * flumotion/common/boot.py (boot, init_option_parser): Detect at - boot-time whether or not we should use gobject.option. - -2007-11-20 Johan Dahlin - - * flumotion/wizard/Makefile.am (flumotion_PYTHON): fix typo - - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/consumptionsteps.py: - Make it work on pre python 2.5 by importing - our sorted/any re-implementations. - -2007-11-20 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/test/test_public_ui_api.py: - * flumotion/test/test_wizard.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/basesteps.py: - * flumotion/wizard/classes.py: - * flumotion/wizard/configurationwizard.py: - * flumotion/wizard/consumptionsteps.py: - * flumotion/wizard/conversionsteps.py: - * flumotion/wizard/productionsteps.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/worker.py: - - Remove unused module classes. - Separate wizard steps into pieces, move the wizard - to f.w.configurationwizard and rename it to just ConfigurationWizard. - -2007-11-20 Michael Smith - - * flumotion/extern/log/log.py: - Build the debug format string correctly when it includes kwargs. - -2007-11-20 Andy Wingo - - * flumotion/common/config.py (ConfigEntryComponent._buildConfig): - Cope with 2- or 3-tuples for the eaters list. - (BaseConfigParser._parseFeed, BaseConfigParser._parseEater): Parse - out an "alias" attribute on . - (exportPlanetXml.component): Fix serialization of eaters. - - * flumotion/test/test_config.py - (TestConfig.testParseComponentsWithMultipleSources): Add test for - specifying aliases for eaters. - -2007-11-20 Johan Dahlin - - * flumotion/test/test_public_ui_api.py: - Import changed - - * flumotion/wizard/steps.py: - (FirstTimeWizard): cp is the best merge tool ever - - * flumotion/ui/Makefile.am: - * flumotion/ui/wizard.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - * po/POTFILES.in: - Move flumotion.wizard.wizard.Wizard to - flumotion.ui.wizard.SectionWizard - -2007-11-20 Johan Dahlin - - * data/glade/wizard.glade: - * flumotion/wizard/steps.py: - (FirstTimeWizard): remove extra erroeous run_in_worker method - (FirstTimeWizard.show_next_step): Set default values on constructor, - the tests depends on this - - * flumotion/wizard/wizard.py: - Split out the specific parts of the first time wizard: - workers, admin etc to the subclass - -2007-11-20 Johan Dahlin - - * flumotion/test/test_wizard.py: Fix test after the latest - wizard changes - - * flumotion/test/test_public_ui_api.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - Replace WizardSection with WizardStep - (Wizard.__init__): Merge in Scenario, mark most attributes - and methods as private. - -2007-11-19 Johan Dahlin - - * flumotion/wizard/wizard.py (Wizard.__init__): - Check before trying to access self.sections and raise - an exception if it's not set properly - * flumotion/test/test_wizard.py: Fix test - - * flumotion/admin/gtk/client.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - Rework the way steps are added to the wizard, require - a subclass to be made with) - - a list of sections to be provieded - - the initial step - -2007-11-19 Johan Dahlin - - * flumotion/wizard/save.py: - Update getitem callsites here too. - -2007-11-19 Andy Wingo - - * flumotion/admin/text/view.py: Remove unused import. Stupid - pychecker. - - * flumotion/component/component.py - (BaseComponentMedium.remote_reloadComponent): Streamline. - (BaseComponentMedium._reloaded): Remove useless method. - - * flumotion/common/reload.py (reload): Wrap SyntaxError in a - pb.Error, as callers of reload() were doing; I am unclear how - useful this is. - - * flumotion/admin/gtk/client.py (Window._component_reload) - (Window._reload_manager, Window._reload_admin) - (Window._reload_all): Push the reload implementation up the stack. - See #260. - - * flumotion/admin/admin.py: Clean up imports. - (AdminModel.reloadAdmin, AdminModel.reload) - (AdminModel.reload_async, AdminModel.reloadManager): Removed, the - form of these interfaces is specific to the needs of the admin - client. - - * flumotion/manager/component.py - (ComponentAvatar.reloadComponent): Remove, callers now use - componentCallRemote directly. - - * flumotion/manager/admin.py (AdminAvatar._reloaded) - (AdminAvatar.perspective_reloadComponent): Remove some needless - proxy methods, just do a componentCallRemote to reload a - component. - (AdminAvatar.perspective_reloadManager): Streamline. - -2007-11-19 Johan Dahlin - - * flumotion/wizard/wizard.py (Wizard.__getitem__): - Rename to get_step() and update callsits - * flumotion/wizard/steps.py: Update callsites - -2007-11-19 Andy Wingo - - * flumotion/common/reload.py (reload): Adjust the ignore list to - adapt to log.py's new location. Still have NFI why reloading - log.py causes logging to stop. Perhaps it is because of the global - variables in the module getting reset? At least it appears to work - now. See #260. - (reload): Remove the ignore hack, it was just that the log system - needed reinitialization. - -2007-11-19 Johan Dahlin - - * flumotion/test/test_wizard.py (WizardStepTest.testLoadSteps): - Update WizardStep import - - * po/POTFILES.in: Remove step.py - -2007-11-19 Andy Wingo - - * flumotion/manager/admin.py - (AdminAvatar.perspectiveMessageReceived): Chain up instead of cut - and paste. - - * flumotion/twisted/pb.py (Referenceable.remoteMessageReceived) - (Avatar.perspectiveMessageReceived): Use maybeDeferred to reduce - duplicate code paths. - -2007-11-19 Johan Dahlin - - * flumotion/wizard/step.py: svn remove this - * flumotion/test/test_public_ui_api.py (TestPublicUI.testPublicUIAPI): - Update the public API, f.w.step is gone - - * flumotion/wizard/sidebar.py: - * flumotion/wizard/wizard.py: - Clean up the sidebar API and avoid class variables - -2007-11-19 Andy Wingo - - * flumotion/component/consumers/disker/disker.py - (Disker.change_filename): Use common.strftime. Fixes #740. - - * flumotion/common/common.py (strftime): A slow wrapper around - python's strftime() that can support unicode inputs. - - * flumotion/test/test_config.py (TestConfig.testParseEmpty): - Remove call to nonexistent function. - -2007-11-19 Johan Dahlin - - * flumotion/wizard/Makefile.am: - * flumotion/wizard/save.py: - * flumotion/wizard/step.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - Move WizardStep and WizardSection into wizard.py, - remove unused api. - (WizardStep, Wizard): rename workerRun to run_in_worker - and move most of the code to the wizard so we can remove - a few public apis. Remove add_msg/clear_msg aliases in - the steps. - (WizardStep.iterate_widgets): Move back to public API, since - it's used by the tests. - -2007-11-19 Andy Wingo - - * flumotion/common/config.py (exportPlanetXml): Remove a print. - Thanks Arek. - - * flumotion/manager/manager.py (Vishnu.getConfiguration): Call the - new exportPlanetXml with the whole planet state -- makes it so - that you can always export a manager's configuration, regardless - of how the manager got configured that way. - (Vishnu.loadComponentConfigurationXML): Don't hold onto the - configuration object, it's unnecessary. - - * flumotion/common/fxml.py (sxml2unicode, SXML): Code to write - XML as s-expressions. See exportPlanetXml for a use example. - - * flumotion/common/config.py (CURRENT_VERSION): Remove duplicate - and incorrect definition; the real one is later in the file. - (BaseConfigParser.export): Removed, no longer used. - (exportPlanetXml): New function, takes a planet state and makes - XML out of it. Nifty, and somewhat evil. - -2007-11-19 Johan Dahlin - - * flumotion/wizard/wizard.py: - Reorganize, group the methods by their type. Remove unused - API. - -2007-11-19 Johan Dahlin - - * data/glade/wizard_tvcard.glade: - * flumotion/wizard/steps.py: - Unbreak the non-testsource video producers. - Fix two typos. - (FireWireAudioStep): Move down _get_width_height to have a similar - order to the firewire video step. *args -> checkbutton - -2007-11-19 Johan Dahlin - - * flumotion/wizard/steps.py: - Store instance variables in the instances instead of in classes, - really. Also mark them as private. - (VideoEncoderStep.__init__): Re-order the video/audio steps - Add section comments and group the methods by their type. - Mark a few more methods as private - -2007-11-19 Johan Dahlin - - * flumotion/wizard/steps.py (ConsumptionStep.activated): improve - comment - (ConsumptionStep.get_next): Refactor a bit and sort out my - misunderstanding of the audio/video only code paths. - Add comments explaining what's going on here, since it's non-obvious - at a first glance. - -2007-11-16 Johan Dahlin - - * flumotion/wizard/Makefile.am (flumotion_PYTHON): - * flumotion/test/Makefile.am: (EXTRA_DIST): - Update these, add the new files in the repo. - - * data/glade/wizard_encoding.glade: Remove parts which are going to - be overwritten in runtime - * data/glade/wizard_testsource.glade: Connect to two more signals - * flumotion/test/test_wizard_models.py: - * flumotion/wizard/models.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - First step of MVC migration of the wizard. - Add a Flow and Component model, start using them - in parts of the wizard, but don't use them to do much interesting. - - Make some of the indivudal steps create the upcoming step instead of just - returning the name, this allows us to pass the model on to the next step. - -2007-11-16 Johan Dahlin - - * data/glade/wizard_consumption.glade: Set the audio/video only - sub checkbuttons to true by default - - * flumotion/wizard/steps.py: - Remove unused imports, refactor method order in the overlay step, - make a few methods private. Make sure that all audio sources inherit - from the audio source step. - (ProductionStep.get_next): Remove duplicated get_next() - - * flumotion/wizard/wizard.py (BasicScenario.__init__): - Rename all step classes to end with Step - - * flumotion/wizard/wizard.py (BasicScenario.__init__): Allow us to - return a WizardStep instance instead of a string in get_next() - methods. - - * flumotion/ui/fgtk.py (FCheckButton): Remove the __nonzero__ - hack. - - * data/glade/admin.glade: center the window when displaying it - for the first time. - -2007-11-15 Johan Dahlin - - * flumotion/wizard/steps.py (Consumption.activated, - Consumption.get_next): Continue refactoring, avoids plenty - of duplication here - (Production.verify): Revert the hasattr change - -2007-11-15 Michael Smith - - * flumotion/admin/gtk/parts.py: - Remove CPU column, since we no longer have CPU in the jobState, and - we're going to show this in the component tab soon. - -2007-11-14 Andy Wingo - - * flumotion/manager/manager.py (Vishnu.unregisterComponent): - * flumotion/component/component.py (BaseComponent.init) - (BaseComponent.do_stop, BaseComponent._pollCPU): Add CPU to the - uistate. - - * flumotion/admin/gtk/parts.py - (ComponentsView._add_columns.type_cpu_datafunc): Hack around CPU - usage being absent. - - * flumotion/common/planet.py (_jobStateKeys, WorkerJobState) - (ManagerComponentState): - * flumotion/test/test_manager_manager.py - (FakeComponentMind.__init__): Remove cpu from the jobstate. - -2007-11-14 Johan Dahlin - - * flumotion/common/python.py: - Attempt to fix pychecker. - (sorted): Okay, slice the first two items, <= doesn't work, - only < and >. - (any): Try to use getattr to get around pychecker being too smart. - (any): Use try/except technique, disable shadowing of builtins - (sorted): Revert to earlier attempt, disable __pychecker__ - -2007-11-14 Andy Wingo - - * flumotion/component/component.py - (BaseComponentMedium.remote_getConfig): With trunk, components - always have their config, no need for special cases. - (BaseComponent.__init__): Remove obsolete comment from Feb 05. - (BaseComponent.init, BaseComponent._pollCPU): Move the CPU poller - to be a common.Poller. - -2007-11-14 Johan Dahlin - - * flumotion/wizard/steps.py: - * flumotion/common/Makefile.am (flumotion_PYTHON): - * flumotion/common/python.py: New file, forward compatibility with - python 2.4 and 2.5. - - * flumotion/wizard/steps.py (Consumption): More __nonzero__ cleanups, - (Consumption.activated): Simplify logic and use the any() concept - from python 2.5 - - * data/glade/wizard_consumption.glade: Connect all shout checkbuttons - to the signal, just as for disk/http. - - * flumotion/wizard/steps.py (Production): Clean up the production step - a little, avoid some code duplication and depending on __nonzero__. - -2007-11-14 Andy Wingo - - * flumotion/admin/multi.py (MultiAdminModel.addManager): - * flumotion/admin/admin.py (AdminModel.__init__) - (AdminModel.connectToManager, AdminModel.setRemoteReference): Add - keyword argument to addManager/connnectToManager to control - generation of the connection XML cache file. - - * flumotion/test/test_admin_admin.py - (AdminTest.testConnectSuccess) - (AdminTest.testReconnect, AdminTest.testConnectFailure): - * flumotion/test/test_admin_multi.py - (MultiAdminTest.testConnectSuccess) - (MultiAdminTest.testConnectFailure) - (MultiAdminTest.testReconnect): Don't record manager connection - details when connecting to test managers. Fixes tests adding to - the recent connections box in the admin UI. - - * flumotion/manager/worker.py: Comments from 2004 la la la - (WorkerHeaven.__init__): Remove unused instance var. - (WorkerHeaven.workerAttached, WorkerHeaven.workerDetached): - Prettify logging. - - * flumotion/admin/admin.py (AdminModel.__init__) - (AdminModel.setRemoteReference.gotWorkerHeavenState) - (AdminModel.setRemoteReference.remoteDisconnected) - (AdminModel.isConnected): Store the connected state as a bool - rather than a string. Praisebejesus. - (AdminModel._callRemoteCallback, AdminModel._callRemoteErrback): - Remove logging callbacks, unnecessary now that our base medium - class does this for us. - (AdminModel.workerCallRemote, AdminModel.componentCallRemote): - Remove some unnecessary debug. - (AdminClientFactory.gotDeferredLogin.error): More specific log - here. - (AdminModel._defaultErrback): Removed; this was always used after - a remote call, which now logs exceptions via the BaseMedium - callRemote logging infrastructure. - (AdminModel.reload, AdminModel.reloadManager) - (AdminModel.reloadComponent, AdminModel.checkElements) - (AdminModel.checkImport): Remove _defaultErrback usage. - - * flumotion/test/test_manager_admin.py (TestAdminAvatar): Rewrite - test to use real objects, and no useless functions. - - * flumotion/admin/admin.py (AdminModel): Remove IStateListener - implementation, we do not use this any more. - (AdminModel.get_components, AdminModel.getComponents): Remove - function without callers. - (AdminModel._setWorkerHeavenState): Remove function without - callers. - - * flumotion/manager/base.py (ManagerAvatar.hasRemoteReference): - Remove unused method, there for a case that cannot exist. - - * flumotion/manager/manager.py (Vishnu._componentStopWithAvatar): - Call methods on the componentAvatar, not callRemote directly. - - * flumotion/manager/component.py (ComponentAvatar.stop): Remove - silliness. - - * flumotion/admin/multi.py (MultiAdminModel.removeManager) - (MultiAdminModel._managerConnected): Fix removing a manager to - which we connected one or more times, but is disconnected now. - Case (4) in the comment. - -2007-11-14 Johan Dahlin - - * flumotion/test/Makefile.am (EXTRA_DIST): Add test_public_ui_api.py - * flumotion/test/test_public_ui_api.py (TestPublicUI): - New test to check our public API UI API - -2007-11-14 Andy Wingo - - * flumotion/manager/manager.py (Vishnu.unregisterComponent): No - need to muck with the component state here, planet.py does - everything we need. - - * flumotion/common/planet.py (ManagerComponentState.set): If we - are setting the mood to a value equal to the moodPending, clear - moodPending. Restores previous behaviour. - -2007-11-13 Johan Dahlin - - * flumotion/ui/trayicon.py (FluTrayIcon): - * flumotion/admin/gtk/client.py (Window): - Refactor trayicon integration, avoid poking at private client functions, - emit a signal to tell the window that we want to quit instead. - - * flumotion/admin/gtk/connections.py (Connections): fix one more range - I forgot last time. - -2007-11-13 Michael Smith - - * flumotion/component/feedcomponent010.py: - Pass the gst.Message on to have_error, which expects a message, not a - string. - -2007-11-13 Michael Smith - - * flumotion/common/gstreamer.py: - Wingo doesn't like punctuation. Add more punctuation to make this into a - tuple instead of a call. - -2007-11-13 Andy Wingo - - * flumotion/manager/component.py (FeedMap.componentDetached): Fix - my premature optimization. DAMN YOU DONALD KNUTH - - * flumotion/manager/admin.py (AdminAvatar.sendLog) - (AdminAvatar.getComponentStates, AdminHeaven.avatarsCallRemote) - (AdminHeaven.__init__): Remove more unused code. - -2007-11-13 Johan Dahlin - - * bin/flumotion-debug: Add a new script which - makes it easier to debug a manager. So far only a vishnu - and admin avatar are exposed. - - * flumotion/admin/gtk/componentview.py: - * flumotion/admin/gtk/parts.py: - * flumotion/common/keycards.py: - * flumotion/common/messages.py: - * flumotion/tester/client.py: - * flumotion/ui/fgtk.py: - use range() for enums - -2007-11-13 Andy Wingo - - * flumotion/manager/admin.py (AdminAvatar.perspective_shutdown): - Remove some poorly-considered, uncalled code from July 2004. - - * flumotion/admin/admin.py (AdminModel.setProperty) - (AdminModel.getProperty): - * flumotion/admin/text/admin_text.py - (BaseAdminText.setElementProperty) - (BaseAdminText.propertyErrback) - (BaseAdminText.getElementProperty): - * flumotion/manager/component.py - (ComponentAvatar.setElementProperty) - (ComponentAvatar.getElementProperty): - * flumotion/component/feedcomponent.py - (FeedComponentMedium.remote_setElementProperty) - (FeedComponentMedium.remote_getElementProperty): - * flumotion/component/base/admin_gtk.py - (BaseAdminGtk.propertyErrback, BaseAdminGtk.setElementProperty) - (BaseAdminGtk.getElementProperty) - (BaseAdminGtkNode.getElementProperty) - (BaseAdminGtkNode.setElementProperty) - (BaseAdminGtkNode.propertyErrback): - * flumotion/component/base/admin_text.py - (BaseAdminText.propertyErrback, BaseAdminText.setElementProperty) - (BaseAdminText.getElementProperty): Remove getElementProperty / - setElementProperty interfaces; users of the former should use - uiStates, and users of the latter should use custom interfaces. - - * flumotion/component/producers/videotest/admin_gtk.py - (PatternNode.cb_pattern_changed): - * flumotion/component/producers/videotest/admin_text.py - (VideoTestAdminText.runCommand): - * flumotion/component/producers/videotest/videotest.py - (VideoTestMedium, VideoTestMedium.remote_setPattern): Rework to - use a custom interface rather than getElementProperty and - setElementProperty. - - * flumotion/manager/component.py: Remove a comment bitrotten since - December 2004. - (ComponentAvatar.removeKeycardId) - (ComponentAvatar.expireKeycard): Remove redundant debug. - - * flumotion/component/base/admin_gtk.py - (BaseAdminGtk.propertyChanged): - * flumotion/component/base/admin_text.py - (BaseAdminText.propertyChanged): - * flumotion/admin/text/admin_text.py - (BaseAdminText.propertyChanged): Removed unused interface. - - * flumotion/component/bouncers/admin_gtk.py - (KeycardsNode.propertyChanged): Removed, a vestigial - copy-and-pasteo. - -2007-11-13 Johan Dahlin - - * flumotion/admin/gtk/main.py (main): - * flumotion/admin/gtk/client.py (Window.setAdminModel): - Add setAdminModel as public API. - Call the constructor before connecting and setAdminModel - when connected, this makes it less painful to debug errors - in the admin client happening at the startup. - - * data/glade/admin.glade: - * flumotion/admin/gtk/client.py: - Move over to using GtkUIManager, which has proper UI merging - (used by recent connections) and proper stock icon support, - and actions which makes it easier to set state on more than - one item (menu, toolbar) - -2007-11-13 Andy Wingo - - * flumotion/manager/component.py (ComponentAvatar.__init__) - (ComponentAvatar.addMoodListener, ComponentAvatar.stateSet): - Remove happydefer code, as it's unused. Remove mood logger, it - was leaky and the code is now in planet.py. - (ComponentAvatar.__repr__, ComponentAvatar.makeComponentState): - Move around. - (ComponentAvatar.upgradeConfig): Nationalize. - (ComponentAvatar.onShutdown): Move some logic to planet.py. - (FeedMap.getFeederAvatar): Log feed choices only for virtual - feeds. - (ComponentHeaven.componentDetached): Don't reconnect components if - we are shutting down. - - * flumotion/manager/manager.py (Vishnu.__init__.setStopped): - Manager a self.running attribute, False when we are shutting down. - - * flumotion/common/planet.py (ManagerComponentState.set): Log mood - changes here; removes the need for extra StateCache listeners in - other places. - (ManagerComponentState.setMood): Don't do anything if the mood is - the same. Add more debugging. - (ManagerComponentState.clearJobState): Add more logic from - manager/component.py, clearing out any messages proxied from the - job state, and setting the mood to sleeping or lost, depending on - whether the logout was forseen or not. - -2007-11-13 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Use maybeDeferred properly. Not sure how this worked previously. - * flumotion/component/misc/httpfile/httpfile.py: - Add remote expireKeycard method (as in httpstreamer), so that explicit - keycard expiry will cause client disconnection as intended. - - Implement waiting for clients to disconnect and loggers to complete - logging on shutdown, so we log properly on shutdown. - -2007-11-13 Johan Dahlin - - * flumotion/admin/gtk/client.py: - Continue to refactor all the code in the callbacks - to separate methods, to have a clear separation - between internal api and callbacks used by the ui. - -2007-11-13 Andy Wingo - - * flumotion/manager/component.py (ComponentAvatar.__init__) - (ComponentAvatar.onShutdown, ComponentAvatar.onShutdown): Remove - some unused code. - -2007-11-13 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/main.py: - * flumotion/ui/icons.py: - - Register the window and stock icons, move it to a function - to avoid relying on import side effects. - -2007-11-13 Andy Wingo - - * flumotion/manager/component.py (FeedMap.__init__) - (FeedMap.componentAttached, FeedMap.componentDetached): Maintain - an ordered list of avatars. - (FeedMap._recalc): If multiple components supply a feed, prefer - the one that has been logged in longer. - -2007-11-13 Johan Dahlin - - * flumotion/admin/gtk/client.py: - (Window._admin_connected_cb): Use consistent naming and - put private callLater callbacks in nested scopes - - * flumotion/admin/gtk/parts.py: - * flumotion/test/test_parts.py: - * tests/ComponentsView.py: - Rename the ComponentsView signal has-selection to selection-changed, - which better reflects the arguments given. - -2007-11-12 Johan Dahlin - - * flumotion/admin/gtk/client.py: - Reorder methods, rename to gtk-style namings, mark methods and attributes - as private, fix imports etc. - -2007-11-12 Andy Wingo - - * flumotion/component/misc/porter/porter.py (PorterAvatar.logout) - (PorterRealm.requestAvatar): More debugging. - - * conf/managers/default/flows/porter.xml: Add http-server to the - mix. - - * flumotion/component/misc/httpfile/httpfile.py - (HTTPFileStreamer.do_setup): Pass a valid remote referenceable - object when we start to log in. Fixes problem where the porter - thinks we logged out. - -2007-11-12 Johan Dahlin - - * common/epydoc.mk (EPYDOC_ARGS): Remove the --ignore-mismatch-parameter - argument which is not present in epydoc 3.0, fixes #783 - - * flumotion/common/Makefile.am (flumotion_PYTHON): - * flumotion/test/Makefile.am (flumotion_PYTHON): - Update, remove removed, add added. - - * flumotion/common/testsuite.py (TestCase): Add a assertFailure - alias for failUnlessFailure - - * flumotion/commmon/test_*.py: Use testsuite.TestCase, fix imports - to be pep-8 compatible, get rid of sibling imports, remove unused - imports. This replaces two old CompatTestCases. - - * flumotion/common/testsuite.py (TestCase): New class with backwards - compatibility API for twisted 2.0.x - - * flumotion/test/__init__.py: New file, move everything from f.t.common - here - - * flumotion/common/testsuite.py: New file with a TestCase and the - old parts of f.t.testclasses. - -2007-11-12 Andy Wingo - - * flumotion/manager/component.py - (ComponentAvatar.makeComponentState.verifyExistingComponentState): - Fix debug line. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.remove_all_clients): Fix in the case that we - never went happy. - - * conf/managers/default/failover.xml: New file, demonstrates - failover. - - * flumotion/manager/component.py (ComponentAvatar.getVirtualFeeds) - (FeedMap._recalc): Fix. - - * flumotion/component/base/admin_gtk.py - (BaseAdminGtk.gettext_domain): Set to None instead of 'flumotion' - so that we hit the non-translated codepath; otherwise some kind of - error makes us not add the feeders and eaters tabs. - (BaseAdminGtk.setup.fetchTranslations): Assume that gettext_domain - is there, an interface that checks for an attr is pretty bad. - Instead check if it is None. - -2007-11-12 Michael Smith - - * flumotion/component/plugs/loggers.py: - Logger plug can now optionally return a deferred from event handlers. - - * flumotion/component/consumers/httpstreamer/resources.py: - Use maybeDeferred() on logger plug return; move firing disconnect - deferreds to after logging successfully completes. - -2007-11-12 Johan Dahlin - - * flumotion/wizard/steps.py (Webcam.run_checks): Reverse the list of - resolution so we get the largest one first instead of last. - (FireWire.run_checks): Make it work on 2.3. Use a nicer api to append - data to the tree model. - -2007-11-09 Johan Dahlin - - * flumotion/test/test_component_playlist.py: assertTrue -> failUnless - -2007-11-09 Michael Smith - - * flumotion/component/base/admin_gtk.py: - Rename a variable that was shadowing an import that we were then trying - to use. - * flumotion/component/effects/volume/volume.py: - If we have an invalid value in the list, change the value in the list - rather than in a local variable that we then discard. Fixes #792. - * flumotion/component/producers/soundcard/soundcard.py: - Update for component API changes. - -2007-11-08 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Add removeAllClients() method; returns a deferred firing once all - clients have been removed successfully. - * flumotion/component/consumers/httpstreamer/http.py: - Remove all clients on stop, don't continue shutdown until removal is - complete. - -2007-11-08 Johan Dahlin - - * flumotion/component/base/admin_gtk.py (BaseAdminGtkNode.render): - Unbreak the flumotion-template test. - (BaseAdminGtk): Set gettext_domain to silent pychecker. - -2007-11-08 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - Add a debug line. - * flumotion/component/base/admin_gtk.py: - Clean up previous error messages about rendering. - -2007-11-08 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py (BaseAdminGtkNode.error, - BaseAdminGtkNode.haveWtree, BaseAdminGtkNode.loadGladeFileErrback, - BaseAdminGtkNode.renderFinished, - BaseAdminGtkNode.renderFinishedErrback, BaseAdminGtkNode.addMessage): - This should teach me to fix code being refactored. - Handle errors in component UI code better. - Don't put anything in the UI (except for debug info) that is - not translated. - Put error messages in the message area where they belong, and add - a method for it to do it consistently. - -2007-11-07 Johan Dahlin - - * flumotion/admin/gtk/client.py (Window.help_about_cb): - * flumotion/admin/gtk/dialogs.py: - Move over AboutDialog to dialogs. - - * flumotion/admin/gtk/client.py (Window.debug_reload_all_cb): - Refactor, use consistent naming for call/errbacks, use variables - from the parent nested scopes to avoid sending them as arguments - to all callbacks. - - * flumotion/test/test_options.py: - Use the new log settings APIs and renable commented out tests. - -2007-11-07 Andy Wingo - - * flumotion/manager/component.py (FeedMap.__init__) - (FeedMap.componentAttached, FeedMap.componentDetached) - (FeedMap.getFeederAvatar, FeedMap._recalc): Add a new dataset, - virtualfeeddeps, which is the set of components that should be - reconnected when one virtual feed provider logs out. As a separate - change, treat virtualFeeds purely as a cache -- don't manage it in - attached()/detached(). - (FeedMap.getEatersForFeeders): Make documentation match intent. - (FeedMap.__init__, FeedMap.componentDetached) - (FeedMap.getFeederAvatar, FeedMap._recalc): s/virtual//, we manage - all feeds generically now. Yay. - -2007-11-07 Andy Wingo - - * flumotion/manager/component.py (dictlist): New class, a dict of - nonempty lists. - (FeedMap.__init__, FeedMap.componentAttached) - (FeedMap.componentDetached, FeedMap._recalc) - (FeedMap.getEatersForFeeders): Use dictlists for virtualFeeds, - simplifying code, and for eatersForFeeders, which was erroneously - assuming one eater per feeder before. Oops. - - * flumotion/manager/component.py - (ComponentAvatar.getVirtualFeeds): Return a dict more similar to - the return of getFeedersForEaters. - (FeedMap.__init__, FeedMap.componentAttached) - (FeedMap.componentDetached): Manage a dict of virtual feeds. - (FeedMap.getFeederAvatar): If there is no component with a given - feed name, check to see if someone is offering a virtual feed. - - * flumotion/admin/gtk/componentview.py - (ComponentView.logCategory): Satisfy the swedish mafia. - - * flumotion/admin/multi.py (MultiAdminModel.removeManager): Avoid - disconnecting from signals twice. - - * flumotion/manager/component.py (FeedMap.__init__) - (FeedMap.componentAttached, FeedMap.componentDetached) - (FeedMap._recalc, FeedMap.getFeedersForEaters) - (FeedMap.getEatersForFeeders): Maintain a cache of eater-feeder - mappings, invalidated when components log in or out, keyed by full - feed ID. Recalculate the cache in a single O(N) pass. Don't add - mappings for feeders that are not present. - (ComponentHeaven._connectEatersAndFeeders): No need to deal with - the feeder-not-present case. - -2007-11-07 Johan Dahlin - - * flumotion/test/test_options.py (TestOptions): Make sure to turn - all logging of after running the OptionParser tests. - Also remove a whole copy of the file. - (TestOptions.testParser): Disable the logging tests until we - can restore the logging options set before we modify them. - -2007-11-07 Andy Wingo - - * flumotion/manager/component.py (ComponentAvatar.getWorker): - Remove, there was already getWorkerName. - (ComponentHeaven.feedServerAvailable): Fix crack. - (FeedMap): Factor getEatersForFeeders and getFeedersForEaters into - a separate object -- will allow some memoization opportunities. - (ComponentHeaven.__init__): - (ComponentHeaven._connectEatersAndFeeders): Make and use the - feedMap. - (ComponentAvatar.onShutdown): Notify the heaven on logout so that - it can e.g. reconnect other components that eat from virtual - feeds. - (ComponentHeaven.componentAttached): Take the avatar directly. - Change some warnings into asserts. - (ComponentHeaven.componentDetached): New function. Notify the feed - map, and reconnect any components that need to be reconnected. - -2007-11-07 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Import fcntl in global scope as well. There's no reason to do this - locally, and it's somewhat of a hot path (client connection). - -2007-11-07 Johan Dahlin - - * flumotion/common/common.py: - * flumotion/common/config.py: - Avoid importing locale in a non-global scope, should help us - avoid some locking. Also only modify LC_NUMERIC on 2.3 since - PEP 331 went into 2.4. - -2007-11-07 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Throttle uiState updates in the streamer. - -2007-11-07 Andy Wingo - - * flumotion/manager/component.py (ComponentAvatar.getWorker) - (ComponentAvatar.getClockMaster): New accessors. - (ComponentAvatar.perspective_removeKeycardId) - (ComponentAvatar.perspective_expireKeycard): Simplify. - (ComponentHeaven.feedServerAvailable) - (ComponentHeaven._setupClocking): Use accessors. - (ComponentHeaven.masterClockAvailable): Remove check for detached - component. - (ComponentHeaven.feedServerAvailable): Fix broken refactor. - - * flumotion/test/Makefile.am: - * flumotion/test/test_manager_depgraph.py: Remove. - - * flumotion/manager/depgraph.py: Removed, no more users. Add back - when we decide that we need more complexity? - - * flumotion/manager/component.py (ComponentHeaven.mapNetFeed): Fix - poor implementation of the last changeset; allow a None toPort to - just fall through. - (ComponentHeaven._getFeedersForEaters) - (ComponentHeaven._getFeederAvatar): Factor out the process of - mapping a feedId to an avatar/feedName pair into another method. - - * flumotion/manager/component.py (ComponentHeaven.mapNetFeed): - Instead of raising TryAgain on failure, debug and return None, - None. - (ComponentHeaven._connectEatersAndFeeders.connect): Handle a - mapNetFeed failure with a nice debug statement. - (ComponentHeaven._connectEatersAndFeeders): Remove TryAgain foo. - - * flumotion/manager/component.py - (ComponentHeaven._getFeedersForEaters) - (ComponentHeaven._getEatersForFeeders) - (ComponentHeaven._connectEatersAndFeeders): It's not possible to - have what we used to call a "detached avatar", due to the ordering - in the cleanup() function in Vishnu.requestAvatar(), so remove - those code paths. Note that getEatersForFeeders is suboptimal. - -2007-11-06 Andy Wingo - - * flumotion/manager/component.py - (ComponentHeaven._connectEatersAndFeeders): Coalesce - _connectEaters, _connectEaterUpstream, _connectFeeders, and - _connectFeederDownstream into this one laconism. - (ComponentHeaven.mapNetFeed): "Implement" a network map. - (ComponentHeaven._getFeedersForEaters) - (ComponentHeaven._getEatersForFeeders): Return more info. - (ComponentHeaven.componentAttached): Adapt to call - _connectEatersAndFeeders. - (ComponentHeaven.masterClockAvailable): Prevent endless loops. - (ComponentHeaven._componentIsLocal): - (ComponentHeaven.getComponentAvatarForState): Removed, no callers. - (TryAgain): An exception for local use. - (ComponentAvatar.feedTo, ComponentAvatar.eatFrom): More debug. - (ComponentAvatar.getFullFeedId): New function. - (ComponentAvatar.provideMasterClock): Call masterClockAvailable in - the case where the clock has already been provided, it's just a - component logging in again. - (ComponentAvatar.onShutdown): Fold the mood functions in here, - they are not public and may only be called in certain - circumstances. - - * flumotion/manager/manager.py (Vishnu.workerAttached): Unhappily, - the worker is not in the avatars dict at this point, so - callLater(0) on a function that requires it to be there. Boo. - Maybe fix later. - - * flumotion/manager/component.py - (ComponentHeaven._getEatersForFeeders) - (ComponentHeaven._getFeedersForEaters): Moved here, off of the - component avatar. - (ComponentHeaven._connectEaters) - (ComponentHeaven._connectFeeders): Use the new functions. - - * flumotion/manager/component.py (ComponentAvatar.getFeedId): New - function. - (ComponentAvatar.getEatersForFeeders) - (ComponentHeaven._connectEaters) - (ComponentHeaven._connectFeeders): Use new function. - - * flumotion/test/test_manager_manager.py: Update calls to - loadComponent for the virtualFeeds argument. - - * flumotion/manager/component.py (ComponentAvatar.getEaters) - (ComponentAvatar.getFeeders, ComponentAvatar.getVirtualFeeds): New - accessors. - (ComponentAvatar.getFeedersForEaters) - (ComponentAvatar.getEatersForFeeders): Use accessors. - - * flumotion/common/config.py (buildVirtualFeeds): - * flumotion/test/test_config.py (TestConfig.testVirtualFeeds): - Expect a feedId, not a fullFeedId, like in the eaters dict. - - * flumotion/common/common.py (parseFeedId): Assert that we do not - have a fullFeedId. - - * flumotion/manager/manager.py (Vishnu.__pychecker__): Pacify - pychecker. - - * flumotion/common/config.py (ConfigEntryComponent._buildConfig): - Fix bug when virtualFeeds is not specified. - - * flumotion/manager/admin.py - (AdminAvatar.perspective_loadComponent): - * flumotion/manager/manager.py (Vishnu.loadComponent): Add virtual - feeds support to loadComponent(). - -2007-11-06 Andy Wingo - - Add concept of "virtual feeds" to component configuration; a - component can provide a number of "virtual feeds", which in the - future will be used by the manager to provide failover between - separate components. - - * flumotion/common/config.py (buildVirtualFeeds): New helper - procedure. - (ConfigEntryComponent.__pychecker__): Muahahahahahaha - (ConfigEntryComponent.__init__): Take optional thirteenth - argument, virtualFeeds. - (ConfigEntryComponent._buildConfig): Set conf['virtual-feeds']. - (BaseConfigParser.parseComponent) - (BaseConfigParser._parseVirtualFeed): Parse virtual feeds out of - configuration. - - * flumotion/test/test_config.py (TestConfig.testVirtualFeeds): New - test. - -2007-11-05 Andy Wingo - - * flumotion/manager/component.py: - * flumotion/manager/worker.py: - * flumotion/worker/feedserver.py: Remove unneeded import. - - * flumotion/job/job.py (JobClientFactory.login): - * flumotion/manager/manager.py (Vishnu.deleteFlow): Adeu, - generator. - -2007-11-05 Johan Dahlin - - * flumotion/job/main.py (main): Remove --version here, - it's already added by the common optparse options. - -2007-11-05 Johan Dahlin - - * flumotion/admin/command/main.py: - * flumotion/admin/gtk/main.py: - * flumotion/admin/rrdmon/main.py: - * flumotion/admin/text/main.py: - * flumotion/common/options.py: - * flumotion/job/main.py: - * flumotion/launch/inspect.py: - * flumotion/launch/main.py: - * flumotion/manager/main.py: - * flumotion/service/main.py: - * flumotion/test/test_options.py: - * flumotion/worker/main.py: - * misc/pycheckerrc: - Refactor command-line parsing to use a base class which - provides the common options and optinally uses GOption if - we use a sufficiently new pygobject. - Ignore optparse in pychecker since we're not interested in bugs - in the standard library. - -2007-11-05 Andy Wingo - - * flumotion/component/base/admin_gtk.py: Exorcise defer_generator - from another file. - -2007-11-05 Johan Dahlin - - * flumotion/common/options.py: Don't assume gobject.pygobject_version - is present, fixes build on FC5. - -2007-11-05 Andy Wingo - - * flumotion/admin/admin.py - (AdminClientFactory.gotDeferredLogin.error) - (AdminModel.connectToManager.connection_error): Fix for - refactoring. - - * flumotion/admin/text/view.py (AdminTextView.getEntry): Move here - from admin.py:AdminModel, and make not a defgen. - - * flumotion/admin/admin.py - (AdminClientFactory.gotDeferredLogin.error): Simplify to not be a - defer generator. See #385. - (AdminModel.getEntry): Removed this defgen, it has no more - callers. componentview.py has what should be done. - (AdminModel.reload_async): Refactor to not be a defgen; still - krappy. - - * flumotion/admin/gtk/componentview.py: Remove unneeded import. - -2007-11-05 Johan Dahlin - - * flumotion/ui/fgtk.py (FVUMeter.do_realize): Fix inconsistent tabbing - found by reindent.py - - * flumotion/common/Makefile.am: Remove accidentally commited changes - -2007-11-05 Michael Smith - - * flumotion/common/netutils.py: - Document two methods in the routing table class. - -2007-11-05 Johan Dahlin - - * all python files in the tree: run reindent.py, fixes #789 - -2007-11-05 Andy Wingo - - * flumotion/common/medium.py (BaseMedium.runBundledFunction) - (BaseMedium.getBundledFunction): Refactor to not be defer - generators. See #385. - - * flumotion/manager/manager.py (Vishnu._componentStopNoAvatar) - (Vishnu._componentStopWithAvatar, Vishnu.componentStop): Split the - ballooning componentStop function into parts. Only set lost - components to sleeping if the worker does not detect a running job - with that PID. Fixes #787. - - * flumotion/test/test_component_bouncers_component.py - (TrivialBouncerTest.setKeycardExpireInterval): Fondle the bouncer - better. - - * flumotion/component/bouncers/plug.py (BouncerPlug): Fix up to - use a Poller instead of rolling our own timeouts, like in - bouncer.py. - - * flumotion/component/bouncers/bouncer.py (Bouncer): Expire - keycards every 2 minutes instead of every 60. Makes memory usage - more stable. - (Bouncer.init, Bouncer.setEnabled, Bouncer._expire) - (Bouncer.authenticate, Bouncer.addKeycard, Bouncer.removeKeycard) - (Bouncer.expireKeycardId): Use a Poller instead of rolling our - own. - (Bouncer.expireKeycardId): Remove the keycard properly, which - takes care of the keycardData / uiState structures, preventing - memleaks. Fixes #723. Already fixed in the bouncer plug code. - - * flumotion/test/bouncertest.py - (TrivialBouncerTest.setKeycardExpireInterval): Use private API to - set the expirer timeout. Hacky, but hey. - -2007-11-02 Johan Dahlin - - * flumotion/admin/gtk/dialogs.py (PropertyChangeDialog): Use show() - on all individual items instead of show_all() once. - - * flumotion/component/effects/volume/volume.glade: Change the - shortcut for changing the volume from C to V, C is already used - by the Connection menu in the admin interface. - -2007-11-01 Johan Dahlin - - * data/glade/authenticate.glade: - * data/glade/connections.glade: - * data/glade/greeter-authenticate.glade: - * data/glade/greeter-initial.glade: - * data/glade/greeter-load_connection.glade: - * data/glade/greeter-start_new.glade: - Set visible to False by default, to avoid flashing - windows when starting up the admin interface the first time. - Fixes #784. - -2007-11-01 Johan Dahlin - - * flumotion/component/base/admin_gtk.py (BaseAdminGtkNode.render): - Remove trailing whitespace and prefix all error messages in the render - method with render. - -2007-11-01 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - Respect the 80 character punch card limit more. - -2007-10-31 Andy Wingo - - * flumotion/component/padmonitor.py (EaterPadMonitor.__init__) - (EaterPadMonitor.setInactive, EaterPadMonitor.setActive) - (EaterPadMonitor.detach): When the eater monitor is inactive, - periodically reconnect using another poller. Fixes bug whereby the - monitor would only attempt to reconnect once. - - * flumotion/manager/component.py - (ComponentAvatar.perspective_reservePortsOnWorker): Removed, it - had no callers. Fixes #745. - - * flumotion/component/component.py - (BaseComponentMedium.remote_callMethod): Removed, it had no - callers, and the correct way is to make the component have a - medium that defines the appropriate remote_* method. - -2007-10-30 Andy Wingo - - * flumotion/component/padmonitor.py (PadMonitor): Refactor to use - the Poller. Incidentally fixes #788, and a bug whereby downstream - components would not attempt to reconnect to a missing upstream - component. - (PadMonitor.detach): Fix. Yay previously-written test suites! - - * flumotion/component/feedcomponent010.py - (FeedComponent.eatFromFD): No need to try to start the pipeline if - it was already started. - - * flumotion/common/common.py (Poller): New class, abstracts the - process of a periodically calling a procedure. - -2007-10-29 Andy Wingo - - * flumotion/component/feedcomponent010.py - (FeedComponent.do_setup): try_start_pipeline, not start_pipeline; - we can't set the pipeline to PLAYING if it has eaters for which we - have not set fd's. Fixes #782. - (FeedComponent.install_eater_event_probes): Moved around. - (FeedComponent._setup_pipeline): Add pad monitors and event probes - here, before we set the pipeline to PLAYING. - (FeedComponent.set_master_clock): try_start_pipeline. - (FeedComponent.try_start_pipeline): Renamed from start_pipeline. - The eater probes and pad monitors were moved to _setup_pipeline; - this function only sets the pipeline to PLAYING if the necessary - conditions are fulfilled. - (FeedComponent.eatFromFD): Call try_start_pipeline(); with the new - code, pipelines don't go to PLAYING until all of their eaters are - connected. - - * flumotion/component/eater.py (Eater.__init__): Add an fd - attribute, which is None if the eater is disconnected. - (Eater.connected): Set the uiState and fd directly, because - connected() is only called from the reactor thread. - (Eater.disconnected.updateUIState): Null out the fd attribute as - well. - - * flumotion/component/base/admin_gtk.py - (FeedersAdminGtkNode.setUIState): Fix appearance of feeders tab - when initially selected. - - * flumotion/component/base/feeders.glade: - * flumotion/component/base/admin_gtk.py: - (FeedersAdminGtkNode.setFeederClientName) - (FeedersAdminGtkNode.haveWidgetTree): Hacks to allow the feeder - and eater names to be present at one time. Fixes #540. - -2007-10-29 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - Revert the generic ComponentAdminGtkNode bit that's not done yet. - -2007-10-29 Andy Wingo - - * flumotion/manager/component.py: Remove unneeded import. - - * flumotion/common/bundleclient.py: Import things more normally, - now that we don't need to fake out pychecker. - (BundleLoader.getBundles): Not a defer generator. Don't call - getBundleZips on an empty set of bundles. Fix some format string - problems. - (BundleLoader.loadModule, BundleLoader.getBundleByName) - (BundleLoader.getFile): Similar de-generatorification. - - * flumotion/manager/component.py (ComponentAvatar.setElementProperty) - (ComponentAvatar.getElementProperty) - (ComponentAvatar.reloadComponent, ComponentAvatar.authenticate) - (ComponentAvatar.removeKeycardId, ComponentAvatar.expireKeycard): - Remove references to _mindErrback, which is unnecessary because it - is handled by mindCallRemote. Fixes #775. - -2007-10-28 Thomas Vander Stichele - - * flumotion/admin/gtk/componentview.py: - * flumotion/component/base/admin_gtk.py: - Fix translation breakage from [5166] - * flumotion/component/base/eaters.glade: - * po/POTFILES.in: - Add this file, and use colons like we do in other glade files. - * configure.ac: - Down boy down. - -2007-10-26 Michael Smith - - * flumotion/component/component.py: - Add some comments, move some code from stop() to do_stop(), where it - makes more sense. - * flumotion/component/feedcomponent010.py: - Add a debug line. - -2007-10-24 Michael Smith - - * flumotion/common/errors.py: - New exception for a cancelled operation. - * flumotion/test/test_defer.py: - Tests for new class. - * flumotion/twisted/defer.py: - New class for a exponentially-backing-off retriable deferred. - -2007-10-17 Michael Smith - - * flumotion/test/test_component_playlist.py: - Add a better test for the bug in the playlist fixed yesterday; the - test that caught it mostly did so by accident. - -2007-10-16 Michael Smith - - * flumotion/common/registry.py: - Description attributes can (and sometimes do, in practice) contain - characters that need escaping. So, escape them. - Fixes cases where some (private) components would cause us to never - be able to parse the registry cache. - * flumotion/test/test_registry.py: - Add a test for the above; refactor the dumping tests a little to - reduce code duplication. - -2007-10-16 Michael Smith - - * flumotion/component/producers/playlist/playlistparser.py: - Make implementation match comments (the comments were correct) when - finding the next scheduled item. - Fixes problems when adding an item before, but partially overlapping - with, the first item in the schedule. - - * flumotion/test/test_component_playlist.py: - Add a new test that is fixed by this commit. - -2007-10-09 Michael Smith - - * flumotion/component/component.py: - Fix plug instantiation. - -2007-10-08 Michael Smith - - * flumotion/twisted/rtsp.py: - If our render() deferred errbacks, then respond with an internal - server error rather than silently not responding. - -2007-10-03 Andy Wingo - - * flumotion/component/producers/soundcard/soundcard.py - (Soundcard.getVolume): Avoid dividing by 0 if GStreamer reports 0 - channels. Strange, but fixes #715. - - * configure.ac: - bump the minor version, this is the crazy development - branch - -2007-10-03 Andy Wingo - - * flumotion/manager/component.py (ComponentAvatar.__init__) - (ComponentAvatar.makeComponentState): Set self.componentState - before calling self.addMessage. - - * flumotion/component/producers/rtsp/rtsp.py - (Rtsp.get_pipeline_string): - * flumotion/component/producers/ivtv/ivtv.py - (Ivtv.get_pipeline_string): - * flumotion/component/producers/looper/looper.py - (Looper.get_pipeline_string): Fix naming of feeders. - - * flumotion/manager/component.py - (ComponentAvatar.makeAvatarInitArgs): Revert to previous - implementation. - - * flumotion/component/component.py - (BaseComponentMedium.remote_getMasterClockInfo): Implement for all - components, as it seems that all components have clock-master in - the config. - - * flumotion/common/config.py: Update comment. - - * flumotion/manager/component.py - (ComponentAvatar.makeAvatarInitArgs): Only callRemote to - getMasterClockInfo if the component has 'clock-master' in its - config. Slightly hacky, but at least it doesn't assume that all - components are feed components. Should we just make the base - Component have a getClockMaster implementation? - - * flumotion/component/feed.py (FeedMedium._doFeedTo): Remove - monkeypatch, now that we are forcing restarts. See #619. - - * flumotion/launch/main.py: - * flumotion/launch/parse.py: Fix flumotion-launch, albeit a bit - hackily. At least clock master selection is more like core now. - - * flumotion/component/component.py (BaseComponent.__init__) - (BaseComponent.__init__, BaseComponent.addMessage): Hackily add - another error reporting mechanism for programmatically running - components; probably needs more thought. - - * flumotion/manager/manager.py (Vishnu._loadManagerBouncer): Fix - to conform to init protocol; still seems hacky. - - * flumotion/job/job.py (JobMedium._createComponent): Pass the - config to createComponent(). No need to setup() any more. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer): - * flumotion/component/producers/unixdomain/unixdomain.py - (UnixDomainProvider): - * flumotion/component/producers/playlist/playlist.py - (PlaylistProducer): - * flumotion/component/producers/looper/looper.py (Looper): Conform - to initialization protocol. - - * flumotion/component/misc/httpfile/httpfile.py - (HTTPFileStreamer): Conform to initialization protocol. Reorder - some functions. - - * flumotion/component/converters/overlay/overlay.py (Overlay.do_stop): - - * flumotion/component/component.py (maybe_deferred_chain): New - helper, chains a set of methods. - (BaseComponent.__init__): Take the component config as an arg. Set - self.config directly, and run setup() after running init(). - (BaseComponent.init): We can set self.name directly. - (BaseComponent.do_check): Refactor this base implementation a bit. - (BaseComponent.do_setup): Do work here that had been done in - setup(). Fix bugs in the presence of plugs. Chain calls to - do_check(). - (BaseComponent.setup): No longer take the config, __init__ set it - already. Push lots of details into the base do_setup(). Go happy - after the do_setup() chain succeeds, and ensure that messages are - posted (and the mood changed) on failure. - (BaseComponent.start): Removed, no longer used. - (BaseComponent.stop): Chain calls to do_stop(). Push some details - into the base do_stop(). - (BaseComponent.setMood, BaseComponent.waitForHappy): Add - infrastructure for getting a deferred that will be fired on -> - happy; seems a bit hackish. Mostly used by tests and in-process - manager bouncers. (In-process manager bouncers should probably be - plugs instead.) - - * flumotion/component/bouncers/component.py (Bouncer.do_setup): - Rename from do_start. - (Bouncer.setMedium): Proxy the setMedium to the plug. - - * flumotion/common/common.py (get_all_methods): New public method, - the guts of call_each_method. - - * flumotion/common/reflectcall.py (createComponent): Take new - argument, the component config. - - * flumotion/test/test_component_bouncers_bouncer.py - (TrivialBouncerTest.setUp): - * flumotion/test/test_htpasswdcrypt.py - (TestHTPasswdCryptUACPP.setUp, TestHTPasswdCryptUACPCC.setUp): - * flumotion/test/test_component.py (PipelineTest.__init__) - (TestExpandElementNames.setUp, TestParser.parse) - (TestParser.testErrors): - * flumotion/test/test_saltsha256.py (TestWrongKeycardClass.setUp) - (TestSaltSha256USCPCC.setUp): - * flumotion/test/test_component_feed.py (FeedTestCase.setUp): - * flumotion/test/test_pb.py (Test_BouncerWrapper.setUp) - (Test_FPBClientFactory.setUp): - * flumotion/test/realm.py (TestRealm.getFactory): - * flumotion/test/test_component_httpserver.py - (MountTest.makeComponent): - * flumotion/test/test_component_bouncers_component.py - (TrivialBouncerTest.setUp): - * flumotion/test/test_component_httpstreamer.py - (TestOldProperties.setUp): Update component __init__. - - * flumotion/test/test_component_init.py (TestInit.testInit): We - can't successfully __init__ generically any more, now that - __init__ takes the config. Load the modules anyway though. - - * flumotion/test/comptest.py (ComponentWrapper): - * flumotion/test/test_comptest.py - (TestComponentWrapper.test_instantiate_errors) - (TestComponentWrapper.test_gstreamer_error) - (TestCompTestSetup.test_success): Update for component init - protocol changes. - - * flumotion/test/test_manager_manager.py - (FakeWorkerMind.remote_getPorts): - * flumotion/test/test_manager_worker.py - (FakeWorkerMind.remote_getPorts): Fix to work with the random port - change of last week. - -2007-10-02 Andy Wingo - - * doc/random/component-initialization-protocol: Updates. setup() - is now called directly from __init__, which takes the config dict - directly. do_check, do_setup, and do_stop methods are - automatically chained, and do not need to chain up. Start has been - removed, reflecting the code. - - * doc/random/component-initialization-protocol: Convert to be - restructured text. No changes. - - * flumotion/manager/component.py (ComponentAvatar.feedTo) - (ComponentHeaven._connectFeederDownstream): Updates to pass the - right thing to callRemote('feedTo', ...). - - * flumotion/component/feedcomponent.py (FeedComponentMedium): - De-bitrot downsteam connections. Changed the remote call to feedTo - to be more like eatFrom. Uses the feed medium. Works, - astonishingly. - - * flumotion/test/test_component_feed.py - (TestDownstreamFeedClient.testRequestFeed): New test, tests the - high level 'requestFeed' interface. - - * flumotion/component/feed.py (FeedMedium.requestFeed.error) - (FeedMedium.sendFeed.error): Propagate the errors to the client; - avoids successful None returns when the remote feed is not - available. - -2007-10-01 Andy Wingo - - * flumotion/job/job.py (JobClientBroker.fileDescriptorsReceived): - * flumotion/worker/feedserver.py (FeedServer.eatFromFD) - (FeedAvatar._sendFeedReplyCb) - (FeedAvatar.perspective_receiveFeed, FeedAvatar._doReceiveFeed): - * flumotion/worker/job.py (ComponentJobAvatar.receiveFeed): - * flumotion/worker/worker.py (WorkerBrain.eatFromFD): De-bitrot - the downstream connection code. - - * flumotion/component/feed.py (FeedMedium.sendFeed): Add stub - implementation, not tested yet. - - * flumotion/worker/feedserver.py (FeedAvatar.eatFromFd) - * flumotion/test/test_component_feed.py - (TestDownstreamFeedClient): Add downstream connection tests. - (TestFeedClient): Refactored common tests to a separate suite. - -2007-09-27 Michael Smith - - * flumotion/component/padmonitor.py: - If we never receive data in the first timeout period, then go - to inactive. - -2007-09-27 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - description should be a string, not a tuple. Remove stray comma. - -2007-09-27 Andy Wingo - - * flumotion/component/feedcomponent010.py - (FeedComponent.provide_master_clock.pipelinePaused): Get the - listening port from the time provider. - (FeedComponent.provide_master_clock.pipelinePaused): Fuck python's - lexicals!!!!! - - * flumotion/common/worker.py (PortSet.reservePorts): Avoid - infinite loops. - (PortSet.__init__): Actually pay attention to the initarg. - - * flumotion/manager/worker.py - (WorkerAvatar.makeAvatarInitArgs.havePorts) - (WorkerAvatar.__init__): New initarg, randomPorts, true if the - worker will be allocating ports randomly. - - * flumotion/worker/medium.py (WorkerMedium.remote_getPorts): - Update docs. - - * flumotion/worker/worker.py (WorkerBrain.getPorts): Return a - pair, the ports and the randomPorts bool. - - * flumotion/common/worker.py (PortSet.__init__): New optional arg, - randomPorts. - (PortSet.reservePorts): If we have randomPorts, return 0. - - * flumotion/worker/main.py (_readConfig): Actually respect a - random=true argument in the worker config. - - * flumotion/test/Makefile.am - * flumotion/test/test_worker_config.py - (WorkerConfigTest.testRandomFeederPorts): New test. - - * flumotion/component/feedcomponent010.py - (FeedComponent._setup_pipeline): Set the pipeline to READY even if - we have a delayed start due to a slaved clock. - - * flumotion/worker/worker.py (WorkerBrain.create.getBundles): Get - any necessary plug bundles. - - * flumotion/component/component.py - (BaseComponent._instantiate_plugs): New method, factored out of - setup(). - (BaseComponent.setup): Remove the bundle-fetching behavior of - setup_plugs, just instantiate the plugs directly now. No more need - for a registry in components, yay :) - - * flumotion/common/config.py (ConfigEntryPlug.__init__): Make the - config here directly. Include the module name and entry point so - that components won't have to load the registry. - (buildPlugsSet): Take the config generated by the plug. - - * flumotion/test/test_config.py - (TestConfig.testParseManagerWithPlugs) - (TestConfig.testParsePlugs) - (TestConfig.testParsePlugsWithCompoundProperties): Update tests. - - * flumotion/common/reflectcall.py (reflectCall): New method. - - * doc/random/component-initialization-protocol - (BaseComponent.setup): Change to note that setup is called - directly by the job. - - * flumotion/component/producers/firewire/firewire.py - (Firewire.get_pipeline_string): Fix some of the @feeder@ strings - for changes on 2007-09-12. - -2007-09-26 Andy Wingo - - * flumotion/test/test_comptest.py - (TestComponentWrapper.test_setup_and_stop): - * flumotion/test/test_manager_manager.py - (TestVishnu.testConfigBeforeWorker): - (TestVishnu.testConfigAfterWorker): Skip these tests for now, will - get around to fixing them before the release. - - * flumotion/test/test_manager_manager.py - (TestVishnu.testLoadConfiguration) - * flumotion/test/test_component.py (TestParser): - * flumotion/test/test_manager_admin.py (TestAdminAvatar): - * flumotion/test/test_component_httpstreamer.py - (TestOldProperties.tearDown): - * flumotion/test/test_manager_worker.py: Update tests. - - * flumotion/manager/component.py - (ComponentAvatar.__init__): Verify/upgrade the config here, at - initialization time. - (ComponentAvatar.makeComponentState): New method, taken from - manager.py's _getComponentState. - (ComponentAvatar.addMessage, ComponentAvatar.addMessageObject): - New convenience methods. - (ComponentAvatar.onShutdown): A lot of the detached() code moved - here; still, it's a lot of code. - (ComponentAvatar.provideMasterClock): New method. - (ComponentAvatar.setClocking): New method, akin to the old - callRemote('start'), but for clock slaves. - (ComponentHeaven.feedServerAvailable) - (ComponentHeaven.masterClockAvailable): Some depgraph-like - functions. Since eatFrom and provideClockMaster both depend on - worker port allocations, and workers or the clock master may or - may not be logged in, we need to react to the comings and goings - of clock masters. - (ComponentHeaven._setupClocking): New method, run when a component - logs in and in some other circumstances; either tells a component - to provide a master clock, tells it about master clocking info, or - does nothing if the component is cool without clocking info. - (ComponentHeaven.componentAttached): When a component logs in, - tell it about clocking info, and tell it about how to connect its - eaters and feeders. Should re-fix #721. - (ComponentHeaven._connectEaterUpstream): - (ComponentHeaven._connectFeederDownstream): Don't rely on feed - availability, it's not guaranteed. - (ComponentHeaven._connectEaters) - (ComponentHeaven._connectFeeders): Connect all possible eaters and - feeders, starting the connection from the remote side if - necessary. A subtle and clever extension that makes arbitrary - start order possible. - - * flumotion/manager/manager.py (Dispatcher.requestAvatar): Rework - so that avatars can be constructed with a deferred. Remove the old - attached/detached behavior. Shortcut past the heavens for creating - avatars, and managing the heavens' avatar sets. - (Vishnu): Remove bits about the depgraph. The depgraph was a good - idea, but in the end was too complicated to be reliable; instead - by removing some core complications, we remove the need for the - depgraph. - (Vishnu.workerAttached.workerAvatarComponentListReceived): Tell - the component heaven that the feedserverport is available. The - general idea is good here, but the code intricacies are still - messy. Pointy boat outside the window. - (Vishnu.addComponentToFlow): New method, pulled out of the - component config verification code. - (Vishnu.registerComponent): New method, pulled out of the - component config verification code. - (Vishnu.getWorkerFeedServerPort): Return None if no worker is - available. Refactoring needed. - (Vishnu.getComponentMapper): New function, perhaps unnecessary. - - * flumotion/manager/base.py (ManagerAvatar): Refactor so - that the remote reference is available at __init__-time. Remove - attached() and unattached(). Use more of the base - fpb.PingableAvatar. - (ManagerAvatar.makeAvatarInitArgs): New class method, useful if - you need to make some remote calls before the avatar can be - created. - (ManagerHeaven.createAvatar, ManagerHeaven.removeAvatar): Removed, - now handled by the dispatcher in manager.py. - * flumotion/manager/worker.py (WorkerAvatar): Adapt. - (WorkerAvatar.makeAvatarInitArgs): Get the feed server port and - port set here. - * flumotion/manager/admin.py (AdminAvatar): - * flumotion/manager/component.py (ComponentAvatar) - (ComponentAvatar.makeAvatarInitArgs): Get the job state, conf, and - clocking info here, becore making the avatar. - - * flumotion/manager/manager.py - (Vishnu._workerCreateComponentDelayed): - * flumotion/manager/worker.py (WorkerAvatar.createComponent): - * flumotion/job/job.py (JobMedium.remote_create) - (JobMedium._createComponent): - * flumotion/worker/medium.py (WorkerMedium.remote_create): - * flumotion/worker/job.py (ComponentJobAvatar.haveMind.create) - (ComponentJobInfo, ComponentJobHeaven.spawn) - (ComponentJobHeaven.spawn): - * flumotion/worker/worker.py (WorkerBrain.create) - (WorkerBrain.create.spawnJob): New argument when telling a worker - to create a component, the component configuration, which is - passed directly to the job in the create() call, obviating the - need for the manager->component setup() phase. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.do_pipeline_playing) - (MultifdSinkStreamer.start_pipeline): Some hacks to get the - httpstreamer working with the new code. Probably should revise the - component inititialization protocol. - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.connectEater): Shortcut out if we have not - yet been informed of the location of the remote feed. - (FeedComponentMedium.remote_getEaterDetail): Removed, unnecessary. - (FeedComponentMedium.remote_setMasterClock): New call, proxies - directly to FeedComponent.set_master_clock(). - - * flumotion/component/feedcomponent010.py - (FeedComponent.do_setup): Start the pipeline directly unless we - are slaving our master clock. - (FeedComponent._setup_pipeline, FeedComponent.set_master_clock): - Only disable base_time handling if we are slaving our clock - remotely. If we are resetting our master clock info, stop then - start the pipeline; this bit is untested, but then again before it - failed without errors or warnings, so that's OK. Start the - pipeline after setting master clock information. - (FeedComponent.get_master_clock): Since we now overload - _master_clock_info to be valid in the slaved case as well, only - return a tuple if we are actually providing a clock master. - (FeedComponent.provide_master_clock): Since providing a master - clock can be done with a PLAYING pipeline, don't mess with - pipeline state here, instead assuming that setup() set the - pipeline to PLAYING already. Return the existing data if we are - already providing a master clock. - (FeedComponent.start_pipeline): Rename from do_start(). Remove - clocking argument and behavior, that's handled separately. - - * flumotion/component/component.py (remote_setup, remote_start): - Remove these remote methods. Now, the config passed in setup() is - instead given from the worker to the job in create(), and the - clocking info passed in start() is given via the separate - remote_provideMasterClock/remote_setMasterClock calls. The - pipeline starts automatically after create(), unless it needs - master clocking info, in which case it starts after - setMasterClock(). - -2007-09-26 Michael Smith - - * flumotion/admin/admin.py: - Set AdminModel logName to the managerId to make log files more - comprehensible when there are multiple AdminModels in a process. - -2007-09-26 Michael Smith - - * flumotion/admin/admin.py: - Revert r5537, it causes problems. - -2007-09-25 Andy Wingo - - * flumotion/component/component.py - (BaseComponent.setup.setup_plugs): Only load up the registry if we - actually have plugs to instantiate. Speeds up component start - dramatically in the normal case of no plugs. - - Loading the registry should not be necessary at all; the manager - should give the component all of the information that it needs so - that it can find the plugs on the local filesystem. - -2007-09-20 Michael Smith - - * flumotion/manager/base.py: - Update a comment. - * flumotion/manager/component.py: - Rearrange component attach and detach code to be clearer and saner. - Remove register/unregister from component heaven. - * flumotion/manager/manager.py: - Call avatar.attached() directly from login code, so that we do all - this during login, rather than at various later points. - * flumotion/manager/worker.py: - Remove a fixme, raise an exception if a duplicate worker somehow - gets into the heaven twice. - * flumotion/test/test_manager_manager.py: - Update tests for avatars attaching during login. - - Fixes #624. - -2007-09-19 Michael Smith - - Patch by: daniel.hnn@gmail.com - * flumotion/component/consumers/shout2/shout2.py: - Trivial fix to shout2 consumer to allow streaming to a non-localhost - server. Fixes #754. - -2007-09-18 Arek Korbik - - * flumotion/admin/command/commands.py (do_avatar_action): - Do not operate on non-existing components. Fixes #757. - - * flumotion/admin/command/main.py (parse_commands): - Make command's flow part of the main deferred (and print traceback - on errors, too). Fixes #727. - -2007-09-18 Michael Smith - - * flumotion/admin/admin.py: - Don't emit disconnected from the admin model unless we actually - managed to connect first. - -2007-09-14 Andy Wingo - - * flumotion/test/test_component.py (PipelineTest.connect_feeders): - Stub out. - - * flumotion/manager/component.py - (ComponentAvatar.perspective_feedReady) - (ComponentAvatar.perspective_error): Remove unused remote methods. - - * flumotion/component/padmonitor.py (EaterPadMonitor.__init__) - (EaterPadMonitor.setInactive): Changes to fix the FeedComponent - reconnectEater problem. - - * flumotion/component/component.py (BaseComponent): Remove signal - stuff, as I had meant to do before. - - * flumotion/component/producers/playlist/playlist.py - (PlaylistProducer.create_pipeline): - * flumotion/component/feedcomponent.py - (ParseLaunchComponent.create_pipeline): Don't connect_feeders, the - base class will do this. - - * flumotion/component/feedcomponent010.py (FeedComponent.init): - New instance var, _clock_slaved. Will be used later. - (FeedComponent.do_setup): Set _clock_slaved to True if we should - expect to slave our clock to another one. Call connect_feeders() - on the pipeline instead of expecting create_pipeline() to do so. - (FeedComponent.stop_pipeline): Rename from pipeline_stop. - (FeedComponent.cleanup): It's stop_pipeline now. - (FeedComponent.do_start): Fix bug in eater pad monitors whereby it - would call back with the fdsrc name, not the eater alias. - (FeedComponent.feedToFD): Clean up the fd in an error case. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer) - (MultifdSinkStreamer._client_removed_handler): - * flumotion/component/consumers/httpstreamer/resources.py - (HTTPStreamingResource.__init__) - (HTTPStreamingResource.clientRemoved): - * flumotion/component/feedcomponent.py - (FeedComponentMedium.__init__): - * flumotion/component/feedcomponent010.py - (FeedComponent.__signals): Remove signals from components, which - were a bit cracky. - - * flumotion/component/feedcomponent010.py - (FeedComponent.connect_feeders): Fold the client-fd-removed signal - handler into the method. - (FeedComponent.install_eater_event_probes): New helper, installs - the necessary event probes, which are now folded into the method. - (FeedComponent.do_start): Call install_eater_event_probes. - (FeedComponent.bus_message_received_cb): Clean up (to my eyes). - (FeedComponent.unblock_eater): Move around. - (FeedComponent.reconnectEater): Move around. Perhaps now I should - start making bugs again. - -2007-09-13 Andy Wingo - - * flumotion/component/feedcomponent010.py - (FeedComponent.attachPadMonitorToFeeder): Improved variable - existence. - (FeedComponent.cleanup): Further fixage. - - * flumotion/component/padmonitor.py (PadMonitor.__init__): - Publicize monitor.name. - (PadMonitorSet): New object, factored out of FeedComponent. - - * flumotion/component/feedcomponent010.py (FeedComponent.init): - Make _pad_monitors a PadMonitorSet, which still derives from dict. - (attachPadMonitor, removePadMonitor, setPadMonitorActive) - (setPadMonitorInactive): Removed, now part of the PadMonitorSet. - - * flumotion/component/eater.py (Eater.setPadMonitor) - (Eater.isActive): New methods, for indexing pad monitors by eater. - - * flumotion/component/feedcomponent010.py - (FeedComponent.attachPadMonitorToFeeder) - (FeedComponent.bus_message_received_cb): - * flumotion/component/eater.py (Eater.__init__) - * flumotion/component/feeder.py (Feeder.__init__): Detwingle names - more. - - * flumotion/component/feedcomponent010.py - (FeedComponent.isEaterActive): Removed, use the eater directly. - - * flumotion/component/combiners/switch/switch.py - (Switch.is_active): Update to new API. - -2007-09-12 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py: - Fix disker's use of old method on remote call to add events. - -2007-09-13 Andy Wingo - - * flumotion/test/test_component_feeder.py (TestFeeder): - * flumotion/test/test_component_padmonitor.py (TestPadMonitor): - Split out tests from test_feedcomponent010.py, which wasn't even - being disted, and which now is empty and deleted. Update to use - new API. - - * flumotion/component/feeder.py (Feeder): - * flumotion/component/eater.py (Eater): Move out to separate - files. - - * flumotion/component/padmonitor.py (PadMonitor) - (EaterPadMonitor): Move to a separate file; take the callbacks in - __init__() so that we don't have to introduce a dependency on the - naming of the component's interface. - - * flumotion/common/gstreamer.py (StateChangeMonitor): Move here - from feedcomponent010.py; requires extra imports in this file, but - that shouldn't be a problem. - - * flumotion/component/feedcomponent010.py: Import helper classes - from external modules. - - * flumotion/component/Makefile.am (component_PYTHON): - * flumotion/component/component.xml: Add new files to bundles and - dist. - -2007-09-12 Andy Wingo - - * flumotion/component/feedcomponent010.py (StateChangeMonitor): - New class, abstracts out the state change deferred struct, - unfucking some of the api badness. - (FeedComponent): Refactor to use the StateChangeMonitor. - - * flumotion/common/gstreamer.py (get_state_change): New public - function, moved here from feedcomponent010.py. - - * flumotion/test/test_component.py: Fix test cases to use 'eater' - rather than 'source'. - - * flumotion/component/feedcomponent010.py - (FeedComponent.install_eater_continuity_watch): New public method, - watches some elements for discontinuity message; palliates some - magical element naming intertwingliness. - (FeedComponent.get_eater_name_for_feed_id): Remove; although - switch needs it, switch should be refactored to make more use of - Eater objects. - (FeedComponent.do_start): Rename from link() and incorporate - do_start() from ParseLaunchComponent, allows implementation of - pure FeedComponent classes. Fixes #646. - - * flumotion/component/feedcomponent.py - (ParseLaunchComponent.FDSRC_TMPL) - (ParseLaunchComponent.DEPAY_TMPL) - (ParseLaunchComponent.FEEDER_TMPL): Moved here from FeedComponent. - (ParseLaunchComponent.EATER_TMPL): New template variable, computed - at init-time as a combination of FDSRC_TMPL, DEPAY_TMPL, - get_queue_string(), and identity, if we are checking stream - continuity. - (ParseLaunchComponent.set_pipeline): Install an eater continuity - watch if needed. - (ParseLaunchComponent.get_eater_template) - (ParseLaunchComponent.parse_pipeline) - (ParseLaunchComponent.get_feeder_template) - (ParseLaunchComponent.get_queue_string) - (MultiInputParseLaunchComponent.get_queue_string): Detwingle. - - * flumotion/component/feedcomponent.py - (ParseLaunchComponent.get_eater_template): Fix naming of eater - identities. - -2007-09-11 Andy Wingo - - * flumotion/launch/main.py (ComponentWrapper.eatFromFD) - (make_pipes, start_components.do_start): Changes to make - flumotion-launch work, after the eaterAlias changes. - -2007-09-11 Andy Wingo - - Restructure the FeedComponent and ParseLaunchComponent base - classes to name their eaters by eaterAlias and feeders by feedName - instead of by remoteFeedId and feedId, respectively. See #694. - Incompatibly breaks the manager<->component interface, because the - manager needs to refer to eaters internally and over the wire by - eaterAlias and not by the id of the feeder that they initially - eat from. - - * flumotion/manager/component.py (ComponentAvatar.attached): - Revert #721; this function spewed warnings on manager restart, and - will be obviated by virtual feed-related changes. - (ComponentAvatar.getFeedersForEaters) - (ComponentAvatar.getEatersForFeeders) - (ComponentHeaven._connectEaters) - (ComponentHeaven._connectFeeders): Refactor a bit, reflecting the - fact that we can refer to individual eaters by eaterAlias. - (ComponentHeaven._connectEaterUpstream): Pass the eaterAlias to - the remote eatFrom call. - - * flumotion/component/feedcomponent.py (FeedComponentMedium): Some - data structure keying updates. Don't connect to feed-ready, the - manager doesn't do anything with it. (Dunno why.) - (FeedComponentMedium.remote_eatFrom): Add the eaterAlias argument, - an incompatible remote method signature change. - (FeedComponentMedium._getAuthenticatorForEater): Change from - _getAuthenticatorForFeeder, take an eaterAlias instead. - (FeedComponentMedium.connectEater): Take an eaterAlias instead. - (FeedComponentMedium.remote_feedTo): A minimal update attempt, but - the code is bitrotten. - (ParseLaunchComponent.add_default_eater_feeder) - (ParseLaunchComponent.parse_tmpl) - (ParseLaunchComponent.parse_pipeline): - (MultiInputParseLaunchComponent.get_queue_string): Rewrite the - template parsing code to be more simple, and to not encode remote - feeder names into eater element names. See #694. - - * flumotion/component/base/eaters.glade: - * flumotion/component/base/admin_gtk.py (FeedersAdminGtkNode) - (EatersAdminGtkNode): Update for uistate changes; show feedId - separately from the eaterName in the eaters page. - - * flumotion/component/feedcomponent010.py (Feeder): Key by - feederName instead of feedId; including the component name is - redundant. - - * flumotion/component/feedcomponent010.py (Eater): Key by - eaterAlias instead of by the id of the feed that we initially eat - from. Adds new uiState keys 'eaterName' and 'eaterAlias', and - moves 'eaterId' to be named 'feedId' in the connections dict. - (Eater.connected): Add argument feedId, to indicate which feed we - are eating from. - - * flumotion/component/feedcomponent010.py (FeedComponent.init): - Remove 'eaterNames' and 'feederNames' from the jobstate, they were - not used. Publicize self.eaters and self.feeders, which are keyed - by eater alias and feeder name, respectively. - (FeedComponent.do_setup): Simplify the parsing of the 'eater' and - 'feed' config keys. - (FeedComponent.get_eater_names, FeedComponent.get_feeder_names) - (FeedComponent.get_feed_names): Removed, along with the - attributes. Use component.eaters and component.feeders directly. - (FeedComponent.bus_message_received_cb): Deal with changes; nasty - in all cases. - (FeedComponent.isEaterActive): New function, for switch. Needs - review; probably better to have an isActive() method on eaters - directly. - (FeedComponent.get_element): Warn if the element is not found. - (FeedComponent.eatFromFD): Add argument, eaterAlias. An - incompatible change. Pass it on to Eater.connected(). - - * flumotion/component/converters/overlay/overlay.py - (Overlay.get_pipeline_string): Simplify. - - * flumotion/component/combiners/switch/switch.py: Some changes to - attempt to make things work, but switch in trunk wasn't working - anyways. Fix later... - - * flumotion/component/feed.py (FeedMedium.__init__): Remove the - legacy mode of operation where the FeedMedium would automatically - call eatFromFD on the component. requestFeed is the replacement. - - * flumotion/test/test_component_feed.py - (TestUpstreamFeedClient.testConnectAndFeedLegacy): Since we - removed the legacy interface on FeedMedium we can remove this test - as well. - * flumotion/test/test_component_feed.py (TestUpstreamFeedClient): - Update tests to cope with FeedMedium changes. - - * flumotion/test/test_manager_manager.py - (FakeComponentMind.remote_eatFrom): New arg in the prototype. - - * flumotion/test/test_component.py (TestExpandElementName): - Removed, as the complicated code that it tested is gone. Yay! - (TestParser): Update the tests to reflect what the new code should - do. - -2007-09-05 Andy Wingo - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.remote_eatFrom): Remove a FIXME, we will drop - the old connection when the new connection suceeds, not when we - start connecting. - - * flumotion/common/config.py (upgradeAliases, UPGRADERS): Add an - upgrader for eater alias changes. - (buildEatersDict): Instead of returning the eater config property - as a list of feedIds, have it be a list of feedId, eaterAlias - tuples. The eaterAlias will be constant across the lifetime of the - component, but in the future the manager will be able to switch - the feedId that the component is eating from. See #694. - - * flumotion/test/test_config.py - (TestFunctions.testBuildEatersDict): Add some checks for the - aliasing behavior. - - * flumotion/common/config.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/manager/component.py: - * flumotion/manager/depgraph.py: - * flumotion/test/comptest.py: - * flumotion/test/test_component.py: - * flumotion/test/test_component_httpstreamer.py: - * flumotion/test/test_comptest.py: - * flumotion/test/test_manager_depgraph.py: Update code and tests - for changes to config['eater']. - -2007-09-05 Andy Wingo - - * flumotion/manager/manager.py - (Vishnu._upgradeComponentConfig.upgradeFailedWarning): - * flumotion/common/config.py (upgradeEaters, UPGRADERS): Move - upgraders to config.py, where they're more appropriate. Manager - CURRENT_VERSION automagically. - (upgradeEaters): Fix bug caught by pychecker. - - * flumotion/manager/manager.py (Vishnu._upgradeComponentConfig) - (Vishnu._getComponentState): Factor out the config upgrading into - a separate method. - - * flumotion/common/config.py (CURRENT_VERSION) - (ConfigEntryComponent._buildConfig): Add a 'config-version' - element to the config, to be incremented when the config needs - upgrading. - -2007-09-04 Andy Wingo - - * flumotion/common/manhole.py (SSHPublicKeyChecker): Stub out if - we have a twisted without ISSHPrivateKey. - (SSHPublicKeyChecker): Try a different hack. - - * flumotion/manager/depgraph.py: Editorialize more. - - * flumotion/manager/depgraph.py: Add documentation for the - depgraph, along with some editorials. - -2007-09-03 Thomas Vander Stichele - - * flumotion/common/boot.py: - Fail to start if python is 2.5 or newer, and Twisted is older than - 2.5.0 - -2007-09-03 Andy Wingo - - * flumotion/admin/command/commands.py (do_managerinvoke): New - command, invokes an arbitrary remote method on the manager. - - * flumotion/common/manhole.py (openSSHManhole) - (openAnonymousTelnetManhole): New optional argument, the port - number to request. - - * flumotion/component/plugs/Makefile.am (component_PYTHON): - * flumotion/component/plugs/plugs.xml: Add to bundles and dist. - - * flumotion/component/plugs/manhole.py: New file, implements a - manager plug that starts a manhole, either on ssh or telnet, and - which can be opened or closed over the admin interface. - - * conf/Makefile.am (EXTRA_DIST): - * conf/managers/default/manhole.xml: Add example for manhole plug. - - * flumotion/common/Makefile.am (flumotion_PYTHON): - * flumotion/common/manhole.py: Add manhole module. MUAHAHA - -2007-08-29 Andy Wingo - - * flumotion/test/test_component_feed.py (FeedTestCase.tearDown): - Appeasement. - - * flumotion/test/common.py (TestCaseWithManager.tearDown): Flush - errors, in an attempt to appease twisted < 2.5. - - * flumotion/test/test_pb.py - (Test_FPBClientFactory.flushNotAuthenticatedError) - (Test_FPBClientFactory.tearDown): Reinstate some of the error - flushing in an attempt to appease the bots. - - * flumotion/worker/medium.py: - (WorkerClientFactory.gotDeferredLogin): Fix some nasties. - - * flumotion/admin/admin.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/bouncers/plug.py: - * flumotion/component/bouncers/saltsha256.py: - * flumotion/component/component.py: - * flumotion/manager/manager.py: - * flumotion/test/common.py: - * flumotion/test/test_checkers.py: - * flumotion/test/test_component_feed.py: - * flumotion/test/test_pb.py: - * flumotion/twisted/checkers.py: - * flumotion/twisted/credentials.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - * flumotion/worker/feedserver.py: - * flumotion/worker/medium.py: Change to return - errors.NotAuthenticatedError from authentication - procedures/bouncers instead of cred.error.UnauthorizedLogin. This - lets the error be serialized across a PB connection instead of - causing a printout and a need for hacks in the test suite. - Fixes #44. - - * flumotion/twisted/checkers.py (FlexibleCredentialsChecker): - Don't subclass from InMemoryUsernamePasswordDatabaseDontUse, just - pull its code in. Allows us to control the type of the returned - failure (so it can be a pb.Error subclass). - - * flumotion/twisted/credentials.py (IUsernamePassword) - (IUsernameHashedPassword): Re-export these from - twisted.cred.credentials. - - * flumotion/twisted/pb/portal.py - (BouncerPortal.getKeycardClasses): Don't return a failure here, as - we don't have a pointer to the transport (so that we can drop the - connection). - (BouncerPortal.login): If we error because we have no bouncer, - drop the connection as well. Otherwise both sides will chill in - this state with an open TCP connection, and no reconnect attempts. - -2007-08-27 Andy Wingo - - * flumotion/component/bouncers/tokentest.xml: Final fix to get - things working again. - - * flumotion/component/bouncers/tokentestbouncer.py: Fix a bug! - - * flumotion/component/base/http.py (HTTPAuthentication.__init__): - Fix a bug. - - * flumotion/component/bouncers/tokentest.py: Changed to implement - a token test base class and plug. - - * flumotion/component/bouncers/tokentestbouncer.py: New file, - broken out of tokentest.py. - - * flumotion/component/bouncers/tokentest.xml: Note that the token - test component moved to tokentestbouncer.py. Add registry things - about the token test plug. - - * flumotion/component/bouncers/Makefile.am (component_PYTHON): Add - tokentestbouncer. - - * flumotion/component/misc/httpfile/httpfile.py - (HTTPFileStreamer.init HTTPFileStreamer.do_setup) - (HTTPFileStreamer.do_stop, HTTPFileStreamer.do_start) - (HTTPFileStreamer.requestFinished): Fix bugs related to httpauth - factoring. - - * flumotion/component/consumers/httpstreamer/http.xml: Add - BouncerPlug socket to httpstreamer. - - * flumotion/component/base/http.py (HTTPAuthentication): Change to - not be a mixin. Add the beginnings of plug-based authentication. - (HTTPAuthentication.authenticateKeycard) - (HTTPAuthentication.keepAlive) - (HTTPAuthentication.cleanupKeycard) - (HTTPAuthentication.clientDone): Instead of being vmethods, - standardize on what the component should provide for us. This - doesn't work for keycards expired on httpfile, though. - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/file.py: - * flumotion/test/test_http.py: Update for making - HTTPAuthentication not a mixin. - - * flumotion/test/Makefile.am (EXTRA_DIST): Add to dist. - - * flumotion/test/bouncertest.py - (TrivialBouncerTest.setKeycardExpireInterval): New vmethod, so - that test cases can virtualize this hack. - - * flumotion/test/test_component_bouncers_component.py: New test - for the generic bouncer. - -2007-08-27 Zaheer Abbas Merali - - * scripts/check-sync-on-feeds (usage, main, failed, getFeed, - gotFeedServerPort, managerConnected, gotPlanetState, - gotWorkerHeavenState): - Made script connect to manager to get host name and port of - feed servers. - -2007-08-27 Andy Wingo - - * flumotion/component/bouncers/component.py (Bouncer.do_start): - Set the medium on the plug. - (Bouncer.authenticate): Pass the right arguments to the plug. - - * flumotion/test/test_component_bouncers_bouncer.py: - * flumotion/test/test_component_bouncers_plug.py: Refactor to use - the base class. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/bouncertest.py: Factored out a test base class. - - * flumotion/component/bouncers/plug.py (BouncerPlug.setMedium): - New method to set the medium on a bouncer plug. Optional. - (BouncerPlug.expireKeycardId): Actually do the callRemote. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/test_component_bouncers_plug.py - (TrivialBouncerTest): New test, taken from the one for the - deprecated bouncer interface. - -2007-08-24 Thomas Vander Stichele - - * flumotion/common/common.py (version, mergeImplements, - parseComponentId): - Fix copyright header. Remove pre-Twisted 2 stuff. Add doc. - -2007-08-24 Thomas Vander Stichele - - * flumotion/wizard/save.py (Component.toXML): - Consistently use 2-space indent in config xml. - -2007-08-24 Zaheer Abbas Merali - - * flumotion.spec.in: - Add flumotion-nagios to spec. - -2007-08-24 Zaheer Abbas Merali - - * scripts/check-sync-on-feeds (videoEventProbe, audioEventProbe, - sendNewsegments, videoBufferProbe, audioBufferProbe): - Improve the debug logging. - -2007-08-23 Zaheer Abbas Merali - - * scripts/check-sync-on-feeds: - Script that probably could do with a bit of refactoring, to - play back video and audio given video feeder and audio feeder - details. - Useful for checking sync at different points in a Flumotion - flow. - -2007-08-21 Thomas Vander Stichele - - * bin/Makefile.am: - * bin/flumotion-nagios.in: - * configure.ac: - * flumotion/Makefile.am: - * flumotion/monitor/Makefile.am: - * flumotion/monitor/__init__.py: - * flumotion/monitor/nagios/Makefile.am: - * flumotion/monitor/nagios/__init__.py: - * flumotion/monitor/nagios/main.py (Mood, Mood.addOptions, - Mood.handleOptions, Mood.do, Mood._callback, Mood.gotMoodCb, Nagios, - Nagios.addOptions, Nagios.handleOptions, Nagios.parse, Nagios.cb, - Nagios.eb, Nagios.run, Nagios.connect, Nagios._connectedCb, - Nagios._connectedEb, main): - * flumotion/monitor/nagios/util.py (LogCommand, LogCommand.__init__, - findComponent, ok, warning, critical): - Add a first stab at a flumotion-nagios binary, and an implementation - of the mood check. - -2007-08-21 Andy Wingo - - * flumotion/component/bouncers/Makefile.am: Autotoolage. - - * flumotion/component/bouncers/plug.py: New file, copied from - bouncer.py, refactors bouncer functionality into a plug. The code - for dealing with the uistate was removed, for better or for worse. - - * flumotion/component/bouncers/bouncer.xml: New file, declares the - bouncer component, the bouncer plug bundles, and an implementation - for the trivial bouncer. As yet untested. - - * flumotion/component/bouncers/component.py: New file, breaks out - a generic bouncer component that can support bouncer plugs. - - * flumotion/component/bouncers/saltsha256.xml: - * flumotion/component/bouncers/icalbouncer.xml: - * flumotion/component/bouncers/ipbouncer.xml: - * flumotion/component/bouncers/tokentest.xml: - * flumotion/component/bouncers/htpasswdcrypt.xml: Depend on the - base bouncer component bundle. - - * flumotion/component/bouncers/Makefile.am (component_DATA): - * flumotion/component/bouncers/deprecated.xml: New file, - registering a bundle for the current bouncer code, which will be - deprecated. - -2007-08-20 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - Remove queues; they're not needed add just add complexity. - -2007-08-17 Michael Smith - - * doc/random/manager-dependency-graph: - Some docs on how we use the depgraph. - * flumotion/test/test_feedcomponent010.py: - Increase a timeout; this test sometimes spuriously fails. - -2007-08-17 Michael Smith - - * flumotion/test/test_porter.py: - Fix tests to shut down connections properly so we don't have pending - calls remaining. - -2007-08-17 Arek Korbik - - * flumotion/component/producers/playlist/playlist.py - (PlaylistProducer._watchDirectory): - Block discovery while the watcher is first being started. - - * flumotion/component/producers/playlist/playlistparser.py - (PlaylistParser): - Make discoverer blockable/suspendable, sort pending playlist entries - before starting discoverer. - (PlaylistXMLParser.parseFile): - Block discoverer until the whole file has been processed. - - * flumotion/test/test_component_playlist.py - (TestPlaylistXMLParser): - Add tests for entry sorting and discovery blocking. - -2007-08-17 Arek Korbik - - * flumotion/component/base/watcher.py (BaseWatcher.checkFiles, - BaseWatcher.isNewFileStable): - Make file watchers recognize old files (with mtime in the past) in - the first scan. - -2007-08-17 Michael Smith - - * flumotion/component/misc/porter/porter.py: - Implement porter client timeouts, so that we (reasonably quickly) - time out clients that connect to the porter but never send a - complete first line. - Change some debug/log statements to more appropriate levels. - -2007-08-16 Michael Smith - - * flumotion/component/feedcomponent010.py: - Don't track inactive pad monitors separately; it's bug-prone and - makes subclassing this stuff harder than it needs to be. - -2007-08-16 Michael Smith - - * flumotion/component/feedcomponent010.py: - Don't call methods that no longer exist. - Fixes #741. - -2007-08-16 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - identity doesn't seem to handle new segments very well when syncing. - So, use two identities: one early in the pipeline with - single-segment=true, and one late in the pipeline doing - synchronisation. - -2007-08-14 Arek Korbik - - * flumotion/test/comptest.py (ComponentTestHelper.run_flow): - Unbox DeferredList result properly. - -2007-08-14 Michael Smith - - * flumotion/component/feedcomponent010.py: - Some fixes for EaterPadMonitor code; don't call None or cancel - already-called deferred calls. - -2007-08-13 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py - (FeedComponent.bus_message_received_cb): - Check if the identity is actually the identity from an eater - not just if it starts with 'eater'. - -2007-08-10 Michael Smith - - * flumotion/component/feedcomponent010.py: - Refactor eater probes to use PadMonitor code. - Refactor PadMonitor to allow an EaterPadMonitor subclass to handle - the eater-specific things properly. - Some cleanups of unused code and variables. - -2007-08-10 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py - (FeedComponent.bus_message_received_cb): - Only handle imperfect timestamps and offsets if they are - actually from identity elements in the eaters. - -2007-08-10 Arek Korbik - - * flumotion/admin/admin.py (AdminModel.connection_error): - Make the errback accept the deffered arg that it uses! - -2007-08-09 Pedro Gracia - - * flumotion/manager/component.py: removed componentId. - -2007-08-09 Pedro Gracia - - * flumotion/manager/component.py: now pass unittest. - -2007-08-09 Pedro Gracia - - * flumotion/component/feedcomponent.py: - * flumotion/manager/component.py: - Reconect eaters from components when the worker is launched - with another IP address. references #721. - -2007-08-09 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - Put the synchronising identity after the videorate/audiorate, - so that if there's a substantial gap in the video frames coming out - of the gnlcomposition, videorate can fill in frames so that we never - have to wait for synchronisation for too long. - Doesn't fix audio, as audiorate will output a single large buffer. - -2007-08-09 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - Override some additional clocking related methods to ensure we have - sane behaviour when asked to provide a master clock. - Periodically report what our pipeline clock says the time is. - -2007-08-09 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py - (AVSwitch._check_start_times_received): - Revert bad commit that set start-time differently for each switch - element. - -2007-08-08 Andy Wingo - - * flumotion/component/base/http.py (HTTPAuthentication.__init__) - (HTTPAuthentication.doCleanupKeycard) - (HTTPAuthentication.cleanupAuth): If a call to cleanupKeycard - fails, try again later. - - * flumotion/component/bouncers/bouncer.py (Bouncer.init): Make - keycard ids shorter, no need to be so long. - (Bouncer.expireKeycardId, Bouncer.addKeycard): Be less verbose, - expiring happens all the time now. - - * flumotion/component/base/http.py (HTTPAuthentication.keepAlive): - Fix argument count of unused method. - -2007-08-08 Michael Smith - - * flumotion/component/feedcomponent010.py: - Fix build errors that I failed to commit properly last night? - -2007-08-07 Andy Wingo - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.do_stop) - (MultifdSinkStreamer.do_start.turnHappy): - * flumotion/component/misc/httpfile/httpfile.py - (HTTPFileStreamer.do_stop) - (HTTPFileStreamer.do_start.setComponentHappy): Start and stop the - keepAlive callbacks. - - * flumotion/component/base/http.py (HTTPAuthentication.keepAlive): - New vmethod. - (HTTPAuthentication.authenticate): Set the issuerName and ttl. - (HTTPAuthentication._stopKeepAlive) - (HTTPAuthentication._scheduleKeepAlive): - (HTTPAuthentication.KEYCARD_TRYAGAIN_INTERVAL) - (HTTPAuthentication.KEYCARD_KEEPALIVE_INTERVAL) - (HTTPAuthentication.KEYCARD_TTL): Infrastructure to send keepAlive - requests to the bouncer. - - * flumotion/component/consumers/httpstreamer/http.py - (HTTPMedium.keepAlive): - * flumotion/component/consumers/httpstreamer/resources.py - (HTTPStreamingResource.keepAlive): - * flumotion/component/misc/httpfile/httpfile.py - (HTTPFileMedium.keepAlive, HTTPFileStreamer.keepAlive): Implement - the keepAlive hooks. - -2007-08-07 Michael Smith - - * flumotion/component/feedcomponent010.py: - Fix some typos. - -2007-08-07 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - Log when we expect an item to start/end, since this information is - difficult to recover from the existing log messages. - -2007-08-07 Michael Smith - - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - Add more crack! - Remote method to attach a pad monitor to a named feeder. - -2007-08-07 Andy Wingo - - * flumotion/manager/base.py (ManagerAvatar.perspective_keepAlive): - * flumotion/component/bouncers/bouncer.py - (BouncerMedium.remote_keepAlive, Bouncer.keepAlive): Instead of - passing all keycard IDs to be kept alive, instead pass an - identifier of the object that initially issued the keycards. This - to renew a keycard, you will have to mark the it with an - issuerName. - - * flumotion/test/test_component_bouncers_bouncer.py - (TrivialBouncerTest.testKeepAlive): Adapt test to new keepAlive - semantics. - - * flumotion/twisted/pb.py (Authenticator.ttl): OK! Since, in - challenge-response authentication we have to allocate a keycard id - <-> challenge pair, and we use challenge-response authentication - by default, default to 30 seconds of ttl, so that we keep the - keycard long enough to recognize a valid response, but not too - long so that we leak memory by default. - - * flumotion/worker/main.py (main): Remove unneccessary ttl=0 line. - - * flumotion/twisted/pb.py (Authenticator.ttl): Default to 0. There - is no reason for the bouncer to cache keycards in authentications - made with an authenticator, only in authentications made at - streamers. - - * flumotion/worker/main.py (main): Give the authenticator a TTL of - 0, so that the manager never stores the keycards. Should fix - keycard leaks in reconnecting worker<->manager, - component<->manager, and component<->feedserver connections. - - * flumotion/twisted/pb.py (Authenticator.ttl): New attribute, None - by default. - (Authenticator.issue): If self.ttl is not None, attach it to the - keycard. - - * flumotion/manager/base.py (ManagerAvatar.perspective_keepAlive): - New remote call, allows something logged into the manager to keep - any keycards that it has authenticated from being expired. - - * flumotion/component/bouncers/bouncer.py: More doc. - (Bouncer.addKeycard): If the keycard has a ttl <= 0, don't bother - adding it to our data structures. - - * flumotion/test/test_component_bouncers_bouncer.py - (TrivialBouncerTest.testAutoExpire): New test. - -2007-08-07 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py: - Remove commented crufty code. - -2007-08-07 Andy Wingo - - * flumotion/component/bouncers/bouncer.py: Doc more. - (BouncerMedium.remote_keepAlive, Bouncer.keepAlive): Implement - keepAlive. - - * flumotion/test/test_component_bouncers_bouncer.py - (TrivialBouncerTest.testKeepAlive): Test for keepAlive. - -2007-08-07 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py - (AVSwitch._set_last_timestamp): - Add warning message when timestamps of current source differ - between video and audio by at least 10 seconds, when swicthing - to new source. - -2007-08-07 Andy Wingo - - * flumotion/component/bouncers/bouncer.py - (Bouncer._scheduleTimeout.timeout, Bouncer.authenticate): - * flumotion/test/test_component_bouncers_bouncer.py - (TrivialBouncerTest.testTimeoutAlgorithm) - (TrivialBouncerTest.testTimeoutAlgorithm.checkTimeout) - (TrivialBouncerTest.testTimeoutAlgorithm): s/expiration/ttl/. - - * flumotion/component/bouncers/bouncer.py: Add some module docs. - (Bouncer.authenticate): Always return a deferred. - (Bouncer.expireKeycardId): Be nice if we have no medium. - - * flumotion/test/test_component_bouncers_bouncer.py - (TrivialBouncerTest.testAuthentication) - (TrivialBouncerTest.testTimeoutAlgorithm): Refactor to assume that - comp.authenticate() returns a deferred. - - * flumotion/component/bouncers/bouncer.py - (Bouncer._scheduleTimeout.timeout, Bouncer._unscheduleTimeout): - Infrastructure to time out keycards automatically if the keycard - has a "ttl" attribute. Need to add support for resetting keycards' - TTL values. - (Bouncer.expireKeycardId): Actually pop out the keycard here, - instead of waiting for confirmation. - (Bouncer.expireAllKeycards): With expireKeycardId popping the - cards, we need to iterate over a copy. - (TrivialBouncer.do_authenticate): Add the keycard to the bouncer - set. - (Bouncer.do_stop): Implement so that we can cancel any pending - calls. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/test_component_bouncers_bouncer.py: New file, - tests the trivial bouncer, and tests that timing out keycards - actually works. - -2007-08-07 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py - (AVSwitch._set_last_timestamp): - Logic mistake from yesterday, the stop-value needs to be - set to the highest last timestamp of the 2 switch elements. - -2007-08-06 Andy Wingo - - * flumotion/component/bouncers/bouncer.py (Bouncer.init) - (Bouncer.generateKeycardId): Make keycard ids more globally - uniquer. - -2007-08-06 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py - (AVSwitch._check_start_times_received): - Fix syntax error. - -2007-08-06 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py - (AVSwitch._set_last_timestamp, - AVSwitch._check_start_times_received): - Change switch's behaviour to not assume the video and audio - eaters for the same "source" (ie master or backup) are in - sync. - -2007-08-02 Michael Smith - - * flumotion/component/feedcomponent.py: - oops. No port argument to getMasterClockInfo() - * flumotion/manager/manager.py: - Pass correct arguments to setMasterClockInfo() in deferred. - -2007-08-02 Arek Korbik - - * flumotion/launch/inspect.py (main): - Don't use python2.5 features. - -2007-08-02 Arek Korbik - - * flumotion/launch/inspect.py: - Add support for compound properties in flumotion inspect. - -2007-08-02 Michael Smith - - * flumotion/admin/rrdmon/main.py: - * flumotion/manager/main.py: - * flumotion/worker/main.py: - When not daemonizing, don't fail to start. - -2007-08-02 Michael Smith - - * flumotion/admin/rrdmon/main.py: - * flumotion/manager/main.py: - * flumotion/worker/main.py: - When daemonizing, default for daemonizeTo should be '/', not None. - Fixes #734. - -2007-08-01 Andy Wingo - - * flumotion/admin/admin.py (AdminModel.remote_log): Removed, not - used since time memorial. - - * flumotion/test/common.py (useGtk2Reactor): Following popular but - impolite demands, don't default to randomness. - - * flumotion/test/Makefile.am (EXTRA_DIST): Fix import, for the - last time. - - * flumotion/test/common.py: Provide a way to use either the gtk2 - or the select reactor in tests. Fixes #675. By default choose - randomly. Perhaps a bad idea? - - * flumotion/test/test_common_package.py: Reorder imports so - reactor install workses. - - * flumotion/test/Makefile.am (EXTRA_DIST): Add signal mixin test, - this time correctly. - -2007-07-30 Arek Korbik - - * flumotion/test/gtkunit.py (GtkTestCase.set_widget): - flumotion-template does use the set_widget() method - revert part - of the r5316. - -2007-07-30 Arek Korbik - - * flumotion/test/test_comptest.py (CompatTestCase.failUnlessFailure): - FINE, just provide the whole method. - -2007-07-30 Arek Korbik - - * flumotion/test/test_comptest.py (CompatTestCase.failUnlessFailure): - Fine, provide the method more explicitly. - -2007-07-30 Arek Korbik - - * flumotion.spec.in: - Add flumotion-rrdmon. - -2007-07-30 Arek Korbik - - * flumotion/test/test_comptest.py (CompatTestCase, CompTestTestCase, - TestComponentWrapper): - Add failUnlessFailure method (for Twisted 2.0 compatibility). - -2007-07-30 Arek Korbik - - * flumotion/test/test_comptest.py: - Use assertEquals instead of failUnlessEquals (for Twisted 2.0 - compatibility). - -2007-07-30 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.remote_setGstDebug): - Fix setting the debug stream to a glob. - Tested with bin/flumotion-command -m localhost:7531 invoke - /default/http-audio setGstDebug s multi*:5 - -2007-07-30 Michael Smith - - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - Keep master clock info. Provide it by a remote method. - - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - Store clock master info when a clockmaster logs in. Trigger - deferreds waiting for it. - -2007-07-30 Arek Korbik - - * flumotion/common/config.py: - Add compound-property support: add xml-parsing and update config - dict building methods. - - * flumotion/test/test_config.py: - Add test cases for compound properties. - -2007-07-30 Arek Korbik - - * flumotion/common/registry.py: - Add compound-property support: add RegistryEntryCompoundProperty - class and parsing methods, update property parsing methods to look - for 'compound-property'; modify RegistryWriter to print nested - compound and simple properties properly. - - * flumotion/test/test_registry.py: - Add test cases for compound properties. - -2007-07-27 Andy Wingo - - * flumotion/component/component.py: Don't import sys. - - * flumotion/admin/admin.py (AdminModel): This is a changelog for - the last change to admin.py. It makes the AdminModel not be a - gobject. It does not change the admin's interface. Apologies for - the fuckups! - - * flumotion/common/signals.py (SignalMixin.emit): Iterate over a - list copy. - - * flumotion/test/test_common_signals.py - (TestSignalMixin.testDisconnect): - * flumotion/common/signals.py (SignalMixin.connect): Return the - signal ID. - - * flumotion/common/signals.py (SignalMixin.emit): - * flumotion/test/test_common_signals.py - (TestSignalMixin.testEmitSelf): Er, check to make sure that - emitting also passes the self object. - - * bin/flumotion-admin.in: Don't import gstreamer, we don't use it. - - * data/glade/admin-wizard.glade: - * data/glade/spyglass.glade: - * data/glade/videotest.glade: - * data/glade/wizard.glade: - * data/glade/wizard_audiotest.glade: - * data/glade/wizard_disk.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_overview.glade: - * data/glade/wizard_shout2.glade: - * data/glade/wizard_smoke.glade: - * data/glade/wizard_soundcard.glade: - * data/glade/wizard_source.glade: - * data/glade/wizard_summary.glade: - * data/glade/wizard_testsource.glade: - * data/glade/wizard_theora.glade: - * data/glade/wizard_tvcard.glade: - * data/glade/wizard_vorbis.glade: Don't require gnome libs, we - don't use them. - -2007-07-27 Andy Wingo - - * bin/flumotion-admin.in: Don't import gstreamer. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer): Don't register type; register signals via - SignalMixin interface. - - * flumotion/component/consumers/preview/preview.py - (Preview.get_pipeline_string): - * flumotion/component/consumers/disker/disker.py - (Disker._on_marker_start): No need to register gtypes. - - * flumotion/manager/main.py (main): Remove gstreamer arg munger. - - * flumotion/component/feedcomponent010.py - (FeedComponent.__signals__): Define the signals via the mixin. - - * flumotion/component/component.py (BaseComponent): Don't import - gobject. Make components have the SignalMixin; they are not - GObjects any more. - - * flumotion/common/Makefile.am (flumotion_PYTHON): - * flumotion/common/signals.py: New mixin, emulates the GObject - connection mechanism in Python so that we can remove dependencies - on GLib in more places. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/test_common_signals.py: Tests for SignalMixin. - - * bin/flumotion-manager.in: Don't install the gtk2reactor, we can - use the selectreactor. - - * flumotion/worker/job.py (CheckJobHeaven.__init__): Keep a pool - of idle jobs for running checks. - (CheckJobHeaven.getCheckJobFromPool): New function, tries to reuse - an idle job instead of starting a new one every time. - (CheckJobHeaven.runCheck.haveJob.haveResult): Don't kill the job - right when it finishes; keep it around for a while in case we want - to run another check on it. Makes the wizard fast again. - -2007-07-27 Michael Smith - - * flumotion/extern/log/log.py: - Fix0r pychecker stuff broken by coloured-logs code. - -2007-07-26 Zaheer Abbas Merali - - * scripts/output-feed (usage, gotFeed, main): - Add raw ghetto script (now using optparse) to connect to a - feeder on a component running in a job. - -2007-07-25 Arek Korbik - - * flumotion/component/consumers/disker/disker.py - (Disker._plug_recording_started, Disker._plug_recording_stopped): - Add plug socket checks, fixes #730. - -2007-07-25 Andy Wingo - - * flumotion/worker/main.py (main): Don't log our GStreamer - version; we don't use GStreamer. - - * flumotion/worker/medium.py (WorkerMedium.remote_checkElements) - (WorkerMedium.remote_checkImport): Run the new bundled functions - instead of the in-process workerbrain functions. Fixes #667. - - * flumotion/worker/worker.py (WorkerBrain): Don't import - gstreamer. Remove in-process check methods. - - * flumotion/worker/checks/check.py (checkImport, checkElements): - Moved here, out of the worker brain. - - * flumotion/common/boot.py (boot): Always monkeypatch the reactor, - even when not installing it. - - * bin/flumotion-worker.in: Don't import gtk or gstreamer. - - * flumotion/job/job.py (JobMedium.remote_bootstrap): Allow - operation without an authenticator. - (JobMedium.remote_runFunction): New remote method, used to run - checks on behalf of the worker. - - * flumotion/worker/medium.py (WorkerMedium.remote_runCheck): - Rename from runFunction, but keep the old alias. Dispatch to the - brain instead of running the function directly. - - * flumotion/worker/base.py (JobProcessProtocol.__init__): Use - getWorkerName accessor. - - * flumotion/worker/job.py (ComponentJobAvatar) - (ComponentJobHeaven): New avatar and heaven for checks. Runs - checks in job processes. See #667. - - * flumotion/worker/worker.py (WorkerBrain.__init__) - (WorkerBrain.listen, WorkerBrain.shutdownHandler): Make a - checkHeaven, running alongside the heaven for jobs that start - components. - (WorkerBrain.runCheck): New function, fetches bundles, then asks - the checkHeaven to run a check. - -2007-07-25 Michael Smith - - * flumotion/worker/base.py: - Add an assertion to ensure that we aren't allowing duplicate logins - in the worker heaven. - -2007-07-25 Zaheer Abbas Merali - - * flumotion/component/bouncers/bouncer.py (Bouncer.hasKeycard, - Bouncer.generateKeycardId, Bouncer.addKeycard): - Split out keycard id generation from keycard addition. Useful - for when a bouncer does not want to store keycards. - -2007-07-24 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py - (SingleSwitch.switch_to, AVSwitch.switch_to, - AVSwitch._check_start_times_received): - Trivial reject for switching before pipeline configured. - -2007-07-25 Andy Wingo - - * flumotion/common/debug.py (UncollectableMonitor): New helper - object, monitors for uncollectable objects without requiring - pysizer. - -2007-07-24 Andy Wingo - - * flumotion/extern/Makefile.am (log_PYTHON): Dist/install log.py's - new termcolor file. - -2007-07-24 Michael Smith - - * flumotion/component/feedcomponent010.py: - Some fixes to PadMonitor code. Including making it threadsafe with - nasty trickery. - * flumotion/test/test_feedcomponent010.py: - Unit tests for PadMonitors. - -2007-07-24 Andy Wingo - - * flumotion/component/feed.py (FeedMedium.stopConnecting): Drop - any remote reference, just in case. - (FeedMedium._doFeedTo): Drop the remote reference after the pb - handshaking is finished and the transport is closed. Fixes - uncollectable object leaks when reconnecting feeds. - - * flumotion/common/debug.py (AllocMonitor.analyze) - (AllocMonitor._printCycle, AllocMonitor._printParents) - (AllocMonitor._printKids): More informative printing of object - cycles. - - * flumotion/test/test_component_feed.py (TestUpstreamFeedClient): - Add assertions regarding the state of the feedmedium's reference - to the RemoteReference. - -2007-07-24 Michael Smith - - * flumotion/component/feedcomponent010.py: - Don't call twisted reactor methods from non-reactor threads. - -2007-07-24 Michael Smith - - * flumotion/component/feedcomponent010.py: - Generalise the eater probes/data flow checks as a PadMonitor class, - so that other components can use it on other parts of a pipeline. - Partially (not yet fully) move the eater checks over to using it. - -2007-07-23 Andy Wingo - - * flumotion/common/debug.py (AllocMonitor): New object, uses - PySizer (http://pysizer.8325.org/) to periodically monitor the - python heap and print out information about allocations. - - * flumotion/test/test_common_netutils.py - (TestRoutingTable.testRouteNamesOrder): New test, that - getRouteNames() returns the names in the order in which they are - first seen by the routing table. - -2007-07-23 Zaheer Abbas Merali - - * flumotion/component/producers/playlist/playlist.py - (PlaylistProducer._buildAudioPipeline): - Force output audio to be 16bit width and depth. - -2007-07-23 Pedro Gracia - - * flumotion/admin/gtk/client.py: - Reverted changes from ticket #293. It's useful to stop - components with mood different to 'happy'. - -2007-07-23 Arek Korbik - - * flumotion/test/Makefile.am: - * flumotion/test/pond.py: - * flumotion/test/comptest.py: - * flumotion/test/test_pond.py: - * flumotion/test/test_comptest.py: - Rename 'Pond' -> 'ComponentTestHelper'. - -2007-07-23 Arek Korbik - - * flumotion/test/pond.py: - Fix component clock synchronization and startup dealy code; turn - some callback functions into less implicit helper functions. - - * flumotion/test/test_pond.py: - Add tests for providing clocking info and for startup delays, - remove redundant/useless tests, fix spelling, replace unclear - callbacks. - -2007-07-20 Pedro Gracia - - * flumotion/admin/gtk/client.py: - Closed ticket #293 - -2007-07-20 Arek Korbik - - * flumotion/test/pond.py (Pond.set_flow): - Don't use 9 lines of code where 1 is enough. - -2007-07-20 Arek Korbik - - * flumotion/test/pond.py (ComponentWrapper.get_unique_name, - Pond.do_stop, Pond.stop_flow): - Don't use language elements not available in python2.3. - -2007-07-20 Arek Korbik - - * flumotion/test/pond.py: - * flumotion/test/test_pond.py: - * flumotion/test/Makefile.am: - Add a component test helper class. - -2007-07-20 Pedro Gracia - - * flumotion/wizard/steps.py: - Webcam sizes are displayed ordered in its wizard step. - -2007-07-19 Michael Smith - - * flumotion/common/planet.py: - We permit stopping a lost component in the manager (and in the - admin). Change the moods.can_stop() predicate to match; it's used in - flumotion-command (and private modules). - -2007-07-19 Michael Smith - - * flumotion/component/feedcomponent010.py: - Fix Thomas's untested and broken message changes. - -2007-07-19 Michael Smith - - * flumotion/manager/depgraph.py: - Don't execute things that are already set to true when progressing - through the depgraph. - * flumotion/manager/manager.py: - When a happy running component logs back in, set things in the - depgraph in reverse order to avoid trying to restart it. - -2007-07-19 Michael Smith - - * flumotion/manager/manager.py: - When a component reconnects that is already happy, clear - moodPending. It probably turned happy while it was disconnected. - -2007-07-18 Michael Smith - - * flumotion/component/feed.py: - Call up to the right superclass. - - * flumotion/manager/component.py: - When looking for other components to connect feeders to, only - consider components that are fully logged in (i.e. where - componentAvatar.componentState != None). - - Fixes #699 - components going sad when starting multiple components - at the same time. - -2007-07-18 Michael Smith - - * flumotion/manager/component.py: - Import twisted.internet.error as terror, use terror where there's a - local function called error. - - * flumotion/manager/depgraph.py: - Add a comment. - -2007-07-18 Michael Smith - - * flumotion/manager/depgraph.py: - Add some comments, simplify a bit of code. - -2007-07-18 Michael Smith - - * flumotion/test/test_manager_depgraph.py: - * flumotion/test/test_manager_manager.py: - Fix up testsuite for depgraph changes. - -2007-07-18 Michael Smith - - * flumotion/manager/depgraph.py: - Remove Feeder, Eater classes, which are unused. - Make state dict contain a callable as well as a boolean for each DAG - node. - All methods that add a node now get passed a callable as well. - Remove whatShouldBeStarted entirely. - On _setState(True), call appropriate down-graph callables, if we - can. - All actions needed by the depgraph are now directly driven from the - depgraph code. - * flumotion/manager/component.py: - Remove tryWhatCanBeStarted. Split the individual things out into - separate methods. These are used as callables in the depgraph now. - * flumotion/manager/manager.py: - Changes for depgraph API additions. - - Fixes #691. - -2007-07-12 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - Break up a translatable string so we reuse an existing one. - -2007-07-12 Thomas Vander Stichele - - * po/POTFILES.in: - Add feedcomponent010.py which contains translatable strings. - -2007-07-12 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - Translatable strings with more than one variable need to be done - with a dict so translators can change ordering of strings. - Clean up some > 80 character lines. - Fix instances of "Failed to Stop component" - -2007-07-12 Thomas Vander Stichele - - * data/glade/greeter-start_new_error.glade: - * data/glade/greeter-start_new_success.glade: - Set visible to False. This fixes the "two small windows are - popping up when flumotion-admin starts" problem. I have no idea - why it's fine for all the other steps' glade files to have this - set to True, but it seems it is. - -2007-07-12 Thomas Vander Stichele - - * common/common.mk: - Put coverage in _trial_coverage so other trial runs don't - remove the expensive coverage data. - -2007-07-12 Thomas Vander Stichele - - * flumotion/admin/gtk/main.py: - Add a FIXME. - * flumotion/admin/gtk/wizard.py (Wizard, Wizard.finished): - Hide when we're finished. - * flumotion/test/test_greeter.py (WizardTest.testGreeter): - * flumotion/test/test_ui_fgtk.py (VUTest.testWidget): - * flumotion/test/test_parts.py (TestAdminStatusbar.tearDown, - TestComponentsView.tearDown): - iterate the main context to make sure windows unmap during tests - * flumotion/test/gtkunit.py: - remove an unused method - -2007-07-12 Michael Smith - - * flumotion/component/feedcomponent010.py: - When switching fd for fdsrc in feed component pipelines, remove the - element from its parent rather than the toplevel pipeline. - Fixes components that put the source elements in a bin. - -2007-07-11 Michael Smith - - * flumotion/component/base/http.py: - Don't accept a keycard with an id that's already in use. - -2007-07-10 Arek Korbik - - * flumotion/launch/inspect.py: - Add printing of plugs' property description strings and - right-align the property names. Fixes #717. - -2007-07-10 Michael Smith - - * flumotion/worker/Makefile.am: - * flumotion/component/consumers/disker/Makefile.am: - Dist files added recently so that installed flumotion works again. - -2007-07-10 Michael Smith - - * flumotion/test/test_config.py: - Add a test that specifying a source for a component with no eaters - raises ConfigError. - -2007-07-09 Michael Smith - - * flumotion/common/config.py: - If a is specified for a component that has no eaters, raise - a ConfigError with an appropriate message. - - * flumotion/manager/manager.py: - If we fail to parse a config, call fail() instead of faile(), it - exists more. - Fixes #713. - -2007-07-06 Thomas Vander Stichele - - * flumotion/manager/depgraph.py: - Make the exception have correct text so I can follow what's going - on. - -2007-07-06 Arek Korbik - - * flumotion/component/consumers/disker/disker.py - (Disker.change_filename, Disker.stop_recording, - Disker._plug_recording_started, Disker._plug_recording_stopped): - Add disker plug hooks. Remove duplication of code of the - stop_recording() method. - - * flumotion/component/consumers/disker/disker_plug.py: - Add base class for disker plugs. - - * flumotion/component/consumers/disker/disker.xml: - Add disker plug registry entries. - -2007-07-04 Andy Wingo - - * flumotion/common/registry.py (RegistryDirectory._getFileLists): - Fix error caught by pychecker. - - * flumotion/worker/worker.py (WorkerBrain.__init__): Adapt to - jobheaven name change. - - * flumotion/worker/job.py (ComponentJobAvatar) - (ComponentJobHeaven): Implement a special avatar and heaven for - components. The intention is later to add analogs for checks run - by workers; see #667. - - * flumotion/worker/base.py (_getSocketPath, JobInfo) - (JobProcessProtocol, BaseJobHeaven, BaseJobAvatar): Factor some - bits out into a base class. - - * flumotion/common/config.py (parsePropertyValue): Allow native - bools and fractions, as we do with other types. Fixes #682. - -2007-07-04 Michael Smith - - * flumotion/component/base/watcher.py: - %f is not a filename specifier. Fix warning logging. - * flumotion/component/producers/playlist/playlist.py: - Don't throw KeyError when trying to unschedule something not - scheduled. Fixes #703. - -2007-07-04 Andy Wingo - - * flumotion/common/bundle.py (BundlerBasket.getDependencies): - Handle case where bundle has no dependencies. Fixes #665, finally. - -2007-07-04 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - Return item if we successfully scheduled it. - * flumotion/component/producers/playlist/playlistparser.py: - Unlink item from list if we failed to schedule it, so we don't have - stale entries that we can't clean up properly. - * flumotion/test/test_component_playlist.py: - Return item in FakeProducer as API now requires it. - -2007-07-04 Andy Wingo - - * flumotion/common/registry.py (RegistryDirectory.__init__) - (RegistryDirectory._getFileLists): Keep a list of dirs to watch as - well as files. Don't descend into .svn dirs. - (RegistryDirectory.rebuildNeeded): Check the dirs as well. - See #665. - -2007-07-04 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py - (Switch.switch_to_for_event, Switch.switch_to_cb): - switch_to can return a deferred or a boolean, so callback - on a maybeDeferred. Fixes pychecker warning of comparing to - False. - -2007-07-04 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/patternswitch.py - (PatternEventSwitcher.checkConfig): - Fix typo. - -2007-07-04 Andy Wingo - - * flumotion/common/fxml.py (Parser.checkAttributes): Remove - unnecessary call to str(). - (Parser.parseAttributes): Don't call str() always; instead allow - the caller to decide, while defaulting to the existing behavior. - Fixes #661. - -2007-07-04 Arek Korbik - - * flumotion/component/combiners/switch/switch.xml: - Fix misnamed dependency. - -2007-07-03 Zaheer Abbas Merali - - * flumotion/admin/admin.py (AdminModel.connection_failed): - connection_failed was being passed 3 arguments all the time, - so make it take 3! - -2007-07-03 Michael Smith - - * flumotion/common/config.py: - * flumotion/component/feedcomponent010.py: - Change comment to not say that is deprecated. It's not. - * flumotion/test/test_config.py: - has not been deprecated, rename test methods for clarity. - -2007-07-03 Pedro Gracia - - * po/es.po: updated spanish translation. - -2007-07-03 Zaheer Abbas Merali - - * conf/managers/default/flows/looper.xml: - * conf/managers/default/flows/ogg-test-theora.xml: - * conf/managers/default/flows/porter.xml: - Change examples to use new eater syntax. - -2007-07-03 Andy Wingo - - * flumotion/manager/manager.py (Vishnu.getBundlerBasket): If the - registry needs a rebuild, avoid scanning the directories twice. - - * flumotion/common/registry.py (RegistryDirectory.rebuildNeeded): - Change from lastModified, returns whether a directory needs a - rebuild. Catch OSError for missing files. Also see if the - directory mtime changed to catch new files. - (ComponentRegistry.rebuildNeeded): Check to see if the set of - paths changed, as well. - (ComponentRegistry._getRegistryPathsFromEnviron): New helper. - (ComponentRegistry.verify): Use rebuildNeeded(), as it does - everything we need. See #665. Fixes #641. - -2007-07-02 Andy Wingo - - * flumotion/admin/gtk/client.py (Window._clearMessages): Fix bug - when the manager goes away. - - * flumotion/component/base/scheduler.py (Event.__init__): Add some - assertions, and the ability to specify recur as a timedelta. - (Scheduler.addEvent): Document recur as timedelta. - - * flumotion/admin/rrdmon/config.py (ConfigParser._parseSource): - Require absolute filenames for . Add , - also required. Add docs. - - * flumotion/admin/rrdmon/rrdmon.py: Actually implement. Add docs. - Fixes #626. - - * conf/managers/default/flows/ogg-test-theora.xml: Fix up for The - Great Renaming. - - * conf/rrdmon/default.xml: Fix up; require . - -2007-07-02 Zaheer Abbas Merali - - * flumotion/admin/gtk/componentview.py - (ComponentView.object_active_to_inactive): - Keep compatibility with managers running older code. - -2007-07-02 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/patternswitch.py - (PatternEventSwitcher, PatternEventSwitcher.do_check, - PatternEventSwitcher.checkConfig, - PatternEventSwitcher.configure_pipeline): - Get the pad as the value stored is a string not a pad! - Validate the eater-with-stream-markers property value passed - in. - * flumotion/component/combiners/switch/switch.py - (Switch.switch_to_for_event): - Fix some stupid logic. - -2007-07-02 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/Makefile.am: - * flumotion/component/combiners/switch/patternswitch.py - (PatternEventSwitcher, PatternEventSwitcher.configure_pipeline, - PatternEventSwitcher._markers_event_probe): - * flumotion/component/combiners/switch/switch.xml: - New switch based component that switches based on patterns, similar - to how the disker starts and stops based on patterns. - * flumotion/component/combiners/switch/switch.py (Switch.eventStarted, - Switch.eventStopped, Switch.switch_to_for_event): - Share code switch_to_for_event between ical event switching and - "other" event based switching like pattern based. - -2007-06-28 Michael Smith - - * flumotion/worker/job.py: - Make killJob work again by using the right variable. Jobs can now - again be killed from the admin. - -2007-06-28 Zaheer Abbas Merali - - * flumotion/manager/manager.py (Dispatcher.setBouncer): - Fix docstring. - -2007-06-28 Zaheer Abbas Merali - - * flumotion/manager/manager.py (Dispatcher.__init__, - Dispatcher.setBouncer, Dispatcher._bouncerLogout, - Dispatcher.bouncerResponse, Dispatcher.bouncerError, - Dispatcher.removeAvatar, Vishnu.__init__, Vishnu.setBouncer): - * flumotion/twisted/portal.py: - Just set bouncer in dispatcher not the portal and move logout to - the dispatcher. - Addresses #696. - -2007-06-28 Michael Smith - - * flumotion/worker/worker.py: - Don't run the shutdown handler twice, as it tracebacks if we do so. - Fixes #697. - -2007-06-27 Andy Wingo - - * configure.ac: - * conf/rrdmon/default.xml: - * bin/Makefile.am (bin_SCRIPTS): - * bin/flumotion-rrdmon.in: - * flumotion/admin/Makefile.am: - * flumotion/admin/rrdmon/config.py: - * flumotion/admin/rrdmon/main.py: - * flumotion/admin/rrdmon/Makefile.am: - * flumotion/admin/rrdmon/rrdmon.py: - * flumotion/admin/rrdmon/__init__.py: Add scaffolding for a daemon - that can monitor components' UIState keys, logging them to an RRD - file. - - * flumotion/admin/multi.py (MultiAdminModel.removeListener): New - method. - (MultiAdminModel._managerConnected) - (MultiAdminModel._managerDisconnected): New internal methods. - Listen for reconnections. Fixes #664. - (MultiAdminModel.addManager): Refactor to use the admin's deferred - connection interface. This shows that the interface is sufficient. - Fixes #621. - (MultiAdminModel.removeManager): Remove reconnection signals, and - treat the manager as disconnected immediately. No need to use - deferred stops. - - * flumotion/test/test_admin_multi.py (MultiAdminTest): Use - TestCaseWithManager. - (MultiAdminTest.testConnectSuccess) - (MultiAdminTest.testConnectFailure) - (MultiAdminTest.testReconnect): Add tests. - - * flumotion/test/common.py: - * flumotion/test/test_admin_admin.py: Move the TestCaseWithManager - to common.py. - -2007-06-27 Michael Smith - - * flumotion/component/feedcomponent010.py: - != != == - -2007-06-27 Zaheer Abbas Merali - - * flumotion/manager/manager.py (Dispatcher.__init__, - Dispatcher.setBouncerPortal, Dispatcher.removeAvatar, - Vishnu.__init__): - Pass bouncer portal to Dispatcher instead of Vishnu. - Check for existence of portal and bouncer before calling - logout, fixes test where there is no bouncer. - -2007-06-27 Michael Smith - - * flumotion/component/feedcomponent010.py: - Pacify commentfascist. - -2007-06-27 Michael Smith - - * flumotion/component/feedcomponent010.py: - Don't accept file descriptors for feeders unless we've actually - started the pipeline (READY or above). - -2007-06-27 Andy Wingo - - * flumotion/manager/component.py - (ComponentAvatar.getEatersForFeeder): Pacify pyfascist. - - * flumotion/test/test_admin_admin.py (AdminTest.testReconnect): - New test. Nifty! - - * flumotion/admin/admin.py (AdminModel.connectToManager): Some - fixes to the deferred connection interface such that it respects - keepTrying. The bit about keepTrying=True doesn't have tests yet - though. See #621. - (AdminModel.shutdown): Cancel the pending deferred connect, if - there is one. - - * flumotion/common/errors.py (ConnectionCancelledError): New - error. - - * flumotion/test/test_admin_admin.py (TestCaseWithManager.setUp) - (TestCaseWithManager.tearDown): Add foo such that twisted - exceptions don't cause errors. A better solution would be nice. - (AdminTest.testConnectSuccess, AdminTest.testConnectFailure): New - tests for the deferred connection interface. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/test_admin_admin.py: New test, not quite fleshed - out yet. - - * flumotion/manager/manager.py (Vishnu.shutdown): New method, - mostly for test cases. - -2007-06-27 Zaheer Abbas Merali - - * flumotion/manager/manager.py (Dispatcher.__init__, - Dispatcher.cleanup, Dispatcher.removeAvatar, Vishnu.__init__): - * flumotion/twisted/portal.py (BouncerPortal.logout): - Remove keycards from manager bouncer when clients disconnect - from manager. Fixes #688. - -2007-06-27 Andy Wingo - - * flumotion/admin/admin.py - (AdminModel.connectToManager.disconnected): Handle one case in - which the returned deferred would not get fired. See #621. - -2007-06-26 Andy Wingo - - * flumotion/worker/job.py: Rename the _deferredStarts member to - _startSet. - (JobProcessProtocol.__init__): Finish some renaming. - (JobProcessProtocol.processEnded): Port to startSet. This code is - pretty hacky. - (DeferredStartSet): Remove, replaced with the code in startset. - (JobHeaven.__init__, JobHeaven.spawn, JobAvatar.setMind.success) - (JobAvatar.perspective_cleanShutdown): Port to startset. Fix one - part of [5207] that didn't get rolled back. Fixes #620. - - * flumotion/common/startset.py (StartSet.createRegistered): Commit - a similar fix to the startset as the one Mike just committed to - the copy in worker/job.py. - -2007-06-26 Michael Smith - - * flumotion/manager/manager.py: - If a component with no manager-side state and no config logs in, - just immediately tell it to shut down and then disconnect it. - We can't possibly do anything useful with it other than this, and - the previous approach (creating a fake config) didn't handle it - right. - Fixes a private bug. - -2007-06-26 Michael Smith - - * flumotion/worker/job.py: - Back out most of r5207, which didn't work right (it left stale - processes around). - Replace with a simpler patch that correctly handles restarting - components without temporarily making them sad. - -2007-06-26 Christian Schaller - - * data/91-flumotion-device-policy.fdi: Add - policy file for HAL correct set device access - -2007-06-26 Andy Wingo - - * flumotion/manager/component.py (ComponentAvatar.getEaters): - Return just the list of eater names. - (ComponentAvatar.getFeedersForEater): New function, returns a list - of remote feedIds to which an eater should connect. - (ComponentAvatar.getFeeders, ComponentAvatar.getEatersForFeeder): - Likewise for feeders, although getting eaters for feeders is more - expensive. See #694. - (ComponentHeaven._connectEaterUpstream) - (ComponentHeaven._connectEaters) - (ComponentHeaven._connectFeeders) - (ComponentHeaven._connectFeederDownstream) - (ComponentHeaven._startComponent): Break startComponent into its - pieces. - (ComponentHeaven._setupComponent): Remove some now-unnecessary - code. - - * flumotion/test/test_manager_manager.py - (testComponentEatersEmpty): Remove test of removed internal method. - -2007-06-26 Sebastien Merle - - * flumotion/twisted/flavors.py (StateRemoteCache._notifyListeners): - None was used as logging category, and it's not supported. - -2007-06-26 Christian Schaller - - * data/flumotion-admin.desktop.in: Update Categories according to - these instructions: - http://live.gnome.org/GnomeGoals/ApplicationCategory - correct set device access - -2007-06-26 Andy Wingo - - * flumotion/test/test_component_feed.py (FeedTestCase): Split - fixture out into base class. - (TestUpstreamFeedClient): Rename from TestFeedClient so we can - test downstream connections in a separate class. - - * flumotion/component/feedcomponent.py - (FeedComponentMedium._getAuthenticatorForFeed): New helper. - (FeedComponentMedium.connectEater): Attempt to identify ourself to - the remote side with our fullFeedId, if possible. - - * flumotion/twisted/pb.py (RemoteAuthenticator.copy): New method, - mostly useful if you want to log in with different avatarIds, as - is the case for component eaters into a remote feedserver. - - * flumotion/component/feedcomponent010.py - (FeedComponent._reconnectEater): Don't reconnect if we don't have - a medium, as in flumotion-launch. Fixes #616. - -2007-06-25 Zaheer Abbas Merali - - * flumotion/component/producers/firewire/firewire.py - (Firewire.get_pipeline_string): - * flumotion/component/producers/firewire/firewire.xml: - Add dv feeder for firewire. Uses patch from #632 with - modification. - Fixes #632. - -2007-06-25 Andy Wingo - - * flumotion/manager/component.py - (ComponentAvatar._mindPropertyErrback) - (ComponentAvatar.reloadComponent._reloadComponentErrback): - * flumotion/common/boot.py (boot): - * flumotion/configure/installed.py.in (get): - * flumotion/configure/uninstalled.py.in (get): - * flumotion/twisted/flavors.py (StateRemoteCache.addListener): Fix - the fixes. - - * flumotion/manager/component.py - (ComponentAvatar._mindPropertyErrback) - (ComponentAvatar.reloadComponent._reloadComponentErrback): - * flumotion/component/producers/screencast/screencast.py - (Screencast.get_pipeline_string): - * flumotion/admin/admin.py (AdminModel._callRemoteErrback): - * flumotion/common/boot.py (boot): - * flumotion/common/common.py (daemonize): - * flumotion/twisted/flavors.py (StateRemoteCache.addListener): - * flumotion/configure/uninstalled.py.in: - * flumotion/configure/installed.py.in: Use safeprintf instead of - print everywhere it can be called from a daemonized process. - Fixes #613. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.check_properties): Change to implement - check_properties instead of do_check. - - * flumotion/component/component.py (BaseComponent.do_check): By - default, call the check_properties vmethod. - (BaseComponent.check_properties): New vmethod. - (BaseComponent.setup): Rearrange some code; no semantic change. - - * doc/random/component-initialization-protocol (check_properties): - New vmethod. Fixes #605. - -2007-06-25 Arek Korbik - - * flumotion/component/consumers/disker/disker.py - (Disker.configure_pipeline, Disker._markers_event_probe, - Disker._on_marker_stop, Disker._on_marker_start): - * flumotion/component/consumers/disker/disker.xml: - Make disker able to react to stream markers, take 2. - -2007-06-25 Andy Wingo - - * flumotion/component/base/admin_gtk.py (BaseAdminGtk.cleanup): - Set uiState to None when we stop listening. - (BaseAdminGtkNode.__init__, BaseAdminGtkNode.gotUIState) - (BaseAdminGtkNode.render): Fix bug that could cause cleanup() to - raise an exception, corrupting the state of the GTK+ UI. - - * flumotion/admin/gtk/componentview.py - (ComponentView.get_widget_constructor): Rewrite to not be a - defgen. - (ComponentView.object_inactive_to_active.got_widget_constructor) - (ComponentView.object_active_to_inactive): Increment callstamp - when going to inactive, so we can simplify the check in - got_widget_constructor. Add an assertion in got_widget_constructor - that we don't already have a widget. - -2007-06-25 Michael Smith - - * flumotion/component/feedcomponent010.py: - Revert an accidental commit from some days ago. - -2007-06-25 Zaheer Abbas Merali - - * flumotion/admin/gtk/componentview.py - (ComponentView.object_active_to_inactive): - widget in componentview can either be a gtk.Label or a - NodeBook object. Handle case where it is not a NodeBook - on removal of widget. - Fixes #687. - -2007-06-25 Andy Wingo - - * flumotion/manager/main.py: Pacify pyfascist. - - * flumotion/component/producers/looper/looper.py - (Looper.make_message_for_gstreamer_error): Make a nicer error if - we can. - - * flumotion/component/feedcomponent010.py - (FeedComponent.make_message_for_gstreamer_error): New public, - overridable method. - (FeedComponent.bus_message_received_cb): Call - make_message_for_gstreamer_error so that components can give more - informative messages. Fixes #598. - - * doc/random/component-initialization-protocol: Add documentation - for make_message_for_gstreamer_error. - - * conf/managers/default/flows/looper.xml: Update for the great - renaming. - - * flumotion/manager/main.py (_initialLoadConfig): No more need to - catch errors and print here, as flumotion.manager.manager does the - right thing now. - - * flumotion/manager/manager.py - (Vishnu.loadComponentConfigurationXML): Set a file-specific - message ID if the configuration is being loaded from a file. Catch - UnknownComponentError, adding a message for that case, and generic - exceptions as well. - - * flumotion/admin/gtk/client.py (Window.setPlanetState): Show any - planet messages as soon as we have the planet state. - - * flumotion/component/feedcomponent010.py - (Feeder.clientDisconnected): Pass the fd being disconnected to the - client. - (FeederClient.connected): If we already have an FD, process the - UIState as if the old one had disconnected. - (FeederClient._updateUIStateForDisconnect): Factored out of - disconnect(). - (FeederClient.disconnected): Add FD argument. Only update the UI - state if the fd being disconnected is the "current" one. - Fixes #591. - -2007-06-24 Thomas Vander Stichele - - * flumotion/extern/log/log.py: - Fix epydoc warnings. - -2007-06-23 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.glade: - Fix HIG breakage done by Mike. - -2007-06-21 Zaheer Abbas Merali - - * flumotion/admin/command/commands.py (do_invoke, do_workerinvoke): - Run quit function (callLater of reactor.stop) in error cases where - we yield None. - Catch invokes on components that are not started and so manager sends - us SleepingComponentError. - -2007-06-20 Andy Wingo - - * flumotion/component/feedcomponent010.py - (FeedComponent._reconnectEater, FeedComponent.do_setup) - (FeedComponent.init): No longer any need for lastConnectD, which - was badly named anyway. - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.connectEater): Simplify via use of the - FeedMedium's requestFeed, which is actually tested. As a new - feature, cancel any pending connection before starting a new one. - - * flumotion/wizard/steps.py (Overlay.worker_changed_010): Fix so - as to allow the user to proceed without PIL. We should use cairo - instead, but whatevs... - -2007-06-20 Michael Smith - - * flumotion/manager/manager.py: - If a component without config logs into the manager, add - 'clock-master' and 'plugs' into the synthesised config we give it. - Should prevent KeyError: 'plugs' if someone/something tries to start - it (though starting it will still fail), and the clock-master will - prevent an exception being thrown that stops logout from completing - cleanly (which means that stopping the component doesn't work). - -2007-06-20 Andy Wingo - - * flumotion/component/producers/webcam/admin_gtk.py - (component_effectPropertyChanged): - * flumotion/component/producers/bttv/admin_gtk.py - (component_effectPropertyChanged): - * flumotion/component/feedcomponent010.py (effectPropertyChanged): - Remove, the property change notifications now go through UI - states. - -2007-06-20 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py - (Disker.change_filename): - Add extensions for flv and ts. - -2007-06-20 Andy Wingo - - * flumotion/component/feedcomponent010.py (FeedComponent.init): - s/ as and when available//, thank Jeebus. - - * flumotion/manager/main.py (main): Parse all files for manager - config, not just the first one. - -2007-06-20 Michael Smith - - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - Start manager plugs once the reactor is running, as we used to. - -2007-06-19 Michael Smith - - * flumotion/worker/job.py: - Fix call to killJobByPid() - -2007-06-19 Zaheer Abbas Merali - - * flumotion/component/producers/screencast/screencast.py - (Screencast.get_pipeline_string): - Force damage use to be false because it is broken and - was probably always. - -2007-06-19 Michael Smith - - * flumotion/job/job.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - Make the worker tracks jobs by PID, not avatarId, because avatarId - isn't unique when restarting components. - Fixes #683. - -2007-06-19 Andy Wingo - - * configure.ac: - * flumotion/component/producers/Makefile.am (SUBDIRS): - * flumotion/component/producers/screencast/Makefile.am: - * flumotion/component/producers/screencast/__init__.py: - * flumotion/component/producers/screencast/screencast.xml: - * flumotion/component/producers/screencast/screencast.py: Add new - producer, screencast-producer. See #579. - -2007-06-19 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py (Switch.cb, - AVSwitch.do_check, AVSwitch.checkConfig, - AVSwitch.get_pipeline_string): - * flumotion/component/combiners/switch/switch.xml: - Add caps properties to the audio video switchers so that - they force both master and backup streams going into the - switch elements to be of same caps. - -2007-06-19 Zaheer Abbas Merali - - * flumotion/component/producers/videotest/videotest.py - (VideoTest.get_pipeline_string): - * flumotion/component/producers/videotest/videotest.xml: - Force the src caps to have a pixel-aspect-ratio. - This is needed for any downstream component that wants - to videoscale to pixel aspect ratio 1/1. It is a workaround - for a GStreamer bug in videoscale that currently has no - resolution date. - -2007-06-19 Andy Wingo - - * flumotion/manager/manager.py - (Vishnu.loadComponentConfigurationXML): Add a message to the - planet state if the config XML fails to parse. Fixes #578. - - * conf/managers/default/flows/porter.xml: Fix up for The Great - Renaming. - -2007-06-19 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/admin_gtk.py - (SwitchingNode.stateSet): - Pass the actual signal id not the dict :) - -2007-06-19 Andy Wingo - - * flumotion/admin/gtk/componentview.py (NodeBook.__init__): Avoid - calling show_all in a way that would unconditionally show - admin/gtk contents. Fixes #575, I think, although that bug was - filed when the code was significantly different. - - * flumotion/test/test_manager_manager.py: Import common, so that - we set up logging &c. - (FakeWorkerMind.waitForComponentsCreate): New method, keeps track - of the deferreds returned from _loginComponent, so that later one - can wait for them all to be given avatars. - (TestVishnu._requestAvatar.got_result): Don't call - reactor.iterate. Fixes #569. - (TestVishnu.testConfigBeforeWorker.gotWorker) - (TestVishnu.testConfigAfterWorker.loadConfigAndOneWorker): Wait - for components to log in before verifying things. - (TestVishnu._logoutAvatar): Remove one more call to - reactor.iterate; fortunately this one seems superfluous. - - * flumotion/twisted/flavors.py (StateRemoteCache.addListener): Add - a note to remove this in 0.6. - - * flumotion/test/test_component_feed.py (TestFeedClient.tearDown): - * flumotion/test/test_pb.py - (Test_FPBClientFactory.flushUnauthorizedLogin): Avoid deprecated - log flush method for twisted 2.5. - -2007-06-18 Andy Wingo - - * flumotion/common/common.py (_acquirePidFile, writePidFile) - (daemonizeHelper): Open the PID file for writing before forking. - Fixes #558. - (_acquirePidFile): Hush pychecker. - -2007-06-18 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/admin_gtk.py - (SwitchingNode.__init__, SwitchingNode.stateSet): - Use signal blocks to stop extra remote calls unnecessarily. - -2007-06-15 Zaheer Abbas Merali - - * flumotion/admin/gtk/componentview.py - (ComponentView.object_active_to_inactive): - * flumotion/component/base/admin_gtk.py (BaseAdminGtk.__init__, - BaseAdminGtk.cleanup, BaseAdminGtkNode.__init__, - BaseAdminGtkNode.cleanup): - Actually remove the ui state listeners when removing admin - widgets. - Fixes #674 - -2007-06-15 Zaheer Abbas Merali - - * flumotion/component/base/scheduler.py: - Remove unused variables. - -2007-06-15 Zaheer Abbas Merali - - * flumotion/component/base/scheduler.py (ICalScheduler.parseCalendar): - Gracefully handled errors in parsing an event. - -2007-06-15 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/playlist/playlist.xml: - Configurable default pattern/wave for playlist. - -2007-06-15 Michael Smith - - * flumotion/manager/component.py: - Don't detach unattached avatars. - -2007-06-14 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/basicwatchdog.py - (SingleBasicWatchdog, SingleBasicWatchdog.eaterSetInactive, - SingleBasicWatchdog.eaterSetActive): - Fix SingleBasicWatchdog to actually work. - * flumotion/component/combiners/switch/switch.py - (Switch.eaterSetActive): - Use a platform-3 backportable way of figuring out if component - has started. - -2007-06-14 Zaheer Abbas Merali - - * flumotion/component/feedcomponent.py - (MultiInputParseLaunchComponent.get_pipeline_string): - * flumotion/component/feedcomponent010.py (FeedComponent.do_setup, - FeedComponent.parseEaterConfig): - Forward port from platform-3 of fix when upgrading managers - without restarting. - -2007-06-14 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py (Switch.cb): - * flumotion/component/consumers/disker/disker.py - (Disker.update_symlink, Disker._client_error_cb, - Disker.configure_pipeline): - Actually show warnings in admin ui when ical file is not - parsable and when ical file has been specified but the python - modules required are not installed on worker. - Fixes #671 - Fixes #670 - -2007-06-14 Zaheer Abbas Merali - - * flumotion/component/base/scheduler.py (Event.__init__, - ICalScheduler.parseCalendar): - Fix where we have a recurrence rule with dtstart/dtend with non - UTC timezone. - Fixes #673 - Fix debug statement. - -2007-06-13 Michael Smith - - * flumotion/admin/gtk/client.py: - Sort author names by surname, rather than mostly by first name but - with new people randomly added to the bottom. - Add Arek. - -2007-06-13 Andy Wingo - - * flumotion/component/base/eaters.glade: - * flumotion/component/base/feeders.glade: Fix some spacing issues; - unfortunately one of the things that we have lost is consistent - horizontal alignment between column 2 of different tables. - Something to fix in the future. But do not do so via reintroducing - homogeneous tables, that makes the page way too wide. See #540. - - * flumotion/component/base/admin_gtk.py - (FeedersAdminGtkNode.setFeederClientLastConnect) - (FeedersAdminGtkNode.setFeederClientLastDisconnect) - (FeedersAdminGtkNode.setFeederClientLastActivity) - (EatersAdminGtkNode._setEaterConnectionItem) - (EatersAdminGtkNode._setEaterConnectionItem) - (EatersAdminGtkNode._setEaterLastConnect): Use formatTimestamp so - that the timestamp isn't quite so wide. - - * flumotion/common/common.py (formatTimeStamp): New function, - formats a timestamp. - - * data/glade/admin.glade: Prevent irritating effect whereby - component UI can leave artifacts on the vpane's handle. - - * flumotion/admin/gtk/client.py (Window.admin_disconnected_cb): - Disconnect from the planet state, clear messages, and clear the - component list when we disconnect, not when we reconnect. Fixes - #520 and similar. - - * flumotion/twisted/flavors.py - (StateRemoteCache._notifyListeners): Warn if an exception is - raised in a StateCache handler. Fixes #512. - -2007-06-13 Michael Smith - - * flumotion/manager/manager.py: - Raise appropriate exceptions rather than KeyError or AttributeError - when invoking remote methods on already-deleted components. - Raise a more specific exception type when trying to stop a component - that is already stopped. - Fixes #652, #653, #654. - -2007-06-13 Andy Wingo - - * flumotion/test/test_component_base_scheduler.py - (SchedulerTest.testSimple): Add test. - - * flumotion/component/base/scheduler.py (Event.__repr__): Add a - nice repr. - (EventStore): New class inheriting from AVLTree, warns when an - identical event is added instead of throwing an exception. - (Scheduler.replaceEvents): Use EventStore rather than the base - AVLTree. - - * flumotion/admin/gtk/client.py (Window.__init__) - (Window._setAdminModel, Window._create_ui, show_component) - (_instanceSetup, _setupCallback, _setupErrback) - (_nodeRenderCallback, _nodeRenderErrback) - (_setCurrentComponentCallback, Window.stateSet) - (_component_view_set_widget, _component_view_clear): - (Window.property_changed_cb, Window._remove_component): Remove - cruftiness! - (Window.admin_connected_cb) - (Window._components_view_has_selection_cb): Tell the component - view about the selected object. - - * flumotion/admin/gtk/Makefile.am (component_PYTHON): - * flumotion/admin/gtk/componentview.py: New file, pulled in from - f-g-c. Fixes #459, I think. - - * flumotion/admin/admin.py (AdminModel): Remove unused - component-property-changed signal. - - * data/glade/admin.glade: Use the componentview. - - * flumotion/common/bundle.py (Unbundler.unbundle): Write files - atomically. Fixes #373. - (Unbundler.unbundle): Er, fdopen with 'wb'. - - * flumotion/admin/admin.py (AdminModel.connectToManager): - * flumotion/job/job.py (JobMedium._createComponent): - * flumotion/worker/medium.py (WorkerMedium.startConnecting): - * flumotion/common/server.py (Server.startSSL): When asked to - listen or connect with SSL, first assert that it is available, so - that we get a common exception. Fixes #371. - - * flumotion/common/errors.py (NoSSLError): - * flumotion/common/common.py (assertSSLAvailable): New utility, - asserts that SSL is available, raising NoSSLError if that is not - the case. - -2007-06-12 Andy Wingo - - * flumotion/component/base/scheduler.py (Scheduler._eventStarted) - (Scheduler._eventStopped): Call eventStarted and eventStopped with - the whole event, not just the content. Fixes to match - documentation and the code in the disker. - - * flumotion/test/test_component_base_scheduler.py - (SchedulerTest.testSimple): Expect the events, not the content in - the event callbacks. - - * configure.ac: Only check for codegen things if we have the other - dependencies to build the trayicon (GTK and python.h). Now there - are no mandatory GTK+ checks, note that the pygtk one checks for - pygtk.py, a part of pygobject. Fixes #224. - -2007-06-12 Michael Smith - - * flumotion/component/bouncers/admin_gtk.py: - Don't use variables that don't exist in HTPasswd bouncer admin. - -2007-06-12 Andy Wingo - - * flumotion/component/producers/webcam/webcam.py - (Webcam.get_pipeline_string): (comment) - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.configure_pipeline): Add a message if we have - to reduce the client limit, fixes #214. - - * flumotion/wizard/steps.py (HTTP): Hook up the checkbuttons to - spinbutton sensitivity, and only save limits if the checkbuttons - were on. - - * data/glade/wizard_http.glade: Add checkbuttons beside user-limit - and bandwidth-limit. Bandwidth limiting defaults to off. Default - to a user limit of 500 to avoid rlimit issues. - -2007-06-12 Zaheer Abbas Merali - - * flumotion/component/component.xml: - I am stupid, I added combiners twice. - -2007-06-12 Zaheer Abbas Merali - - * flumotion/component/component.xml: - Bundle combiners. - -2007-06-11 Andy Wingo - - * flumotion/admin/command/commands.py (do_workerinvoke): Add new - command, invokes a function on a worker. - (do_workerinvoke): Fixor. - -2007-06-11 Michael Smith - - * flumotion/component/misc/httpfile/file.py: - Add a debug statement to help track down unexpected/unexplained - exceptions in logs. - -2007-06-11 Michael Smith - - * flumotion/twisted/fdserver.py: - Add more colon for Dirty Andy. - -2007-06-11 Michael Smith - - * flumotion/twisted/fdserver.py: - If we receive an unconnected socket, log this, close it, and return, - rather than passing something that won't work properly to the new - client. - -2007-06-11 Michael Smith - - * flumotion/component/base/http.py: - Don't return None from authentication errback; instead return the - failure. - * flumotion/component/consumers/httpstreamer/http.py: - Don't add an errback to the authentication remote call that - swallows the failure. - * flumotion/component/consumers/httpstreamer/resources.py: - Add an errback to prevent auth failures from reaching the logs as a - reactor traceback. - * flumotion/component/misc/httpfile/file.py: - As above. - -2007-06-08 Arek Korbik - - * flumotion/component/producers/bttv/admin_gtk.py (BTTVAdminGtk.setup): - Make sure setup() method returns a deffered. - -2007-06-08 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/basicwatchdog.py - (AVBasicWatchdog.eaterSetInactive, AVBasicWatchdog.eaterSetActive): - * flumotion/component/combiners/switch/switch.py (Switch.init, - Switch.cb, Switch.eventStarted, Switch.eventStopped, - SingleSwitch.configure_pipeline, AVSwitch.configure_pipeline): - Renamed startingEater to idealEater so the watchdog can know - which eater is the current one it should switch to when it comes - back online. - -2007-06-07 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/basicwatchdog.py - (SingleBasicWatchdog.eaterSetActive, - AVBasicWatchdog.eaterSetInactive, AVBasicWatchdog.eaterSetActive): - Add debug, check to see if component has started before switching - when eaters go inactive or active. - * flumotion/component/combiners/switch/switch.py (Switch.init, - Switch.switch_to, Switch.eventStarted, Switch.eventStopped, - Switch.do_pipeline_playing, AVSwitch.get_pipeline_string, - AVSwitch.configure_pipeline): - Add a flag that denotes whether component has started or not, used - in watchdogs. Fix calls to non-existant methods. Make identity - elements silent. - -2007-06-07 Zaheer Abbas Merali - - * flumotion/admin/gtk/client.py (Window._instanceSetup): - Fix bug where there is an exception in setup() of an - admin gtk, we instead always were outputting setup() - does not return a deferred. - -2007-06-07 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/basicwatchdog.py - (SingleBasicWatchdog.eaterSetActive): - Bad logic in SingleBasicWatchdog. Fixed. - * flumotion/component/combiners/switch/switch.py (Switch.eventStarted, - Switch.eventStopped, SingleSwitch.eaterSetActive, - AVSwitch._check_start_times_received, AVSwitch.eaterSetActive): - Finish off the deferred firing and callback on response to ical - events. - Untested! - -2007-06-07 Michael Smith - - * flumotion/component/producers/playlist/playlistparser.py: - Handle non-ascii filenames properly. Assumes a UTF-8 filesystem. - -2007-06-07 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py (Switch.init, - SingleSwitch.configure_pipeline, SingleSwitch.eaterSetActive, - AVSwitch.configure_pipeline): - Add a set of deferreds and fire relevant ones when eater becomes - active for the SingleSwitch case. - Fix use of method name that has been renamed. - -2007-06-07 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/basicwatchdog.py - (SingleBasicWatchdog.eaterSetInactive, - SingleBasicWatchdog.eaterSetActive, AVBasicWatchdog.eaterSetInactive, - AVBasicWatchdog.eaterSetActive): - Use renamed method name. - -2007-06-06 Andy Wingo - - * flumotion/component/producers/webcam/webcam.py - (Webcam.get_pipeline_string): Support v4l or v4l2, depending on - element-factory. v4l2 currently does not work because the driver - needs to copy its buffers instead of having a limited set of mmap - buffers. - - * flumotion/worker/checks/video.py (checkWebcam.tryV4L2): Add - check for V4L2, only passes currently if you have CVS -good. - - * flumotion/component/producers/webcam/webcam.xml: Add optional - property, element-factory, defaulting to v4lsrc. - - * flumotion/worker/checks/video.py (checkWebcam.probeDevice): - * flumotion/wizard/steps.py (Webcam.run_checks) - (Webcam.get_state): Add probed element factory name to check. - -2007-06-06 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py (Switch.init, - Switch.cb, SingleSwitch.configure_pipeline, - AVSwitch.configure_pipeline): - If there are current events when we start, switch to correct - eater when starting component. Untested! - -2007-06-06 Andy Wingo - - * flumotion/component/consumers/disker/disker.py - (Disker.eventStarted, Disker.change_filename): When rotating from - ical, take the rotate time from the ical event. Incidentally this - time will be against the timezone specified in the ical file, - either local or UTC. Update comment to document this. Untested! - -2007-06-06 Michael Smith - - * flumotion/component/base/watcher.py: - Don't leak files that were seen changing but not stable, then - deleted. Remove code that deleted from the changing dict where it - wasn't possibly there. - -2007-06-06 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - Add a message to component state when we fail to parse a file. - Remove this message if we later re-parse the file, or it is deleted. - - * flumotion/component/producers/playlist/playlistparser.py: - Fix base directory handling for relative paths in playlist files. - Don't raise KeyError when a file is removed after parsing it failed. - -2007-06-06 Michael Smith - - * flumotion/component/base/watcher.py: - Don't mutate a dict we're iterating over; instead iterate over the - keys of the dict. - -2007-06-06 Zaheer Abbas Merali - - * flumotion/manager/manager.py (Vishnu.fixOldEaterConfig): - Only add an eater node in config if there are source nodes. - -2007-06-06 Zaheer Abbas Merali - - * flumotion/manager/manager.py (Vishnu.fixOldEaterConfig): - conf is a dict, don't use set! - Fix up the source node in the config correctly on newly - logging in components. - -2007-06-06 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/basicwatchdog.py - (AVBasicWatchdog.eaterSetInactive): - Use correct method name. - * flumotion/component/combiners/switch/switch.py (Switch.is_active, - SingleSwitch.configure_pipeline): - Change to use get_eater_name_for_feed_id. - Add some verbose debugging for seeing pads. - * flumotion/component/feedcomponent010.py - (FeedComponent.get_eater_name_for_feed_id): - Rename to get_eater_name_for_feed_id. - -2007-06-06 Andy Wingo - - * flumotion/worker/checks/video.py (checkWebcam): Erm, actually - work. - -2007-06-06 Zaheer Abbas Merali - - * flumotion/test/test_component_httpstreamer.py - (TestOldProperties.setUp): - Fix test to have a full feed id. - -2007-06-06 Zaheer Abbas Merali - - * flumotion/common/config.py (BaseConfigParser._parseFeedId, - BaseConfigParser.parseBool, BaseConfigParser._parseSource, - BaseConfigParser._parseEater): - Finish move of checking full feed id to the parser. - -2007-06-06 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py - (FeedComponent.get_eater_name_for_feedId): - Document new api for feedcomponent. - -2007-06-06 Andy Wingo - - * flumotion/worker/checks/video.py (checkWebcam): - * flumotion/wizard/steps.py (Webcam): - * data/glade/wizard_webcam.glade: Update to present discrete - choices rather than spinbuttons. - - Patch by: Sebastien Merle - - * flumotion/admin/gtk/parts.py: - * flumotion/admin/gtk/client.py: - * flumotion/launch/parse.py: - * flumotion/manager/manager.py: - * flumotion/manager/admin.py: - * flumotion/common/config.py: - * flumotion/test/test_config.py: - * flumotion/test/test_manager_manager.py: - The components can now have a human-readable guaranteed label, - which is set in the config dict. If not specified, no label will - be set in the dict. Fixes #658. - -2007-06-05 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py - (FeedComponent.parseEaterConfig): - Moved checking of full feed id to parser, so redundant. - * flumotion/test/test_component.py (TestParser.testOneSource, - TestParser.testOneSourceWithout, TestParser.testTwoSources, - TestParser.testTwoBoth): - Fix tests now that the component will not append :default - for you. - -2007-06-05 Zaheer Abbas Merali - - * flumotion/common/config.py (BaseConfigParser.parseFeedId): - Make sure feedIds stored in eater dict are proper feedIds. - * flumotion/manager/manager.py (Vishnu.parseFeedId, - Vishnu.fixOldEaterConfig, Vishnu.verifyExistingComponentState, - Vishnu.makeNewComponentState): - Move common code out to new function. Translate feedIds to proper - feedIds. - -2007-06-05 Zaheer Abbas Merali - - * flumotion/test/test_component.py (PipelineTest.__init__, - PipelineTest.config): - * flumotion/test/test_component_httpstreamer.py - (TestOldProperties.setUp): - * flumotion/test/test_manager_depgraph.py - (testDepGraph._createComponent): - Add source key back so that tests more accurately reflect reality - because parser adds this key. - -2007-06-05 Zaheer Abbas Merali - - * flumotion/component/converters/overlay/overlay.py - (Overlay.get_pipeline_string): - Fix to use eater dict. - * flumotion/component/muxers/multipart.py: - Port to MultiInputParseLaunchComponent, turns out this fixes - it to use eater dict. - -2007-06-05 Zaheer Abbas Merali - - * flumotion/manager/manager.py (Vishnu.verifyExistingComponentState, - Vishnu.makeNewComponentState): - Do not assume "default" as the eater name when building the - eater dict. Use flumotion.common.config.buildEaterDict to do the - actual building. - Also handle the other case where component logging in has no - eater dict in its config. - -2007-06-05 Zaheer Abbas Merali - - * flumotion/manager/manager.py (Vishnu.verifyExistingComponentState): - Handle case where logged in component has no eater dict in its - config but does have a list of source(s). Manager config is - changed to reflect component config + a generated eater dict - based from source list. - -2007-06-05 Andy Wingo - - * flumotion/component/base/scheduler.py (LocalTimezone): New - class, based on documentation of datetime.tzinfo. - (now): New function, like datetime.now() but returns a datetime - qualified against the local timezone. - (Event.__init__): Make a datetime against the local timezone. If - start or end times lack timezone info, log and interpret them as - being against the local timezone. - (Scheduler.addEvent, Scheduler.replaceEvents) - (Scheduler._reschedule): Make datetimes against the local - timezone. - - * flumotion/test/test_component_base_scheduler.py - (EventTest.testSimple, EventTest.testUpdateRecurring) - (EventTest.testComparison, SchedulerTest.testSimple): Use the new - scheduler.now(), which returns a datetime against the local - timezone. - (EventTest.testTimeZones): New test, tests that dates without - timezones are treated as local times. - -2007-06-04 Zaheer Abbas Merali - - * flumotion/component/misc/httpfile/httpfile.py: - Move fd arg to end of requestFinished. - -2007-06-04 Zaheer Abbas Merali - - * flumotion/component/misc/httpfile/httpfile.py: - Pass fd because loseConnection() may/will delete it. - -2007-06-04 Zaheer Abbas Merali - - * flumotion/component/misc/httpfile/httpfile.py: - Cleanup authentication dicts when a request ends. Fixes a big leak. - -2007-06-01 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/httpfile.xml: - Add support for configurable description to on-demand server as - well. - -2007-06-01 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.xml: - Add a description property (which the code already tries to use!) - -2007-06-01 Zaheer Abbas Merali - - * flumotion/component/bouncers/icalbouncer.xml: - * flumotion/component/consumers/disker/disker.xml: - Add base-scheduler dependency on the component bundles. - -2007-06-01 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py: - Add docs to how the filename strftime should work for - ical triggered events. - -2007-06-01 Zaheer Abbas Merali - - * flumotion/component/base/scheduler.py (Event.__init__, - Scheduler.addEvents, ICalScheduler.parseCalendarFromFile, - ICalScheduler.parseCalendar): - Fix debug statement. - Add new method addEvents that adds (and not replaces) events to the - scheduler. - Make parseCalendar return a list of events and not do the replace - just yet. - Make parseCalendarFromFile do the replace after running parseCalendar. - * flumotion/component/consumers/disker/disker.py - (DiskerMedium.remote_scheduleRecordings, Disker.configure_pipeline): - Fix regression of the remote method for scheduling additional - recordings. - -2007-06-01 Michael Smith - - * flumotion/component/misc/porter/porterclient.py: - * flumotion/twisted/fdserver.py: - When creating a new connection in a porter client, get the socket - peer address immediately. - Use this to respond to getPeer() later, more closely mirroring - tcp.Server's behaviour. - Fixes errors in httpfile client shutdown in some cases. - -2007-06-01 Zaheer Abbas Merali - - * flumotion/component/bouncers/icalbouncer.py (IcalBouncer.do_setup, - IcalBouncer.do_authenticate): - Port ical bouncer to new scheduling code. - - * flumotion/component/consumers/disker/disker.py - (Disker.configure_pipeline): - Fix typo. -2007-06-01 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py - (Disker._notify_caps_cb, Disker.configure_pipeline, - Disker.eventStarted, Disker.eventStopped): - Port of disker to new scheduling code. - -2007-05-30 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - Two serious bugs fixed: connected-clients in the uiState should be - the number of clients currently connected, so don't try to put the - entire connected_clients list in there. - Don't use the wrong (non-existing) variable for the number of bytes - written for a running connection. - -2007-05-30 Michael Smith - - * flumotion/worker/feedserver.py: - Thanks to Andy for pointing out that I forgot to actually commit the - change here: - Change to calling loseConnection() to drop the connection, since the - lambda trick only works with the selectreactor (not gtk2reactor). - -2007-05-29 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py (Switch.init, - Switch.cb, Switch.is_active, Switch.eventStarted, - Switch.eventStopped, AVSwitch.switch_to, AVSwitch._block_cb, - AVSwitch._block_switch_sink_pads): - * flumotion/component/combiners/switch/switch.xml: - Remove the code that waits for pad blocks to actually get called - back, was unnecessary and cannot work for cases where no data - gets transferred over some sink pads. - Add ical scheduling code, with some FIXMEs for later. - -2007-05-29 Andy Wingo - - * flumotion/component/base/scheduler.py (ICalScheduler.__init__): - Actually start the watcher. - - * flumotion/component/base/watcher.py (BaseWatcher.start): Add a - comment. - - * flumotion/component/base/scheduler.py (Scheduler._reschedule): - Only cancel the call if it hasn't been called yet. Fixes #650. - -2007-05-29 Michael Smith - - * flumotion/worker/feedserver.py: - This code only passes the testsuite because the testsuite runs with - a different reactor (selectreactor, rather than gtk2reactor). - Drop the connection in a more sensible way... - Prevents leaking all connections to the feed server (eek!) - -2007-05-29 Michael Smith - - * flumotion/manager/manager.py: - Don't remove messages we might not have added while we're still - proxying state from the remote side. - Fixes #582. - -2007-05-29 Andy Wingo - - * flumotion/test/test_manager_manager.py - (TestVishnu.testLoadComponent.loadProducerFromFile): Can I blame - Dirty Mike for this? - - * flumotion/launch/inspect.py (printMultiline): Clean up after - Dirty Mike. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/testLoadComponent.xml: Add forgotten file. - - * flumotion/manager/manager.py (Vishnu.loadComponent): Fix - cutnpaste. - -2007-05-29 Michael Smith - - * flumotion/launch/inspect.py: - Nicely format long descriptions. - Fixes #640. - -2007-05-29 Andy Wingo - - Patch by: Sebastien Merle - - * flumotion/manager/manager.py - (Vishnu._updateStateFromConf.checkNotRunning): Clear any - loadComponent messages here. - (Vishnu.loadComponent): New method, loads just one component. - Fixes #610. - - * flumotion/manager/admin.py - (AdminAvatar.perspective_loadComponent): New remote method for - admins, loads just one component. - - * flumotion/common/errors.py (ComponentWorkerConfigError): Remove - this error, it's not used any more. - - * flumotion/common/config.py - (ConfigEntryComponent._buildVersionTuple): Raise ConfigError - instead of ComponentWorkerConfigError. - - * flumotion/test/test_manager_manager.py - (TestVishnu.testLoadComponentWithSynchronization) - (TestVishnu.testLoadComponent.loadProducerFromFile): New tests for - loadComponent. - -2007-05-28 Andy Wingo - - * flumotion/manager/manager.py (Vishnu._addComponent): Only add a - version mismatch warning if versions are really incompatible. - (Vishnu._getComponentState.verifyExistingComponentState): If we - post a stale-config message, just post the conf differences, not - the entire dicts. - - * flumotion/common/common.py (checkVersionsCompat): New function, - checks if versions are compatible in the sense of being able to - use the same config files. - - * flumotion/manager/manager.py (Vishnu.addMessage): Change - prototype to perhaps be easier. - (Vishnu.addMessageObject): Fix typo. - (Vishnu._addComponent): Clear any loadComponent-related messages - for a component if we actually get to the point of calling - addComponent. - (Vishnu._updateStateFromConf): If, when loading a configuration, - we find that there is already a component running with this name, - warn the admin if the configurations are different without - modifying the manager's state. - (Vishnu.emptyPlanet): Clean all messages from the planet. - (Vishnu._startComponents, Vishnu._loadComponentConfiguration): No - need to pass conf in here. - -2007-05-28 Michael Smith - - * flumotion/ui/trayicon.py: - Connect to the correct callback in the tray icon's right click menu. - Fixes #633. - -2007-05-28 Michael Smith - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.glade: - * flumotion/component/consumers/httpstreamer/http.py: - Display current stream bitrate in addition to lifetime average - bitrate. - Fixes #636. - -2007-05-28 Andy Wingo - - * flumotion/test/test_config.py (TestDictDiff.testHumanReadable) - (TestDictDiff.testRecursive, TestDictDiff.testSimple): Testes. - - * flumotion/common/config.py (dictDiffMessageString, dictDiff): - Add some awesome functions for diffing dicts of dicts and other - things. - -2007-05-28 Zaheer Abbas Merali - - * flumotion/common/config.py (BaseConfigParser._parseEater): - Raise a ConfigError when an eater node is parsed without - child feed nodes. - -2007-05-28 Michael Smith - - * flumotion/component/feedcomponent010.py: - Make link() return a deferred that fires when the pipeline goes - playing; removes special-casing in statechange message handlers. - * flumotion/component/feedcomponent.py: - Now that link() returns a deferred, use that deferred. - * flumotion/component/consumers/httpstreamer/http.py: - If using a porter, don't go happy until we've logged in. - Fixes #537. - -2007-05-28 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Improve positioning of parentheses. - -2007-05-28 Michael Smith - - * flumotion/component/misc/porter/porter.py: - Use DeferredList correctly. - -2007-05-28 Andy Wingo - - * flumotion/manager/manager.py (Vishnu.addMessage) - (Vishnu.addMessageObject, Vishnu.clearMessage): New methods to add - messages to the manager's planet state. - - * flumotion/common/planet.py (ManagerPlanetState.__init__): Add - messages. - - * flumotion/admin/gtk/client.py (Window.setPlanetState): Listen to - planetState for messages from manager. - (Window.stateSet) - (Window._components_view_has_selection_cb.compSet) - (Window._components_view_has_selection_cb, Window._clearMessages): - Add hack so that after calling clear() on the messages view, that - we re-add manager messages. Yay flumotion-admin? - -2007-05-28 Zaheer Abbas Merali - - * flumotion/wizard/save.py (Component.toXML): - Fix wizard creation of new eater config syntax. - -2007-05-28 Andy Wingo - - * flumotion/test/test_common_messages.py - (SerializeTest.testDefaultMessageId): Add test that all messages - have IDs, not just those whose ID was specified explicitly. - - * flumotion/common/messages.py (Message.__init__): Document the id - attribute. If not given, construct a default ID from the - translatable. - (TranslatablePlural.defaultMessageId) - (TranslatableSingular.defaultMessageId): Implement a method to - determine a default message ID for messages made with this - translatable. - -2007-05-28 Michael Smith - - * flumotion/component/misc/porter/porter.py: - Oops; unbreak pychecker/buildbots. - -2007-05-28 Michael Smith - - * flumotion/component/misc/porter/porter.py: - Fix porter shutdown path for proper socket file removal. - -2007-05-28 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - Track the right deferred call, so we don't traceback on shutdown. - -2007-05-28 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - GNonLin apparently likes leaving elements in PLAYING when you - remove them. Set them to NULL on removal. Hopefully this will fix - memory leaks. - -2007-05-28 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py - (Disker.change_filename): - Log the disker's filename change more nicely for admins. - -2007-05-25 Michael Smith - - * flumotion/component/base/http.py: - Fix re-raising handled error in authentication in http components; - avoids useless/noisy traceback logging. - Fixes #623. - -2007-05-25 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Reject clients using bandwidth limit if adding this client would - take us over the limit, not only if we're _already_ over the limit. - Fixes #217. - -2007-05-25 Sebastien Merle - - * flumotion/common/config.py: - Fixed a bug that made manager name become a list. - Fixes #610 - -2007-05-24 Michael Smith - - * configure.ac: - Prod so that buildbots reautogen to get new po files. - * po/de.po: - Fix so that the translation doesn't cause make errors. - -2007-05-24 Michael Smith - - * po/de.po: - Add german translation. - Fixes #544. - -2007-05-24 Michael Smith - - * flumotion/manager/manager.py: - Remove unused local to appease pychecker. - -2007-05-24 Michael Smith - - * flumotion/twisted/portal.py: - If we have no bouncer, don't use log.error (which raises - SystemError, which isn't jellyable). Instead fail appropriately, so - that the connecting client (admin, etc) gets a clear error message. - Fixes #559. - -2007-05-24 Michael Smith - - * flumotion/manager/manager.py: - When a component not known to the manager logs in, make sure we call - all the appropriate functions to rebuild the entire depgraph - correctly, not just fragments of it. - Fixes #574. - -2007-05-24 Michael Smith - - * flumotion/test/test_common_messages.py: - Actually port a test to twisted 2 that was never ported. - * flumotion/twisted/integration.py: - Another 1.3 compat chunk. - -2007-05-24 Michael Smith - - * flumotion/test/common.py: - * flumotion/test/test_dialogs.py: - * flumotion/test/test_http.py: - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_twisted_integration.py: - Remove more 1.3 compatibility code. - -2007-05-24 Michael Smith - - * flumotion/twisted/Makefile.am: - * flumotion/twisted/compat.py: - Restore minimal compat module; needed so that admins can work with - old managers/components. - -2007-05-23 Andy Wingo - - * flumotion/component/bouncers/ipbouncer.py - (IPBouncer.do_authenticate): Accept challenge-response keycards, - as they also support the address attribute. - - * flumotion/twisted/portal.py (BouncerPortal.login): Reset - keycard.address if it is there. - - * flumotion/common/config.py (buildEatersDict): Document. - (buildPropertyDict): Document. - (buildPlugsSet): Document. - -2007-05-23 Michael Smith - - * flumotion/test/test_component.py: - Rewrite this test in a twisted-2.0 compatible way. - -2007-05-23 Andy Wingo - - * flumotion/wizard/steps.py (Vorbis.worker_changed): Remove print. - - * flumotion/worker/job.py (JobAvatar.setMind.error): Fix debug - statement which triggered tracebacks in error paths. - -2007-05-23 Michael Smith - - * flumotion/test/test_defer.py: - * flumotion/test/test_pb.py: - Remove deprecated uses of reactor.iterate() which aren't needed. - There are some remaining. - -2007-05-23 Michael Smith - - * flumotion/component/component.py: - Allow the component to respond to getState() remote calls before - login is complete, so that we can (in a later version) avoid some - races (e.g. #624) in connecting components. Unfortunately we can't - do that right now or a new manager will break existing components. - -2007-05-23 Andy Wingo - - * flumotion/launch/parse.py (Component.complete_and_verify): - Update for change to ConfigEntryComponent. - - * flumotion/common/config.py (ConfigEntryComponent._buildConfig) - (ConfigEntryComponent.__init__, BaseConfigParser.parseComponent): - Parse "project" attributes on components, and add them to the - config dict. - - * flumotion/test/test_config.py - (TestConfig.testParseComponentWithProject): Add a test for parsing - entries with project=foo. - - * flumotion/component/bouncers/ipbouncer.xml: Fix the xml. - - * flumotion/common/fxml.py (Parser.parseTextNode): Move here from - config.py, and document. Accept CDATA_SECTION_NODE nodes. - (Parser.parseTextNode): Raise self.parserError, not ConfigError. - - * flumotion/manager/manager.py - (Vishnu.loadManagerConfigurationXML): Untested fix. - -2007-05-22 Michael Smith - - * flumotion/test/test_component.py: - Fix parser error test, stop skipping it. - -2007-05-22 Andy Wingo - - * flumotion/component/bouncers/Makefile.am. - * flumotion/component/bouncers/ipbouncer.xml: - * flumotion/component/bouncers/ipbouncer.py: Add a bouncer to - authenticate based on remote IP address. Shouldn't currently be - used because we currently take address to be whatever the remote - side set it to be; need to sanitize in remote_login in pb.py. - See #167. - - * flumotion/common/config.py (parsePropertyValue): Reintroduce - some old Py2.3 compat code. - -2007-05-22 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/basicwatchdog.py - (SingleBasicWatchdog.eaterSetInactive, - SingleBasicWatchdog.eaterSetActive, AVBasicWatchdog.eaterSetInactive, - AVBasicWatchdog.eaterSetActive): - * flumotion/component/combiners/switch/switch.py (SwitchMedium, - SwitchMedium.remote_switchToMaster, - SwitchMedium.remote_switchToBackup, Switch.switch_to, - Switch.is_active, SingleSwitch.switch_to, AVSwitch.init, - AVSwitch.get_pipeline_string, AVSwitch._on_message, - AVSwitch.configure_pipeline, AVSwitch.switch_to, - AVSwitch._set_last_timestamp, AVSwitch._block_cb, - AVSwitch._block_switch_sink_pads, AVSwitch.on_pads_blocked, - AVSwitch._add_pad_probes_for_start_time, - AVSwitch._start_time_buffer_probe, - AVSwitch._check_start_times_received): - Code dump. Changed some method names etc. Also made it switch almost - reliably. Still have some issues that need resolving with respect to - switching really fast between eaters with audio and video. - -2007-05-22 Michael Smith - - * flumotion/test/test_component.py: - Oops; accidently committed stuff here; set back to skipping. - -2007-05-22 Michael Smith - - * flumotion/component/producers/playlist/smartscale.py: - Older versions of gst-python don't have gst.Fraction.__float__, so - don't use it. - -2007-05-22 Michael Smith - - * misc/pycheckerhelp.py - * flumotion/admin/admin.py: - * flumotion/admin/command/commands.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/parts.py: - * flumotion/admin/text/admin_text.py: - * flumotion/admin/text/greeter.py: - * flumotion/admin/text/view.py: - * flumotion/common/interfaces.py: - * flumotion/common/keycards.py: - * flumotion/common/medium.py: - * flumotion/common/planet.py: - * flumotion/common/server.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/admin_text.py: - * flumotion/component/bouncers/admin_gtk.py: - * flumotion/component/bouncers/tokentest.py: - * flumotion/component/component.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/feed.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/job/job.py: - * flumotion/manager/admin.py: - * flumotion/manager/base.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_checkers.py: - * flumotion/test/test_common.py: - * flumotion/test/test_common_componentui.py: - * flumotion/test/test_common_messages.py: - * flumotion/test/test_common_planet.py: - * flumotion/test/test_component.py: - * flumotion/test/test_flavors.py: - * flumotion/test/test_htpasswdcrypt.py: - * flumotion/test/test_keycards.py: - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_pb.py: - * flumotion/test/test_saltsha256.py: - * flumotion/test/test_twisted_compat.py: - * flumotion/twisted/Makefile.am: - * flumotion/twisted/checkers.py: - * flumotion/twisted/compat.py: - * flumotion/twisted/credentials.py: - * flumotion/twisted/flavors.py: - * flumotion/twisted/pb.py: - * flumotion/ui/trayicon.py: - * flumotion/wizard/worker.py: - * flumotion/worker/feedserver.py: - * flumotion/worker/job.py: - * flumotion/worker/medium.py: - * flumotion/worker/worker.py: - Kill twisted 1.3 compatibility code. - -2007-05-22 Andy Wingo - - * flumotion/launch/parse.py: Refactor to use the new things in - config.py. Code reduction. ALSO! THIS IS COMMIT 5000!!!! - - * flumotion/common/config.py (buildPlugsSet) - (ConfigEntryPlug.__init__) - (BaseConfigParser.parsePlugs.parsePlug): Change so that a parsed - plug entry doesn't have the socket; it doesn't seem to be - necessary. - (parsePropertyValue): Raise a ConfigError if a property fails to - parse, with a hopefully helpful debug message. - (ConfigEntryComponent.__init__): Give context to which component - is being parsed. - - * flumotion/test/test_config.py - (TestConfig.testParseManagerWithBogusPlug): Change the expected - exception. - - * flumotion/worker/config.py (WorkerConfigXML.parseFeederports): - Use common.strToBool. - - * flumotion/common/config.py (buildEatersDict) - (parsePropertyValue, buildPropertyDict, buildPlugsSet): New - exposed functions. Probably will be useful for -launch. - (ConfigEntryComponent): Rewritten to do more: takes a parsed but - potentially not valid input, validates it against the defs, and - produces the canonical config dict. - (ConfigEntryFlow.__init__): Add components list to constructor, - and verify that it has unique component names. - (BaseConfigParser): Rewrite so as to do no validation that would - require the defs. Push component parsing down to here. Do all - parsing via parseFromTable. - (FlumotionConfigXML): Update for above changes; do validating - parses via parseFromTable. - (AdminConfigParser, ManagerConfigParser): Update for above - changes. - - * flumotion/test/test_config.py (TestFunctions): Test one of the - new functions we expose. - (AdminConfigTest.testUnknownPlug): Change the expected assertion. - - * common/pychecker.mk (%.pychecker): New target, make - flumotion/common/config.py.pychecker does a pycheck. Neat! - - * flumotion/common/registry.py (ComponentRegistry.getComponent) - (ComponentRegistry.hasComponent) - (ComponentRegistry.getComponents, ComponentRegistry.getPlug) - (ComponentRegistry.hasPlug, ComponentRegistry.getPlugs): Use - parser methods if they are available. - - * flumotion/common/errors.py (UnknownPlugError): New error. - - * flumotion/common/registry.py (RegistryParser.getPlug): Raise - UnknownPlugError if the plug type is unknown. - -2007-05-22 Michael Smith - - * flumotion/component/producers/playlist/README: - Add a brief readme for the playlist component. - -2007-05-22 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - Handle removing playlist files, and changing existing files. - -2007-05-22 Michael Smith - - * flumotion/component/producers/playlist/playlist.xml: - Add playlist-directory, base-directory properties. Make playlist - optional. - - * flumotion/component/producers/playlist/playlist.py: - Watch playlist-directory (if any) for changes. Currently only - supports adding new files. Read base directory and pass to parser. - - * flumotion/component/producers/playlist/playlistparser.py: - Use base directory to resolve relative paths. - -2007-05-21 Andy Wingo - - * flumotion/common/fxml.py (Parser.checkAttributes): Treat an - empty attribute as missing; if you are going to specify foo="", - you might as well leave it out. - - * flumotion/common/config.py - (BaseConfigParser.parseVersionString): New util in the base class. - (FlumotionConfigXML.__init__): Remove the call to parse() at - __init__ time. No longer have a 'manager' attribute. - (_ignore): Factor this util out to the module; update all users. - (FlumotionConfigXML.parse): Use a table parser; no more - "noRegistry" case. - (FlumotionConfigXML._parseAtmosphere): Use a table parser. - (FlumotionConfigXML._parseComponent): Use parseAttributes. - (ManagerConfigParser._parseComponent): Actually parse the version - string, doh... - - * flumotion/test/test_config.py (TestConfig.testParseWrongConfig): - Update to reflect semantic XML parsing at parse() time, not - __init__() time. - (TestConfig.testParseComponentNoWorker) - (TestConfig.testParseComponentNoWorker): Update to expect - different exception. - -2007-05-21 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - Add getCurrentPosition function. - Don't set pipeline to None (oops!). - Remove sources after they're finished, so we don't leak huge amounts - of memory. - - * flumotion/component/producers/playlist/playlistparser.py: - Don't discover files that wouldn't be played anyway due to being - scheduled for the past. - - * flumotion/test/test_component_playlist.py: - Adapt for API changes in playlist component - -2007-05-21 Andy Wingo - - * flumotion/test/test_config.py (TestConfig.testParseManager) - (TestConfig.testParseManagerWithPlugs) - (TestConfig.testParseManagerWithBogusPlug) - (TestConfig.testParseManagerError): Update for - parseBouncerAndPlugs rename. - - * flumotion/common/config.py - (ManagerConfigParser.parseBouncerAndPlugs) - (ManagerConfigParser._parseManagerWithRegistry) - (ManagerConfigParser._parseManagerWithoutRegistry) - (ManagerConfigParser._parseParameters): Split the code that parses - manager parameters and the code that parses the bouncers and - plugs; the latter requires the registry, which we can't use at - first. Although they traverse the same data structure they do - different things. - (ManagerConfigParser.__init__): Add attributes: bouncer and plugs. - self.manager is not used for bouncer and plug data. - - * flumotion/manager/manager.py - (Vishnu.loadManagerConfigurationXML) - (Vishnu._loadManagerBouncer, Vishnu._loadManagerPlugs): New - methods, load manager config XML; specifically, bouncers and - plugs. - (Vishnu._loadComponentConfiguration): Don't listen to clients' - requests to change the manager's bouncer or plugs. - - * flumotion/manager/main.py: Load the manager config XML right - after making the Vishnu. - - * flumotion/manager/manager.py - (Vishnu.loadComponentConfigurationXML) - (Vishnu._loadComponentConfiguration): Rename methods from - loadConfiguration; the goal being to separate manager - configuration loading from component conf loading. All callers - changed. - - * flumotion/common/config.py - (ManagerConfigParser._parseManager.enum.eparse): Distract - pychecker. - - * flumotion/manager/main.py (main): Parse the manager config with - the new ManagerConfigParser. - - * flumotion/common/config.py (ManagerConfigParser): New config - parser, parses the manager configuration out of a planet file. - This will allow simplification of the other parser. - - * flumotion/test/test_config.py: Fix some tests to test - ManagerConfigParser instead of the flow parser. - - * flumotion/common/registry.py (RegistryParser.getComponent): - Raise UnknownComponentError if the component type is unknown. - - * flumotion/common/fxml.py (Parser.parserError): Allow - customization of the parser error exception class. - (Parser.getRoot, Parser.checkAttributes, Parser.parseFromTable): - Throw the custom exception class, defaulting to ParserError as - before. - -2007-05-18 Michael Smith - - * flumotion/component/producers/playlist/playlistparser.py: - Format exception messages properly when parsing fails. - -2007-05-18 Michael Smith - - * flumotion/component/producers/playlist/playlistparser.py: - Parse timestamps correctly in the format we defined. - Specifically: require and parse the fractional seconds part (it is - discarded, however; we only schedule on whole second boundaries), - and parse as UTC, not local time. - -2007-05-17 Michael Smith - - * flumotion/component/producers/playlist/playlistparser.py: - Throttle discoverer rate to avoid using too much cpu when adding a - long playlist. - -2007-05-16 Andy Wingo - - * flumotion/manager/admin.py (AdminHeaven): Fix #107: kill dead - code. - - * flumotion/configure/uninstalled.py.in (get): - * flumotion/configure/installed.py.in (get): If FLU_CACHE_DIR is - set, read and write our cache (bundle, connections) and registry - data there. Fixes #102. - -2007-05-16 Andy Wingo - - Patch by: Gergely Nagy - - * flumotion/component/encoders/theora/theora.xml: - * flumotion/component/encoders/theora/theora.py - (Theora.configure_pipeline): Add support for sharpness parameter. - - * data/glade/wizard_theora.glade: - * flumotion/wizard/steps.py (Theora.get_state): Add Advanced - settings area to the Theora encoder wizard page. Fixes #74. - -2007-05-16 Andy Wingo - - * flumotion/wizard/wizard.py - (Wizard.require_elements.got_missing_elements): Return the missing - elements from the deferred. - - * flumotion/wizard/steps.py (Overlay.worker_changed_010): Reflow. - (HTTP.worker_changed.got_missing, HTTP.verify, HTTP.activated) - (on_entry_mount_point_changed): There are two things that can - prevent next from being pressed, lack of multifdsink and lack of a - mount point. Make sure that both are necessary conditions for - next. Fixes #68. - -2007-05-16 Andy Wingo - - * data/glade/Makefile.am (glade_DATA): Fix distcheck. - - * flumotion/wizard/steps.py (Vorbis.get_state, Speex.get_state): - Apparently a kilobit is 1000 bits? According to Mike? - (HTTP.get_state): When the user says 10 megabits, she does not - mean 10 bits. - -2007-05-16 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - The wizard used (and still does, actually) set bandwidth-limit to - unreasonably low values, thinking it was in Mb/s (it's b/s). - If the bandwidth-limit is < 1000 bps, multiply by 1e6 to make it - sensible. - -2007-05-16 Thomas Vander Stichele - - * flumotion/component/misc/httpfile/httpfile.xml: - Bundle file.py as well. - -2007-05-16 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/playlist/playlistparser.py: - Factor generic playlist parsing support code out into a separate - class; add new PlaylistXMLParser class for the XML case. - -2007-05-16 Andy Wingo - - * flumotion/wizard/enums.py (EncodingVideo, EncodingAudio): - * flumotion/wizard/steps.py (Conversion.get_audio_page) - (Conversion.get_next, Theora, Smoke, JPEG, Vorbis, Speex): Make - the encoder pages have a header in the wizard of "Foo encoder". A - bit complicated because of wizard magic. Fixes #22. - - * flumotion/component/converters/overlay/genimg.py - (generate_overlay): Return True if the text was too wide, False - otherwise. - - * flumotion/component/converters/overlay/overlay.py - (Overlay.configure_pipeline): Warn if the text is too wide. - Fixes #21. - -2007-05-16 Andy Wingo - - Patch by: Gergely Nagy - - * flumotion/component/consumers/Makefile.am (SUBDIRS): - * flumotion/component/consumers/shout2/shout2.py: - * flumotion/component/consumers/shout2/Makefile.am: - * flumotion/component/consumers/shout2/__init__.py: - * flumotion/component/consumers/shout2/shout2.xml: - * flumotion/wizard/steps.py (Consumption.on_checkbutton_shout2_toggled) - (Consumption.verify, Consumption.get_next) - (Shout2.component_type, Shout2Both.name, Shout2Audio.name) - (Shout2Video.name): - * flumotion/wizard/save.py (WizardSaver.handleConsumers): - * data/glade/wizard_consumption.glade: - * data/glade/wizard_shout2.glade: - * configure.ac: Add shout2 consumer, updated from Gergely's patch. - Fixes #239. - - * flumotion/launch/parse.py (Component.as_config_dict): Make an - eater dict instead of a sources list, fixes flumotion-launch. - -2007-05-16 Michael Smith - - * flumotion/test/test_component_playlist.py: - Don't use twisted 2.1-and-later API in tests. - -2007-05-16 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/playlist/playlistparser.py: - * flumotion/test/test_component_playlist.py: - Fix up reflecting changes to playlist items back into the gnonlin - objects. - -2007-05-16 Michael Smith - - * flumotion/component/producers/playlist/playlistparser.py: - Return new item from addItem (used in tests) - * flumotion/test/test_component_playlist.py: - Add a test, randomly prod something to make buildbots maybe happier? - -2007-05-16 Michael Smith - - * flumotion/test/Makefile.am: - * flumotion/test/test_component_playlist.py: - First round of simple tests for playlist stuff - - * flumotion/component/producers/playlist/playlistparser.py: - First bug fixed due to tests of playlist stuff. - -2007-05-16 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/playlist/playlistparser.py: - Refactor playlist stuff to make it more testable. Tests to come. - -2007-05-16 Andy Wingo - - * flumotion/launch/inspect.py (main): Indent all properties - evenly. - -2007-05-15 Andy Wingo - - * flumotion/component/base/scheduler.py (ICalScheduler.__init__): - Watch the ical file for changes. Untested, woo. - -2007-05-15 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - Never schedule an item for the past or very recent future. Allow - scheduling something 5 seconds or more in the future. - - * flumotion/component/producers/playlist/playlistparser.py: - Fix duration adjustment for inserting new items. - -2007-05-15 Andy Wingo - - * flumotion/component/base/watcher.py: Update copyrights. - - * flumotion/component/base/base.xml: - * flumotion/component/base/Makefile.am (component_PYTHON): - * flumotion/component/base/watcher.py: New module, defines a file - monitoring object. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/test_component_base_watcher.py: Add a minimal test. - -2007-05-14 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/basicwatchdog.py - (SingleBasicWatchdog.eaterSetInactive, - SingleBasicWatchdog.eaterSetActive, AVBasicWatchdog, - AVBasicWatchdog.eaterSetInactive, AVBasicWatchdog.eaterSetActive, - AVBasicWatchdog.isActive): - * flumotion/component/combiners/switch/switch.py (Switch.isActive, - SingleSwitch, SingleSwitch.switchToMaster, - SingleSwitch.switchToBackup, AVSwitch.switchToMaster, - AVSwitch.switchToBackup, AVSwitch._setLastTimestamp): - Set the stop value on the switches so that the resulting stream - is synched if video or audio stops before the other. - Do not allow switching to master or backup if eaters are inactive. - -2007-05-14 Andy Wingo - - * flumotion/admin/gtk/main.py (startAdminFromGreeter.failed): This - is the bug that zapek found, yall. Remember this bug! - - * flumotion/component/base/scheduler.py (Scheduler.addEvent): Add - a now argument. - (Scheduler.getCurrentEvents): New accessor. - (Scheduler._reschedule): Convert timedelta objects to seconds. - - * flumotion/test/test_component_base_scheduler.py - (SchedulerTest.testSimple): Test some more scheduler bits. - -2007-05-14 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/playlist/playlistparser.py: - Make scheduling more consistent with design. Remove a race or two. - -2007-05-14 Andy Wingo - - * flumotion/component/base/scheduler.py (Event.__init__): Rework a - bit, avoid a call to now() if possible. - (Event.reschedule): Add optional now argument. - (Event.toTuple, Event.__lt__, Event.__gt__, Event.__eq__): Compare - events like tuples. I'd subclass from tuple if it were earlier in - the day. - - * flumotion/test/test_component_base_scheduler.py - (EventTest.testSimple, EventTest.testUpdateRecurring) - (EventTest.testComparison): Add some more tests. - - * flumotion/component/base/Makefile.am (component_PYTHON): - * flumotion/component/base/base.xml: - * flumotion/component/base/scheduler.py (Event, Scheduler) - (ICalScheduler): New classes, meant to replace the ical things in - the icalbouncer and in the disker. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/test_component_base_scheduler.py (SchedulerTest): - Very minimal test. - -2007-05-14 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py - (SingleSwitch.configure_pipeline, AVSwitch.configure_pipeline): - * flumotion/component/feedcomponent010.py - (FeedComponent.get_eater_name_for_feedId): - s/feedid/feedId - -2007-05-14 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/Makefile.am: - * flumotion/component/combiners/switch/basicwatchdog.py - (SingleBasicWatchdog, SingleBasicWatchdog.eaterSetInactive, - SingleBasicWatchdog.eaterSetActive, SingleBasicWatchdog.isActive, - AVBasicWatchdog, AVBasicWatchdog.eaterSetInactive, - AVBasicWatchdog.eaterSetActive, AVBasicWatchdog.isActive): - * flumotion/component/combiners/switch/switch.xml: - Add basic watchdogs that will automatically switch to backup if - master eater(s) go(es) hungry. - -2007-05-11 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/Makefile.am: - Add admin ui to Makefile. - -2007-05-11 Michael Smith - - * flumotion/test/test_http.py: - Fix a test that used an internal method in resource.py. - -2007-05-11 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/consumers/httpstreamer/resources.py: - Implement bandwidth-limit in http streamer. - Implement redirecting clients to a different location when the - server is full (hitting either bandwidth limit or client limit) - -2007-05-10 Sebastien Merle - - * flumotion/common/enum.py: - Corrected a bug when creating a generic enum instance. - -2007-05-10 Zaheer Abbas Merali - - * flumotion/component/combiners/switch/switch.py (Switch, SingleSwitch, - AVSwitch): - Change log categories. - -2007-05-10 Zaheer Abbas Merali - - * flumotion/component/Makefile.am: - * flumotion/component/component.xml: - Fix distcheck and fix bundling of switch component. - -2007-05-10 Zaheer Abbas Merali - - * configure.ac: - * flumotion/component/combiners/Makefile.am: - * flumotion/component/combiners/__init__.py: - * flumotion/component/combiners/switch/Makefile.am: - * flumotion/component/combiners/switch/__init__.py: - * flumotion/component/combiners/switch/admin_gtk.py (SwitchingNode, - SwitchingNode.__init__, SwitchingNode.cb_toggled, - SwitchingNode.setUIState, SwitchingNode.stateSet, SwitcherAdminGtk, - SwitcherAdminGtk.setup): - * flumotion/component/combiners/switch/switch.py (SwitchMedium, - SwitchMedium.remote_switchToMaster, - SwitchMedium.remote_switchToBackup, Switch, Switch.init, - Switch.do_check, Switch.cb, Switch.switchToMaster, - Switch.switchToBackup, SingleSwitch, SingleSwitch.init, - SingleSwitch.get_pipeline_string, SingleSwitch.configure_pipeline, - SingleSwitch.switchToMaster, SingleSwitch.switchToBackup, AVSwitch, - AVSwitch.init, AVSwitch.get_pipeline_string, - AVSwitch.configure_pipeline, AVSwitch.switchToMaster, - AVSwitch.switchToBackup): - * flumotion/component/combiners/switch/switch.xml: - Add switching components with very simple gtk admin for now. - -2007-05-10 Sebastien Merle - - * flumotion/common/enum.py: - Made the unjellyer an diffrent class than Enum, because - Twsited 2.0.1 need the unjellyer to be a classic style class. - -2007-03-30 Sebastien Merle - - * flumotion/common/enum.py: - Modified the Enum jellying for the enum to be unjellyed - even without knowing the custom enum class. - It allow a peer to proxy an enum value without having to - know about the enum custom class. - In practice it allow a component to declar custom enums, - and an admin/ui to use it without the manager knowing about it. - -2007-03-29 Sebastien Merle - - * flumotion/test/test_enum.py: - * flumotion/common/enum.py: - Added the ability for the enum values (not the proper enum) to - be jellyed and unjellyed. Now an enum value can be directly - used with spread without converting to int. - -2007-05-09 Andy Wingo - - * flumotion/worker/main.py (main): - * flumotion/launch/main.py (main): - * flumotion/manager/main.py (main): --verbose sets a baseline for - --debug, not overriding it. Fixes #82. - - * flumotion/manager/component.py (ComponentAvatar.cleanup): Add a - comment. - -2007-05-09 Zaheer Abbas Merali - - * flumotion/test/test_manager_depgraph.py - (testDepGraph._createComponent): - Fix tests for depgraph to use the eater key. - -2007-05-09 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py - (FeedComponent.get_eater_name_for_feedid): - Add helper method. - * flumotion/manager/depgraph.py (DepGraph.mapEatersToFeeders, - DepGraph.whatShouldBeStarted): - Migrate depgraph to use the eater key rather than the source key. - -2007-05-09 Michael Smith - - * flumotion/component/producers/playlist/playlistparser.py: - Fix duration adjustment for making sources fit into timeline. - -2007-05-09 Thomas Vander Stichele - - * flumotion/component/misc/httpfile/file.py (File.renderAuthenticated, - File.do_prepareBody, MimedFileFactory, FLVFile, - FLVFile.do_prepareBody, FileTransfer): - Make sure start= requests on FLV files give me the right mime type - by not writing before all headers are set. - factor out an overridable do_prepareBody in which FLV and the like - can do their manipulative trickery. - Re-fixes #618. - * flumotion/test/test_misc_httpfile.py (TestTextFile.finishCallback, - TestDirectory.finish, TestDirectory.finish, TestDirectory.finish, - TestDirectory.testFLVRangeStart, TestDirectory.finish): - Add tests. Be more assertive. - -2007-05-09 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/playlist/playlist.xml: - * flumotion/component/producers/playlist/playlistparser.py: - Allow audio-only or video-only compositions to be configured. - -2007-05-09 Michael Smith - - * flumotion/component/producers/playlist/playlistparser.py: - Remove unused local to satisfy pychecker. - -2007-05-09 Michael Smith - - * flumotion/component/producers/playlist/playlistparser.py: - Use the discoverer on files before adding them. - -2007-05-09 Zaheer Abbas Merali - - * flumotion/common/config.py (FlumotionConfigXML.parseFeed, - FlumotionConfigXML.addFeed): - Used table parser to parse subnodes of eater. This guarantees - that only feed nodes are children of the eater node. - -2007-05-09 Zaheer Abbas Merali - - * flumotion/wizard/steps.py (Soundcard.update_inputs): - Commit forgotten when moving audio checks to audio.py. - -2007-05-09 Zaheer Abbas Merali - - * flumotion/component/feedcomponent.py - (MultiInputParseLaunchComponent.get_pipeline_string): - * flumotion/component/feedcomponent010.py (FeedComponent.init, - FeedComponent.do_setup, FeedComponent.parseEaterConfig): - Use the eater key not the source key for building up the - eaters list. Build a mapping for feedId -> name of eater so - we can quickly look it up in elements needing to find the eater - name that a feedId (hence eater's element name) corresponds to. - * flumotion/test/test_component.py (PipelineTest.__init__, - PipelineTest.config): - * flumotion/test/test_component_httpstreamer.py - (TestOldProperties.setUp): - Fix up tests to use eater key not source key. - * flumotion/wizard/save.py (Component.toXML): - Output non-deprecated config form for wizard. - -2007-05-09 Michael Smith - - * flumotion/component/producers/playlist/Makefile.am: - Add playlistparser.py to Makefile.am - -2007-05-09 Michael Smith - - * flumotion/admin/command/commands.py: - Allow flumotion-command invoke arguments to include the contents of - a file as a string argument using the 'F' format character. - -2007-05-09 Michael Smith - - * flumotion/component/producers/playlist/playlist.py: - Fix remote method to use proper variable. - - * flumotion/component/producers/playlist/playlistparser.py: - When truncating an existing gnlsource duration, also change the - media-duration, to avoid unwanted speedups. - -2007-05-09 Thomas Vander Stichele - - * flumotion/component/misc/httpfile/file.py (loadMimeTypes): - Add .flv mime type in the code. - -2007-05-09 Zaheer Abbas Merali - - * TODO: - * flumotion/common/config.py (FlumotionConfigXML._parseEaters): - Thanks Andy, using the helper method parseAttributes. - -2007-05-08 Zaheer Abbas Merali - - * flumotion/test/test.xml: - Update xml flow used in tests to use new way of configuring - eaters. - -2007-05-08 Zaheer Abbas Merali - - * flumotion/common/config.py (FlumotionConfigXML._parseComponent, - FlumotionConfigXML._parseEaters, FlumotionConfigXML._parseSources): - * flumotion/test/test_config.py - (TestConfig.testParseComponentsWithEaters, - TestConfig.testParseComponentsWithEatersNotSpecified, - TestConfig.testParseComponentsWithEatersDeprecatedWay, - TestConfig.testParseComponentsWithTwoEaters, - TestConfig.testParseComponentsWithTwoEatersDeprecatedWay, - TestConfig.testParseComponentsWithMultipleEater, - TestConfig.testParseComponentsWithMultipleEaterDeprecatedWay, - TestConfig.testGetComponentEntriesWrong): - Add new way of configuring eaters in the XML along with tests. - Fixes #200. - -2007-05-08 Michael Smith - - * configure.ac: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/playlist/Makefile.am: - * flumotion/component/producers/playlist/__init__.py: - * flumotion/component/producers/playlist/playlist.py: - * flumotion/component/producers/playlist/playlist.xml: - * flumotion/component/producers/playlist/playlistparser.py: - * flumotion/component/producers/playlist/singledecodebin.py: - * flumotion/component/producers/playlist/smartscale.py: - Merge playlist component back to trunk now that the basics are - functional. - -2007-05-08 Thomas Vander Stichele - - * flumotion/component/misc/httpfile/file.py (File, File.__init__, - File.getChild, File.renderAuthenticated, MimedFileFactory, - MimedFileFactory.__init__, MimedFileFactory.create, FLVFile, - FLVFile.renderAuthenticated): - Add a subclass for handling FLV files. - Implement handling of the start= GET parameter, just like in - Apache and lighthttpd. Fixes #618. - Add a MimedFileFactory that allows us to create even the root - resource as a mime-type-dependent subclass. - * flumotion/component/misc/httpfile/httpfile.py (HTTPFileStreamer.init, - HTTPFileStreamer.do_start): - * flumotion/test/test_misc_httpfile.py (TestDirectory, - TestDirectory.setUp, TestDirectory.tearDown, - TestDirectory.testGetChild, TestDirectory.testFLV, - TestDirectory.finish, TestDirectory.testFLVStart, - TestDirectory.finish, TestDirectory.testFLVStartZero, - TestDirectory.finish): - Add tests for this. - -2007-05-07 Thomas Vander Stichele - - * flumotion/component/misc/httpfile/file.py (File.getChild): - * flumotion/component/misc/httpfile/httpfile.py - (HTTPFileStreamer.do_setup, HTTPFileStreamer.do_start): - We still need to distinguish between the root resource being the - File resource directly, and a tree. Apparently client.getPage() - in the tests does not mimic correctly what something like wget would - do, making it hard to test for the Root resource tree being set up - correctly. - -2007-05-07 Thomas Vander Stichele - - * flumotion/component/misc/httpfile/httpfile.py (HTTPFileStreamer.init, - HTTPFileStreamer.getDescription, HTTPFileStreamer.do_setup, - HTTPFileStreamer.do_stop, HTTPFileStreamer.do_start, - HTTPFileStreamer.requestFinished, HTTPFileStreamer.getStreamData): - Rearrange imports. - Privatize some variables. - Store some variables for resources we need to clean up. - Set self.port from what we're actually listening to, so we can - listen to port 0 then figure out which port it chose. - Make sure we can work without any loggers. - Fix handling of empty and / mount points, as well as getting - empty or / resources - fixes #567 - * flumotion/test/Makefile.am: - * flumotion/test/test_component_httpserver.py (MountTest, - MountTest.setUp, MountTest.tearDown, MountTest.start, - MountTest.getURL, MountTest.testDirMountEmpty, - MountTest.testDirMountRoot, MountTest.testDirMountOnDemand, - MountTest.testFileMountEmpty, MountTest.testFileMountOnDemand): - Add tests for http-server component with various mount points - and serving either a directory or a file. - * flumotion/component/misc/httpfile/file.py (File.getChild, - File.renderAuthenticated): - Restat the file on every request, to make sure we handle changed - lengths of files. - Handle requests ending with / - -2007-05-07 Andy Wingo - - * flumotion/worker/medium.py (WorkerMedium.remote_killJob): New - remote method, kills a job by avatarId, defaulting to SIGKILL. - Callable via flumotion-command invoke sss workerCallRemote - WORKERNAME killJob AVATARID. Fixes #499. - - * flumotion/worker/worker.py (WorkerBrain.killJob): New function, - proxies to JobHeaven.killJob. - - * flumotion/worker/job.py (JobHeaven.killJob): New function, kills - a job by avatarId. - (JobHeaven.kill): Use killJob. - - * flumotion/common/common.py (signalPid): New function. - (termPid, killPid, checkPidRunning): Use signalPid. - - * flumotion/manager/manager.py (Vishnu.__init__): Remove a FIXME - made irrelevant by [3299]. - - * flumotion/twisted/fdserver.py (PassableServerPort.transport): - Remove the passable client things, they are in feed.py now. - - * flumotion/extern/Makefile.am (clean-local): rm -rf _trial_temp, - not -r. - -2007-05-02 Andy Wingo - - * flumotion/worker/worker.py (WorkerBrain.getFeedServerPort): - Whoops, fix the case when we don't listen with a feedserver. - - * flumotion/admin/multi.py (MultiAdminModel.__init__): Use a - StartSet instead of our own ghetto homebrew. - (MultiAdminModel.addManager): API change: take a PBConnectionInfo. - Use the StartSet to arbitrate making only one connection per - managerId. Returns a deferred that will fire with the admin, or - error on error. - (MultiAdminModel.removeManager): API change: renamed from - close_admin. Uses the start set to cancel any connection, existing - or in progress. - - * flumotion/common/errors.py (AlreadyConnectingError): New error. - - * flumotion/admin/gtk/main.py (startAdminFromGreeter.failed): - * flumotion/admin/gtk/dialogs.py (connection_failed_message): - * flumotion/admin/gtk/client.py - (Window.on_open_connection.refused): Change interface to some of - the dialogs. - - * flumotion/common/Makefile.am (flumotion_PYTHON): - * flumotion/common/startset.py (StartSet): New data structure, - factored out of flumotion.worker.job.DeferredStartSet. Still need - to port the jobheaven to use this though. - -2007-04-30 Andy Wingo - - * flumotion/twisted/pb.py - (FPBClientFactory.login.getKeycardClassesCb) - (FPBClientFactory._cbSendKeycard) - (FPBClientFactory._cbLoginCallback, Authenticator.issue) - (Authenticator.respond_KeycardUACPCC) - (Authenticator.respond_KeycardUASPCC): Tweak some logging back to - LOG. - (FPBClientFactory.disconnect): Error as terror, like protocol.py. - - * flumotion/common/medium.py (BaseMedium.setRemoteReference): Not - every remote side is a manager. - - * flumotion/admin/admin.py - (AdminClientFactory.clientConnectionFailed): Leave some logging to - the base class. - (AdminModel.shutdown): Reorder some calls to make logging nicer. - - * flumotion/twisted/pb.py (FPBClientFactory.startedConnecting) - (FPBClientFactory.disconnect): Interestingly, there is a window in - which calling disconnect() and stopTrying() on a factory still - leaves a connection attempt pending. Plug this window, calling a - function that will only have effect during the window period. - (ReconnectingFPBClientFactory.clientConnectionFailed): Log when we - are going to reconnect (or not) - - * flumotion/twisted/portal.py - (BouncerPortal.login.onErrorCloseConnection): Close the connection - if the login attempt fails, in all cases: database timeout, bad - password, etc. Prevents FD leakage on reconnect if the worker - can't contact the manager. - - * flumotion/test/test_component_feed.py (TestFeedClient.setUp) - (TestFeedClient.tearDown): Use some terrible code that I found in - test_pb.py to make trial not count UnauthorizedLogin errors as - test errors, since we plan to make them. Trial gets these errors - because Flumotion passes failures across the wire whose class is - not derived from pb.Error, viz. - twisted.cred.error.UnauthorizedLogin. We should pass - pb.Error-derived errors, but my brain is too weak right now to - handle all of the implications. - (TestFeedClient.testBadPass): Enable test. - - * flumotion/test/test_pb.py: Remove - ifWeHaveAnOldTwistedAndProgrammerNameEqualsZaheer invocations. - - * flumotion/common/debug.py (print_stack): New kwarg "file", - defaulting to stdout. - - * flumotion/component/feed.py - (FeedMedium._doFeedTo.mungeTransport._closeSocket): Fix too-clever - code. - - * flumotion/admin/admin.py (AdminClientFactory.gotDeferredLogin): - Remove old challenge-response code; base classes do it for us now. - - * flumotion/twisted/portal.py (BouncerPortal.login): Return a - failure if no bouncer is configured instead of None. Refactor - slightly. - - * flumotion/twisted/pb.py (FPBClientFactory._cbLoginCallback): - Client-side remote_login() returns will never be None; remove this - case. - (_BouncerWrapper.remote_login): The one case in which None would - be passed as return from BouncerPortal.login() was when no bouncer - was configured; since that's fixed, no need to check for None - here. Refactor slightly. - -2007-04-26 Thomas Vander Stichele - - * flumotion/test/test_http.py (FakeRequest.__init__): - Requests have args - -2007-04-25 Thomas Vander Stichele - - * flumotion/component/Makefile.am: - Actually dist feed.py. - -2007-04-25 Thomas Vander Stichele - - * flumotion/component/feed.py: - socket was missing. - -2007-04-25 Andy Wingo - - * flumotion/test/test_component_feed.py - (TestFeedClient.testBadPass): Add failing test. - - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: Get feed from - flumotion.component. - - * flumotion/component/component.xml: Add feed.py to the bundle. - - * flumotion/worker/Makefile.am (flumotion_PYTHON): - * flumotion/component/Makefile.am (component_PYTHON): - * flumotion/component/feed.py: Moved from flumotion.worker.feed. - Include the fdserver stuff so that everything can be bundled and - old workers can enjoy new feed code. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/test_component_feed.py: Moved from - test_worker_feed.py. - -2007-04-25 Zaheer Abbas Merali - - * flumotion/admin/gtk/client.py - (Window._set_stop_start_component_sensitive): - * flumotion/admin/gtk/parts.py (ComponentsView.update_start_stop_props, - ComponentMenu.__init__): - Fix ability to stop lost components. - Delete should only be possible on sleeping components. - -2007-04-25 Andy Wingo - - * flumotion/worker/feed.py (FeedMedium.__init__): Make component - an optional argument, only for back compatibility. - (FeedMedium.requestFeed): New helper method, returns a deferred as - the result of the whole operation: success with fds or error with - a failure. - (FeedMedium._doFeedTo): Adapt so that both the old eatFromFD and - the new deferred interface are supported. - - * flumotion/test/test_worker_feed.py - (TestFeedServer.testConnectAndFeed.feedReady) - (TestFeedServer.testConnectAndFeedLegacy.feedReady): I fixed the - FIXME, so I fix the comment. - (TestFeedServer.testConnectAndFeed): New test for the new - requestFeed interface. - - * flumotion/worker/feed.py (FeedMedium.startConnecting) - (FeedMedium.stopConnecting): New helper functions. You can still - connect using functions outside of the medium if that is your - thing, which is the case with older feedcomponent.py bundles. - (FeedMedium._doFeedTo): AUGMENT THE TERROR! (It is commented.) - - * flumotion/worker/feedserver.py (FeedAvatar._sendFeedReplyCb): - Expand comment. - - * flumotion/twisted/fdserver.py (_SocketMaybeCloser): Factor out - an awesome mixin, like _SocketCloser, but sometimes not. - (PassableServerConnection): Use the mixin. - (PassableClientConnection, PassableClientConnector): New classes, - the analogs of PassableServerConnection/Port for client-side - connections. - - * flumotion/test/test_worker_feed.py - (TestFeedServer.testConnectAndFeedLegacy): Copy from - testConnectAndFeed, a test that existing clients continue to work. - (TestFeedServer.testConnectAndFeed): Use the new - FeedMedium.startConnecting interface, which means we use a - PassableClientConnector. - - * flumotion/worker/feed.py (FeedMedium._doFeedTo): Add a FIXME. - - * flumotion/test/test_worker_feed.py - (TestFeedServer.testConnectAndFeed): Clean up some prints, and add - comments. - -2007-04-25 Michael Smith - - * flumotion/worker/feedserver.py: - Calling connectionLost() on a transport is fundamentally unsafe in - twisted. - Instead, we can make use of some undocumented behaviour to ensure - that the reactor will (safely) do it for us. - - * flumotion/test/test_worker_feed.py: - Unskip test, make it pass (but needs some work) - -2007-04-25 Andy Wingo - - * flumotion/test/test_worker_feed.py (FakeWorkerBrain): Add method - to wait on feed server receiving FD. - (FakeComponent): Add method to waith on receiving fd from feed - medium. - (TestFeedServer.assertAdditionalFDsOpen): Temporarily disable - (TestFeedServer.testConnectWithoutDroppingPB.cleanup): Add a - comment. - (TestFeedServer.testConnectWithoutDroppingPB): New test, does not - yet work - -2007-04-25 Zaheer Abbas Merali - - * configure.ac: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/rtsp/Makefile.am: - * flumotion/component/producers/rtsp/__init__.py: - * flumotion/component/producers/rtsp/rtsp.py (Rtsp, - Rtsp.get_pipeline_string): - * flumotion/component/producers/rtsp/rtsp.xml: - New rtsp-producer component, for receiving streams from rtsp. - Tested with an Axis network camera. - -2007-04-25 Thomas Vander Stichele - - * flumotion/component/misc/httpfile/file.py (File, File.__init__, - File.render, File.terminateSimpleRequest, File.renderAuthenticated, - File.createSimilarFile): - Comment and document. - Remove bogus pychecker inhibition. - Privatize File._component. - Instead of commenting badly named variables, use self-documenting - names. - Be a bit more strict about range headers we accept. - Make the start/end logic shorter and easier to grok by adding - first/last variables and simplifying. - * flumotion/test/test_misc_httpfile.py - (TestTextFile.testWrongEmptyBytesRange, - TestTextFile.testWrongNoRange, TestTextFile.testWrongTypeRange, - TestTextFile.testRangeSet): - Add two tests, fix one. - -2007-04-25 Thomas Vander Stichele - - * flumotion/test/Makefile.am: - * flumotion/test/test_misc_httpfile.py: - Add a test before refactoring. - Increases coverage for file.py from 19% to 79%. - -2007-04-24 Andy Wingo - - * flumotion/worker/feedserver.py (FeedServer.listen): Use a normal - portal, now that we can, with the modifications below. - - * flumotion/worker/worker.py (ProxyBouncer): Move here from - feedserver.ManagerProxyBouncer, and pass to the feedserver on - creation. No need to qual() the classes, they are already qual()'d - remotely. - - * flumotion/twisted/portal.py (BouncerPortal.getKeycardClasses): - Add some API behavior: if the bouncer has a 'getKeycardClasses' - attribute, call it instead of accessing the keycardClasses - attribute. - - * flumotion/test/test_worker_feed.py (countOpenFileDescriptors): - Interesting function! - (TestFeedServer.testConnectWithoutDroppingPB): Add test, asserting - on the number of open file descriptors at opportune times. - -2007-04-24 Zaheer Abbas Merali - - * flumotion/component/producers/ivtv/ivtv.py - (Ivtv.get_pipeline_string): - * flumotion/component/producers/ivtv/ivtv.xml: - Make the deinterlacer configurable. - -2007-04-24 Zaheer Abbas Merali - - * po/POTFILES.in: - Remove file that no longer exists. - -2007-04-24 Zaheer Abbas Merali - - * flumotion/component/effects/volume/volume.py (Volume): - volume effect does volume setting for all known components - that use it. - -2007-04-24 Zaheer Abbas Merali - - * flumotion/component/producers/soundcard/soundcard.py - (Soundcard.get_pipeline_string): - FIXME was fixed last week. - -2007-04-24 Zaheer Abbas Merali - - * flumotion/worker/checks/Makefile.am: - * flumotion/worker/checks/package.xml: - * flumotion/worker/checks/video.py: - * flumotion/worker/checks/audio.py: - Move checkMixerTracks to audio.py. - * flumotion/worker/checks/video010.py: - * flumotion/worker/checks/gst010.py: - Rename video010.py to gst010.py. - -2007-04-24 Andy Wingo - - * flumotion/worker/main.py (main): More use of PBConnectionInfo. - - * flumotion/worker/feed.py: Remove server-related code; client - code has to stay here, because components call it. - - * flumotion/worker/medium.py: Factored out of worker.py, - dispatches all requests to the worker brain. - - * flumotion/worker/feedserver.py (FeedServer): Server code - factored out of flumotion.worker.feed. Synthesized a server object - to be the calling-point for feedserver-related operations. - (FeedAvatar.__init__): Take the mind directly instead of in - attached. Fixes #566. Use the fpb.Avatar infrastructure for - callremote, which gives us free logging. Remove use of crack - IFeedServerParent. - - * flumotion/worker/job.py: Consolidate classes such that the - JobHeaven object acts as the one calling-point for job-related - functions. Factor the deferredstart code out into a separate - testable class. Attach mind to job components directly instead of - via a callLater; see #566. - (JobInfo): Renamed from "Kid". - (JobHeaven.spawn): Renamed from Kindergarten.play. - (JobHeaven.getJobInfo, JobHeaven.getJobInfos) - (JobHeaven.getJobAvatarIds): Renamed from getKid*. - (JobHeaven.jobStopped): New method combining lostAvatar and - removeKidByPid. - (JobHeaven.shutdown): I believe the previous - shutdown-but-possibly-kill code was buggy, and that this code is - not. - (JobAvatar.__init__): Take a mind directly in the init function, - instead of via attached/detached. Derive from fpb.Avatar. - (JobAvatar.setMind): Code moved here from attached(), no longer a - defgen. - (JobAvatar._sendFileDescriptor): FD sending factored into method. - (JobAvatar.receiveFeed): Port mind-possibly-logged-out fix here - from sendFeed. - - * flumotion/worker/worker.py: Eviscerate. Moved medium and - jobheaven code out to separate files; all that is left is the - WorkerBrain. - - * flumotion/component/consumers/preview/preview.py (Preview): - Disable QOS in the preview component; it's still not very usable - though. - - * flumotion/twisted/pb.py (Avatar.setMind): Update docs to say - that it's best to setMind directly, not from a callLater. - - * flumotion/test/realm.py: New file, some infrastructure for - setting up a PB realm listening on a random available port. - - * flumotion/test/test_worker_medium.py: Move medium/clientfactory - tests here; use the testrealm infrastructure to actually connect - to a TCP socket. - - * flumotion/test/test_worker_worker.py: Remove removeKidByPid - test, that code is no longer there. Add test for initing worker - brain. - -2007-04-24 Zaheer Abbas Merali - - * flumotion/component/producers/soundcard/soundcard.xml: - Soundcard should have higher clock priority than firewire. - This is due to soundcard not working at all when slaved - to a different clock. - Fixes #547 - -2007-04-23 Zaheer Abbas Merali - - * data/glade/admin.glade: - * flumotion/admin/gtk/client.py - (Window._set_stop_start_component_sensitive, - Window._component_restart, Window._component_delete, - Window._component_do, Window.manage_stop_component_cb, - Window.manage_delete_component_cb): - * flumotion/admin/gtk/parts.py (ComponentMenu.__init__): - Add ability to delete one component. - Fixes #445 - -2007-04-23 Zaheer Abbas Merali - - * data/glade/wizard_firewire.glade: - Change frame name to something representing the frame so it can - be used in the code. - * flumotion/wizard/enums.py: - Firewire audio now has a step (when not used in combination with - firewire video). - * flumotion/wizard/steps.py (Production.verify, (FireWire.run_checks, - FireWireAudio, FireWireAudio.setup, FireWireAudio.set_sensitive, - FireWireAudio.on_update_output_format, - FireWireAudio._get_width_height, FireWireAudio.update_output_format, - FireWireAudio.get_state, FireWireAudio.worker_changed, - FireWireAudio.run_checks, FireWireAudio.firewireCheckDone, - FireWireAudio.get_next, Webcam, Overlay.worker_changed_010, - Overlay.get_next): - Fix logic in verify(). - Create new FirewireAudio wizard step for use when firewire audio - is being used without firewire audio. Remove whitespace. This - class shares no code with the Firewire class because this wizard - code badly needs refactoring. - Add more stupid hardcoding in Overlay's get_next(). Refer to - refactoring comment above. - Fixes #111 - -2007-04-23 Zaheer Abbas Merali - - * flumotion/wizard/steps.py (Soundcard.soundcardCheckComplete): - Fix callback to take the correct args. - -2007-04-20 Zaheer Abbas Merali - - * flumotion/component/bouncers/bouncer.py: - Remove import that is no longer required. - * flumotion/component/effects/volume/admin_gtk.py - (VolumeAdminGtkNode.haveWidgetTree, VolumeAdminGtkNode.setUIState, - VolumeAdminGtkNode.volumeSet): - * flumotion/component/effects/volume/volume.glade: - * flumotion/component/effects/volume/volume.py (Volume.__init__, - Volume.setUIState, Volume._bus_message_received_cb, - Volume.effect_setVolume, Volume.effect_getVolume): - Allow volume effect to be configured to not allow increasing volume - > 1.0 and also to be configured to not allow setting the volume. - Soundcard's volume setting will go to 1.0 only. - Soundcard component without gst-python 0.10.7 or later cannot set the - volume. - Expose these configurations in uiState so admin UIs can adapt. - Adapt gtk admin page to make sensitive the widgets concerned with - setting volume/increasing volume as appropriate. - * flumotion/component/producers/soundcard/soundcard.py (Soundcard, - Soundcard.get_pipeline_string, Soundcard.configure_pipeline, - Soundcard._set_input_track, Soundcard.setVolume, - Soundcard.getVolume): - * flumotion/component/producers/soundcard/soundcard.xml: - Add new property "input-track". Implement setting of volume for - volume effect. Use input track and set it to record. - * flumotion/wizard/steps.py (Soundcard.soundcardCheckComplete, - Soundcard.get_state): - Remove use of defer generator. Actually pass the input track - so it gets added to the config for the soundcard component. - * flumotion/worker/checks/video.py (get_tracks): - Make check do state change in a thread. - -2007-04-20 Michael Smith - - * doc/random/playlists: - Add playlist document describing scheduling format. - -2007-04-19 Andy Wingo - - * tools/split-flu-log: New script, splits a flumotion log into a - number of chunks, on line boundaries, with the date of the first - log statement as part of the chunked output file name. - -2007-04-18 Zaheer Abbas Merali - - * flumotion/component/effects/volume/admin_gtk.py - (VolumeAdminGtkNode.haveWidgetTree, - VolumeAdminGtkNode._createEnoughLevelWidgets, - VolumeAdminGtkNode.peakSet, VolumeAdminGtkNode.decaySet, - VolumeAdminGtkNode._check_toggled_cb): - * flumotion/component/effects/volume/volume.glade: - Dynamically create level meters for every channel rather than - having one averaged over all channels. - Remove unnecessary whitespace. - -2007-04-17 Zaheer Abbas Merali - - * flumotion/admin/admin.py (AdminClientFactory.clientConnectionFailed): - * flumotion/twisted/pb.py - (ReconnectingFPBClientFactory.clientConnectionFailed, - ReconnectingFPBClientFactory.clientConnectionLost): - Add destination of where the connection was failed to in debug - output. - -2007-04-17 Zaheer Abbas Merali - - * flumotion/twisted/pb.py - (ReconnectingPBClientFactory.clientConnectionFailed, - ReconnectingPBClientFactory.clientConnectionLost): - Add destination of where the connection was failed to in debug. - Fixes #612. - -2007-04-17 Thomas Vander Stichele - - * env.in: - Actually put the pkgconfig directory in. - -2007-04-16 Zaheer Abbas Merali - - * flumotion/component/producers/ivtv/ivtv.xml: - Correct directory containing ivtv. - -2007-04-16 Zaheer Abbas Merali - - * flumotion/component/producers/ivtv/ivtv.xml: - We are no longer in our own project! - -2007-04-16 Zaheer Abbas Merali - - * configure.ac: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/ivtv/Makefile.am: - * flumotion/component/producers/ivtv/__init__.py: - * flumotion/component/producers/ivtv/ivtv.py (Ivtv, - Ivtv.get_pipeline_string): - * flumotion/component/producers/ivtv/ivtv.xml: - New ivtv-producer component. - -2007-04-16 Zaheer Abbas Merali - - * flumotion/admin/gtk/main.py (main): - Fix grammar. - -2007-04-16 Zaheer Abbas Merali - - * data/glade/admin.glade: - Fix open recent connection button tooltip and where it maps to. - Add "Open Existing Connection" menu item. - * flumotion/admin/gtk/client.py (Window.connection_open_recent_cb, - Window.connection_open_existing_cb, Window.got_state, - Window.on_import_response): - Add support for "Open Existing Connection" - * flumotion/admin/gtk/greeter.py (Greeter, Greeter.__init__, - ConnectExisting): - Add new greeter wizard that just does the steps for opening - an existing connection. - -2007-04-16 Zaheer Abbas Merali - - * data/glade/admin.glade: - * flumotion/admin/gtk/client.py (Window._append_recent_connections, - Window.connection_open_recent_cb, - Window.connection_import_configuration_cb, - Window.connection_export_configuration_cb, - Window.connection_quit_cb): - Rename menu items and methods for them to be connection_ - instead of file_. - Rename menu item label to "Open Recent Connection". - * flumotion/admin/gtk/connections.py (Connections): - Remove whitespace. - -2007-04-16 Michael Smith - - * tools/httpdigesthasher.py: - Use a proper realm; that was a server bug, not a - windows-media-encoder bug. - -2007-04-15 Thomas Vander Stichele - - * flumotion/component/component.py (BaseComponent.start, - BaseComponent.start_plugs, BaseComponent.setMood): - * flumotion/component/feedcomponent010.py - (FeedComponent.do_pipeline_playing, - FeedComponent.bus_message_received_cb): - Improve debugging for setMood, showing caller. - Factor out a do_pipeline_playing() vmethod so that components can - choose not to go HAPPY just because their pipeline hits PLAYING. - -2007-04-15 Thomas Vander Stichele - - * conf/Makefile.am: - * conf/examples/default.xml: - Add the default config as an example. - -2007-04-15 Thomas Vander Stichele - - * flumotion/extern/log/log.py (getDebug, setPackageScrubList): - add getDebug() ... - * flumotion/worker/worker.py (Kindergarten.play): - ... and use it. - -2007-04-15 Thomas Vander Stichele - - * flumotion/extern/log/log.py (doLog): - file -> filePath - -2007-04-15 Thomas Vander Stichele - - * flumotion/component/producers/videotest/videotest.py - (VideoTest.get_pipeline_string): - * flumotion/component/producers/videotest/videotest.xml: - Booleans should be named actively. Repent by documenting - some other properties. - -2007-04-15 Thomas Vander Stichele - - * common/pychecker.mk (pychecker, PYCHECKER_OPTIONS): - make verbose run output all warnings (or at least, 1000 of them) - * flumotion/manager/manager.py (Vishnu._workerCreateComponents, - Vishnu._workerCreateComponentDelayed, Vishnu.componentAttached, - Vishnu.getComponentStates, Vishnu._emptyPlanetCallback): - * flumotion/service/service.py (Servicer.status, Servicer.clean, - Servicer.create): - * flumotion/worker/worker.py (WorkerMedium.remote_checkElements): - More cleanups. - * misc/pycheckerrc: - Admit defeat, there's too many of them. - -2007-04-15 Thomas Vander Stichele - - * flumotion/extern/Makefile.am: - Install correctly. - -2007-04-15 Thomas Vander Stichele - - * po/nl.po: - Updated Dutch translation. - -2007-04-15 Thomas Vander Stichele - - * flumotion/component/producers/videotest/admin_gtk.py - (PatternNode.patternSet): - * flumotion/ui/fgtk.py (FComboBox.get_column_content, - FComboBox.set_enum, FComboBox.set_list): - * flumotion/ui/glade.py (GladeBacked.__init__): - * flumotion/wizard/save.py (WizardSaver.handleConsumers): - * flumotion/wizard/steps.py (FireWire.on_update_output_format): - * flumotion/wizard/wizard.py (Wizard.getConfig): - Various pychecker fixes. - -2007-04-15 Thomas Vander Stichele - - * Makefile.am: - * flumotion/extern/Makefile.am: - * flumotion/extern/log/log.py (doLog, TwistedLogObserver.__init__, - TwistedLogObserver.emit, TwistedLogObserver.ignoreErrors): - * flumotion/extern/log/test_log.py (TestGetExceptionMessage.func3, - TestGetExceptionMessage.testLevel2): - * misc/pycheckerrc: - Enable shadowglobals, fix distcheck. - -2007-04-14 Thomas Vander Stichele - - * flumotion/extern/Makefile.am: - Add check rule. - * flumotion/test/Makefile.am: - * flumotion/test/test_log.py: - deleted. - -2007-04-14 Thomas Vander Stichele - - * flumotion/extern/Makefile.am: - * flumotion/extern/log/__init__.py: - * flumotion/extern/log/log.py (registerCategory, scrubFilename, - errorObject, TwistedLogObserver, TwistedLogObserver.clearIgnores, - _getTheTwistedLogObserver, addLogHandler, init, reopenOutputFiles, - logTwisted, setDebug, setPackageScrubList, getExceptionMessage): - Extract a log.py that can be used by other projects and is - standalone. To that end, have init() take the name of an - environment variable that controls the debug level, and add - setPackageScrubList method to define which packages to scrub. - Also, raise SystemExit instead of a flumotion error. Let's hope - that doesn't have unwanted side effects. - * flumotion/common/log.py (init): - Now a rather barren file with stubs and compatibility stuff. - * flumotion/test/test_log.py (TestLog.testLimitedError): - Small fix. - Fixes #594 and #595. - -2007-04-14 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py (BaseAdminGtk.setup): - Debug when config is not part of state. - Import gettext; brought out by a test on -template. - -2007-04-14 Thomas Vander Stichele - - * doc/redhat/flumotion.logrotate: - Make it conform to other Fedora/Red Hat logrotate scripts. - * flumotion.spec.in: - make-dummy-cert moved, no need to install it anymore. - -2007-04-14 Thomas Vander Stichele - - * common/trial.mk: - Revert patch to run trial flumotion.test always. - -2007-04-14 Thomas Vander Stichele - - * flumotion/component/producers/videotest/videotest.py - (VideoTest.get_pipeline_string): - * flumotion/component/producers/videotest/videotest.xml: - Add a timestamp-overlay property that overlays timestamps on the - video feed. - -2007-04-14 Thomas Vander Stichele - - * doc/random/component-initialization-protocol: - Small clarification. - * flumotion/component/feedcomponent010.py (FeedComponent, - FeedComponent.do_setup, FeedComponent.get_element, - FeedComponent.eatFromFD): - Some debugging. - -2007-04-14 Thomas Vander Stichele - - * flumotion/launch/main.py (ComponentWrapper, - ComponentWrapper.__init__, ComponentWrapper.feedToFD, - ComponentWrapper.eatFromFD, starter): - Log some more. - -2007-04-13 Zaheer Abbas Merali - - * flumotion/component/producers/firewire/firewire.py - (Firewire.setVolume): Remove unnecessary whitespace. - (Firewire._bus_message_received_cb): Fix bug detecting camera - disconnection. Turns out gst.Structure is no longer iterable. - -2007-04-11 Andy Wingo - - * flumotion/admin/multi.py - (MultiAdminModel._pushPendingConnection) - (MultiAdminModel._popPendingConnection) - (MultiAdminModel.addManager): Refactor the pending connections to - not pop pending status for a tenacious connect. - (MultiAdminModel.close_admin): Pop from pending here too. - - * flumotion/admin/multi.py (MultiAdminModel.addManager): Punt on - fixing whatever is causing _pending underflows, and make the next - person that sees this send me a bug report. - - * flumotion/common/messages.py (FancyEqMixin): Pull in from - twisted.python.util, with a bugfix to allow for different versions - of compareAttributes. - -2007-04-10 Andy Wingo - - * flumotion/admin/gtk/message.py (MessagesView.__init__): - Automatic horizontal scrolling; works around gtk+ bug #428255. - -2007-04-10 Michael Smith - - * tools/httpdigesthasher.py: - Add small tool to generate HTTP digest auth entries for files. - -2007-04-10 Michael Smith - - * flumotion/common/keycards.py: - * flumotion/twisted/credentials.py: - Implement challenger and keycard for http digest authentication. - -2007-04-10 Andy Wingo - - * flumotion/admin/gtk/dialogs.py (already_connected_message): New - dialog box. - - * flumotion/admin/multi.py (MultiAdminModel.addManager): Maintain - a set of admins that we are currently connecting to. Raise an - AlreadyConnectedError if we are asked to connect to an - already-running admin, or one to which we are in the process of - connecting. - -2007-04-09 Thomas Vander Stichele - - * env.in: - * misc/flu-uninstalled: - Don't add empty paths to PATH variables. - -2007-04-09 Thomas Vander Stichele - - * common/trial.mk: - * flumotion/test/Makefile.am: - Set TRIAL_ENV from the calling Makefile.am - * flumotion/common/netutils.py (RoutingTable.fromFile): - * flumotion/component/base/admin_gtk.py - (FeedersAdminGtkNode.addFeederClient): - * flumotion/component/feedcomponent010.py - (FeedComponent._buffer_probe_cb): - doc fixes - -2007-04-09 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py - (FeedComponent.provide_master_clock, FeedComponent.pipelinePaused): - Adapt the doc string to what is actually being done. - defer.succeed is shorter than doing it by hand. - * flumotion/launch/main.py (ComponentWrapper.provideMasterClock): - Add comment. - -2007-04-07 Thomas Vander Stichele - - * flumotion/twisted/flavors.py (StateRemoteCache.invalidate): - Don't use setattr if we don't need to. - * flumotion/twisted/rtsp.py (RTSPRequest.process): - Don't trigger an IndexError when there are no headers in the - request. - -2007-04-07 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py (FeedComponent.init, - FeedComponent.bus_message_received_cb, FeedComponent.setup_pipeline, - FeedComponent.cleanup): - * flumotion/worker/checks/video010.py (BusResolution, - BusResolution.cleanup, message_rcvd): - bus.connect returns signal handler id's, not watch id's. - -2007-04-04 Thomas Vander Stichele - - * common/trial.mk: - Fix up the way we invoke trial to work for other projects too. - * env.in: - Use common shell construct to prepend to PATH variables. - * flumotion/test/Makefile.am: - Remove TRIAL_ENV var already set in trial.mk - -2007-04-04 Thomas Vander Stichele - - * conf/Makefile.am: - * conf/examples/ondemand.xml: - Add an ondemand example. - -2007-04-04 Thomas Vander Stichele - - * flumotion/common/common.py (formatStorage): - function def fix - * flumotion/component/misc/httpfile/admin_gtk.py - (StatisticsAdminGtkNode.setStats, - StatisticsAdminGtkNode.registerLabel, - StatisticsAdminGtkNode.updateLabels, - StatisticsAdminGtkNode.haveWidgetTree, HTTPFileAdminGtk.setup): - Add translated title to UI page, so admin displays it. - Format total bytes consumed. - * flumotion/component/misc/httpfile/httpfile.py - (HTTPFileStreamer.do_check): - http-streamer doesn't require a port, so http-server shouldn't - either. - -2007-04-04 Andy Wingo - - * flumotion/admin/command/main.py (setup_reactor): - * flumotion/admin/gtk/main.py (startAdminFromGreeter.got_state) - (startAdminFromManagerString, startAdminFromGreeter.refused): - * flumotion/admin/gtk/client.py (Window.on_open_connection): - * flumotion/admin/text/connection.py (connect_to_manager): - * flumotion/admin/multi.py (MultiAdminModel.addManager): Use the - new admin connection interface. - - * flumotion/admin/admin.py (AdminClientFactory.__init__): Take - maxDelay as an optional keyword argument. - (AdminModel.__init__): Incompatible change: no authenticator arg - to __init__, and ... - (AdminModel.connectToManager): Renamed from connectToHost (so as - to catch bugs), and take a PBConnectionInfo, including the - authenticator. - (AdminModel.shutdown): More robust implementation. - (AdminModel.reconnect): Don't much with clientFactory, just call - shutdown() and then connectToManager(). - (AdminModel.connectionInfoStr, AdminModel.managerInfoStr) - (AdminModel.connectionFailed, AdminModel.setRemoteReference): - Update code that assumed presence of self.host, self.port, and - self.use_insecure. - - * flumotion/twisted/flavors.py - (StateRemoteCache._notifyListeners): Factor out the notification - code into a method. Allow the set of listeners to change during - the emission. - - * flumotion/ui/glade.py (flumotion_glade_custom_handler): Add a - comment. - -2007-04-04 Michael Smith - - * flumotion/common/common.py: - This function is deprecated, not depreciated. - -2007-04-03 Andy Wingo - - * flumotion/component/base/admin_gtk.py - (BaseAdminGtkNode.loadGladeFile): Add a comment. - - * flumotion/common/medium.py (BaseMedium.setRemoteReference): - Update for new bundleclient interface. - - * flumotion/common/bundleclient.py (BundleLoader.__init__): Take a - callRemote function instead of a remote reference. Allows us to - hook into the logging from medium.Medium. Update callers to use - self.callRemote. - - * flumotion/manager/admin.py - (AdminAvatar.perspective_getEntryByType): Allow the caller to - specify the componentType, instead of requiring it to come from a - non-sleeping component state. - - * flumotion/common/medium.py (BaseMedium.getBundledFunction): - Split out of runBundledFunction. - (BaseMedium.runBundledFunction): Use getBundledFunction. - -=== release 0.4.2 === - -2007-04-03 Andy Wingo - - * flumotion/twisted/flavors.py (StateRemoteCache.invalidate): - Iterate over a copy of the keys list. - -2007-04-03 Michael Smith - - * flumotion/manager/component.py: - Do this after jobState is attached. - -2007-04-03 Michael Smith - - * flumotion/manager/component.py: - If a component logs in while happy, trigger any deferreds that were - waiting for it to be happy. - Prevents stale moodPending entries from remaining forever. - -2007-04-03 Andy Wingo - - * flumotion/common/planet.py (AdminFlowState) - (AdminAtmosphereState, AdminPlanetState): Extend invalidate() to - recurse into kids before chaining up. - - * flumotion/test/test_common_planet.py (InvalidateTest): New test - that invalidating a planet does a depth-first invalidate on its - kids. - - * flumotion/test/test_flavors.py (TestState): Factor out a base - test case class. - - * flumotion/twisted/flavors.py (StateRemoteCache.invalidate): - _ensureListeners() before accessing _listeners(). I tried for - about 20 minutes to make a test case for this but failed. - -2007-04-03 Michael Smith - - * flumotion/twisted/defer.py: - Remove reflect.namedClass call inside try block, so that a failed - call will result in us constructing a readable/useful generic - Exception, rather than a useless, truncated, ImportError from deep - in the reflection code. - -2007-04-03 Michael Smith - - * flumotion/twisted/defer.py: - With python 2.5, CopyableFailures have a type attribute that doesn't - have the form expected by our defer_generator. - Instead, use the parents attribute, which is guaranteed to work the - way we want it to. - - Fixes conversion of remote failures to exceptions in defer_generator - under python 2.5. - - * flumotion/admin/admin.py: - Revert patch from #596, as it's no longer needed. - -2007-04-03 Andy Wingo - - * flumotion/test/test_flavors.py - (TestFullListener.testInvalidate): Test for new functionality. - - * flumotion/twisted/flavors.py: Update comment, it seems - invalidate is a good idea after all. - (StateRemoteCache.addListener): Support an invalidate callback. - Call it if set and the state is already invalid. - (StateRemoteCache.invalidate): New method. - - * flumotion/test/test_flavors.py: Remove twisted 1.3 crufties. - - * flumotion/twisted/flavors.py: Add a comment. - -2007-04-02 Zaheer Abbas Merali - - * flumotion/component/effects/volume/volume.py (Volume.setUIState): - Admin UI code expects a list, do not set to just a value. - -2007-03-30 Andy Wingo - - * flumotion/manager/main.py (main): Pass along the configDir when - making Vishnu. - - * flumotion/manager/manager.py (Vishnu.__init__): New optional - argument, configDir, defaulting to configdir/managers/NAME/. - - * flumotion/manager/admin.py (AdminAvatar._saveFlowFile): Save to - flows/ within the directory from which the original flow file was - loaded; i.e. don't guess at that dir's name. - -2007-03-29 Michael Smith - - * flumotion/admin/gtk/main.py: - Reorder callbacks/errbacks in greeter to avoid double-destroying a - greeter and hence failing badly if we initially failed to connect to - a manager. - -2007-03-28 Andy Wingo - - * flumotion/test/test_common_netutils.py - (TestRoutingTable.testParseFromFile): Add a couple tests. - - * flumotion/common/netutils.py (RoutingTable.fromFile): Make route - names optional. Trim trailing whitespace. - -2007-03-27 Michael Smith - - * flumotion/admin/admin.py: - Apply patch to getEntry to not use deferred generator, which was - mysteriously breaking things. - Fixes #596. - -2007-03-26 Thomas Vander Stichele - - * flumotion/service/service.py (Servicer._parseManagersWorkers, - Servicer.getWorkers): - Sort the list of managers and workers. - -2007-03-26 Michael Smith - - * flumotion/worker/feed.py: - Change indentation to 4 columns rather than 8 for one method. - -2007-03-22 Michael Smith - - * flumotion/admin/gtk/main.py: - Fix specifying admin on command line. - -2007-03-22 Michael Smith - - * flumotion/admin/gtk/client.py: - Don't use undefined variables if setup() raises. - * flumotion/component/producers/looper/admin_gtk.py: - The admin told me this had a bug, so fix it. - -2007-03-21 Andy Wingo - - * flumotion/admin/gtk/greeter.py (StartNew.on_next): Make sure - that bindir is in the path when we run the service script. - - * flumotion/admin/gtk/main.py: Make it so the greeter doesn't run - a recursive main loop and just uses the reactor. Seems to work but - will need some testing. - - * flumotion/admin/gtk/wizard.py (WizardCancelled): New exception, - errbacked by Wizard.run_async() if the user cancels the wizard. - (Wizard.show, Wizard.destroy): Removed, GladeWindow does this for - us. - (Wizard.on_delete_event): Emit finished instead of stopping a main loop. - (Wizard.run_async): New method. Returns a deferred that will fire - when the user has decided on something. - (Wizard.run): Implement using run_async. - -2007-03-21 Thomas Vander Stichele - - * flumotion/manager/base.py (ManagerAvatar._mindCallRemoteErrback): - Use a better failure logging method. - -2007-03-21 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.remote_setGstDebug): - add remote method that allows us to set a GST_DEBUG string at - runtime on a component. - -2007-03-21 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py (FeedComponent.init): - Check for existence of property rather than version. - -2007-03-21 Zaheer Abbas Merali - - * flumotion/component/producers/firewire/firewire.py: - Someone forgot to add queues after the demuxer. Not having queues - breaks functionality with GStreamer >= 0.10.13. - -2007-03-20 Michael Smith - - * flumotion/worker/worker.py: - Because gstreamer now forks to regenerate the registry, this failure - mode results in the error propagating as a RuntimeError, not a - signal terminating our process. However, we must cope with it in the - same way, otherwise an early failure to start can cause us to end up - with an unstoppable component. - Fixes #592. - -2007-03-19 Zaheer Abbas Merali - - * flumotion/component/base/admin_gtk.py: - Remove whitespace. Thomas loves me. - Firewire seems to give us offset disconts of -1 from time to time - so > 0 should be changed to != 0 to decide whether to show - offsets on UI. - -2007-03-19 Michael Smith - - * flumotion/manager/manager.py: - If we don't have a fully-logged-in component when it gets detached, - don't throw an exception, so that we can clean up fully. - Prevents a race condition from leaving a heaven with an entry for an - avatar that isn't present, thus stopping the component from ever - logging back in. - -2007-03-15 Michael Smith - - * flumotion/manager/manager.py: - If we fail to create an Avatar for a new connection, then drop the - connection after sending an appropriate failure to the client. - Fixes #588. - -2007-03-16 Thomas Vander Stichele - - * flumotion/admin/gtk/message.py: - * flumotion/common/messages.py: - Add a timestamp to messages so we can correlate them to other - events in the log. - -2007-03-16 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - No data being received should be an info message. - -2007-03-15 Thomas Vander Stichele - - * flumotion/component/base/eaters.glade: - Only show disconts for timestamp/offset if there were any. - -2007-03-15 Zaheer Abbas Merali - - * doc/random/synchronization: - Add some blurb about timestamps, offsets and a couple of producers. - -2007-03-15 Thomas Vander Stichele - - * doc/redhat/flumotion: - Pass status arguments through too. - -2007-03-15 Thomas Vander Stichele - - * flumotion/service/service.py: - A .pid file could be empty or contain garbage. Clean it up in - that case. - -2007-03-15 Zaheer Abbas Merali - - * doc/random/synchronization: - Update doc for renaming of components. - Fix spelling mistake. - -2007-03-15 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Output a warning when we get an EOS message from something - other than an eater. Should only happen on producer components - that only run for a finite time, such as dvb with a file. - -2007-03-15 Michael Smith - - * tests/integration/common.py: - * tests/integration/test_qa.py: - * tests/integration/test_torture.py: - Integration tests have been failing for months, yay. - Fix up for yet-more-incomplete-parts of The Great Renaming. - -2007-03-15 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/eaters.glade: - Clean up UI for eaters so all settable labels are aligned - -2007-03-15 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - A lack of space after gdpdepay caused audio-encoder and video-overlay - to go hungry then lost (but sad internally). Fix the space. - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/base/Makefile.am: - dist the eaters.glade - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - Only add identity if we're actually checking disconts. - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Informational messages should not be warnings. - * flumotion/component/misc/repeater/repeater.py: - Fix version comparison. - -2007-03-14 Zaheer Abbas Merali - - * flumotion/admin/gtk/client.py: - * flumotion/common/common.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/base.xml: - * flumotion/component/base/eaters.glade: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/encoders/vorbis/vorbis010.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/misc/repeater/repeater.py: - * flumotion/component/misc/repeater/repeater.xml: - * flumotion/component/muxers/ogg.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/launch/main.py: - * flumotion/test/test_common.py: - * flumotion/test/test_component.py: - * po/POTFILES.in: - Merge of eaters-info-1. Changelog of branch follows: - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/feedcomponent.py: - Fix the tests. - * flumotion/component/misc/repeater/repeater.py: - Repeat after me, run pychecker before committing. - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Show a message if identity version is too low to show eaters - info. - -2007-03-14 Thomas Vander Stichele - - * flumotion/component/misc/repeater/repeater.py: - import the right modules - * po/POTFILES.in: - mark for translation - -2007-03-14 Thomas Vander Stichele - - * flumotion/component/misc/repeater/repeater.py: - * flumotion/component/misc/repeater/repeater.xml: - Add drop-probability as well. Allows us to test more - complex dropping scenarios. - Warn if drop-probability is set too low or too high. - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/producers/audiotest/audiotest.py: - Warn if drop-probability is set too low or too high. - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/producers/videotest/videotest.py: - Warn if drop-probability set too low or too high. - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Remove unused variables. - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Check for identity version, if too old force checkTimestamp - and checkOffset to False. - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/producers/videotest/videotest.py: - Remove bogus debug line. - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/producers/videotest/videotest.py: - Fix check, as (0, 10, 12, 0) is greater than (0, 10, 12). - -2007-03-14 Zaheer Abbas Merali - - * flumotion/component/base/admin_gtk.py: - 'source' is not necessarily specified in config. - -2007-03-13 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/test/test_common.py: - add optional fractional argument to formatTime - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/eaters.glade: - * flumotion/component/feedcomponent010.py: - Show timestamp and offset at each discontinuity. - -2007-03-13 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - Fix state watcher so setitem/delitem hides correctly. - Implement handling of offset disconts. - * flumotion/component/base/eaters.glade: - * flumotion/component/converters/overlay/overlay.py: - Overlay handles raw video and thus can check timestamps - and offsets. - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/encoders/vorbis/vorbis010.py: - Encoders deal with raw data and thus can check offsets too. - * flumotion/component/feedcomponent010.py: - Set zero values on some keys. - Add Eater.offsetDiscont() and use it from imperfect-offset messages. - * flumotion/component/muxers/ogg.py: - Ogg muxer should check incoming timestamps, but the offsets - are used to store granule pos, so ignore them. - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - These consumers deal with muxed streams, so checking timestamps - does not work, but offsets should. - -2007-03-13 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - Add an identity checking for imperfect timestamps and offsets when - requested. - * flumotion/component/base/base.xml: - * flumotion/component/base/eaters.glade: - Add the eaters glade file. - * flumotion/component/base/admin_gtk.py: - Show the eaters node if there are eaters. - Adapt the StateWatcher to work with setitem and delitem - as well so we can handle the connection dict. - Create EatersAdminGtkNode inspired by the Feeders one, - but simpler. - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/encoders/vorbis/vorbis010.py: - For Theora and Vorbis it makes sense to check timestamps. - * flumotion/component/feedcomponent010.py: - Add comments. - Add time/last/total/count Timestamp/Offset Discont to uiState's - connection. - Add last Connect/Disconnect, count/total Timestamp/Offset to - uiState. - Add Eater.connected/disconnected/timestampDiscont. - Add FeedComponent.checkTimestamp/Offset so that FeedComponent - subclasses can indicate whether it makes sense to check for - the specific type of discontinuities. - Check for imperfect-timestamp messages. - -2007-03-13 Thomas Vander Stichele - - * flumotion/component/producers/videotest/videotest.py: - Fix typo to find the right plugin. - -2007-03-12 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - Trap NoBundleError to avoid an embarassing Error message. - -2007-03-12 Thomas Vander Stichele - - * flumotion/launch/main.py: - Give us more information on where the problem originates by - using log.getFailureMessage - -2007-03-12 Thomas Vander Stichele - - * po/POTFILES.in: - mark test producers for translation - -2007-03-12 Thomas Vander Stichele - - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/videotest/videotest.xml: - Add drop-probability to our two test producers. - Warn if GStreamer is not new enough to properly support them. - -2007-03-08 Zaheer Abbas Merali - - * flumotion/component/base/eaters.glade: - Add eaters glade. - -2007-03-08 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Add eater class and uiState for eaters. Does not yet fill it. - -2007-03-08 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Duh, identity needs to be in the DEPAY_TMPL after the depayloader! - -2007-03-08 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Remove EATERS_TMPL as it is now dynamic. - Add identity check-perfect=true to the FDSRC_TMPL so we can - track stream perfection. - * flumotion/test/test_component.py: - Refactor test so that it uses the dynamic get_eater_template() - and get_feeder_template(). - -2007-03-14 Michael Smith - - * flumotion/common/netutils.py: - Add a route iterator. - -2007-03-14 Sebastien Merle - - * flumotion/twisted/compat.py: - Added a compatibility function to check if an objec tis an interface. - Didn' t added the code for twisted < 2 - because it will go away soon anyway. - -2007-03-13 Thomas Vander Stichele - - * data/glade/Makefile.am: - * data/glade/greeter-initial.glade: - * data/glade/greeter-start_new.glade: - * data/glade/greeter-start_new_error.glade: - * data/glade/greeter-start_new_success.glade: - Add new greeter glade files. - * flumotion/admin/gtk/greeter.py: - Implement starting a manager and worker for the user. - * flumotion/admin/gtk/wizard.py: - Make WizardStep take the Wizard in the constructor so .wizard - actually gets set. - Allow on_next to return a *signaled* return value to indicate - that it will fire a signal when it is done, allowing non-blocking - work to be done in the background. - Handle the next button sensitivity while the wizard is doing stuff. - -2007-03-12 Thomas Vander Stichele - - * flumotion/service/service.py: - Don't comment out the manager port to connect to. - Set to debug level 4 by default. - -2007-03-12 Thomas Vander Stichele - - * flumotion/common/config.py: - Expose BOOL_TRUE_VALUES so we can use it somewhere else - * flumotion/service/service.py: - Set feeder ports to random by default. We should change this in - the future after using the Command classes for options. - * flumotion/test/test_worker_worker.py: - Fix the test. - * flumotion/test/test_workerconfig.py: - Add test for random feeder ports. - * flumotion/worker/config.py: - Allow specifying random feeder ports in the configuration. - -2007-03-12 Thomas Vander Stichele - - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - Implement --random-feederports as per #585. - -2007-03-12 Thomas Vander Stichele - - * flumotion/admin/gtk/main.py: - Add a comment. - -2007-03-12 Michael Smith - - * flumotion/common/netutils.py: - Make parser work again. - -2007-03-12 Michael Smith - - * flumotion/common/netutils.py: - Add function getRouteNames() to get a list of all named routes in - the RoutingTable. - -2007-03-08 Thomas Vander Stichele - - * flumotion/service/service.py: - Make sure the workers directory exists. - -2007-03-08 Thomas Vander Stichele - - * flumotion/worker/checks/check.py: - Fix pychecker error. - -2007-03-08 Thomas Vander Stichele - - * flumotion/worker/checks/check.py: - add a generic checkPlugin method to be used in checks - -2007-03-08 Thomas Vander Stichele - - * flumotion/component/component.py: - Checks are responsible for adding error messages to the component. - Fixes those pesky bogus component setup error messages without - info. - -2007-03-08 Michael Smith - - * flumotion/manager/manager.py: - Work around a pychecker bug so I can run pychecker again. - -2007-03-08 Michael Smith - - * flumotion/twisted/fdserver.py: - Backwards compatibility for FDClient; accept messages without our - special magic cookie. - -2007-03-08 Michael Smith - - * flumotion/worker/worker.py: - WorkerBrain now only binds sockets in listen(), not in __init__, - which returns False if it fails. - Make sure various functions don't fail if we didn't call listen() - - * flumotion/worker/main.py: - Create WorkerBrain and call listen() on it before daemonizing. - If listen() fails, print an error and exit; this is fatal. - -2007-03-07 Michael Smith - - * flumotion/worker/worker.py: - After some timeout (this should be made configurable somehow), if - a job has refused to shut down, SIGKILL it. - -2007-03-07 Michael Smith - - * flumotion/component/consumers/disker/disker.py: - Rename file_fd to file; it's not an fd. - Where we claim to close the file, close it. - Don't call reactor methods from non-reactor threads; use - callFromThread. - -2007-03-07 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Remove now-unused import to prevent complaints from pychecker. - -2007-03-07 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - client-added is called only from the reactor thread, so we don't - need a decoupling queue. - - cliend-fd-removed is called by non-reactor threads, so handle this - with reactor.callFromThread() rather than reinventing that via a - periodic callLater checking a queue. - - Everything that wants to update UIStates is now done in the reactor - thread, so just call update_ui_state, rather than setting a flag and - checking it periodically. - -2007-03-07 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Don't update uiState objects from non-reactor threads. - -2007-03-07 Michael Smith - - * flumotion/component/feedcomponent010.py: - Do not update UI state objects from non-reactor threads; doing so is - very unsafe. - - Ensure we only operate on the FeedComponent._probe_ids dict with - 'atomic' python operations. - - Do not call any reactor methods other than reactor.callFromThread - from non-reactor threads. _checkEater calls many reactor threads and - also mutates other internal state; call this through - reactor.callFromThread too. - - Eater reconnection should now be threadsafe. - - * flumotion/test/test_feedcomponent010.py: - Rearrange test now that some updating is only done from a - reactor.callFromThread call, so we can't check it immediately. - -2007-03-06 Michael Smith - - * flumotion/component/feedcomponent010.py: - Move fd cleanup logic into the Feeder class. - Only close fds from the reactor thread; doing otherwise causes a - race. - Don't call get-stats unless we have plugins-base 0.10.11, because - an unavoidable race can cause segfaults in earlier versions. - Don't use the client-removed signal from multifdsink, since it's not - needed any more; we can't avoid the race we were trying to avoid. - Make getClients() return a list of FeederClients rather than a dict. - - * flumotion/component/feedcomponent.py: - Don't attach client-removed signal. - - * flumotion/test/test_feedcomponent010.py: - Update for API changes. - -2007-03-06 Michael Smith - - * flumotion/component/feedcomponent.py: - Add some comments. - * flumotion/component/feedcomponent010.py: - Add comments. - Rename eaterConnected and eaterDisconnected to eaterSetActive, - eaterSetInactive, to more accurately reflect what they actually do. - Rename internal variables to match. - -2007-03-06 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - * flumotion/test/test_feedcomponent010.py: - Set the keys we know we support to 0, the others to None. - Update the test for it. - -2007-03-06 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - * flumotion/component/feedcomponent010.py: - Use None for uiState values to indicate "component has no support - for reporting this" so we can show "Unknown" in the UI - -2007-03-05 Thomas Vander Stichele - - * conf/Makefile.am: - * conf/examples/twores.xml: - Add an example of streaming and recording at different resolutions. - -2007-03-05 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - Don't traceback with older plugins base for the uiState - calculations. - -2007-03-05 Andy Wingo - - * flumotion/common/common.py (daemonizeHelper._deletePidFile): Fix - very broken deletePidFile. - - * flumotion.spec.in (BuildRequires): Require python-twisted-web - and -names. - -2007-03-02 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/feeders.glade: - * flumotion/component/feedcomponent010.py: - Also show when the last buffer was read, to debug longer - connection problems. - -2007-03-02 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - Move fd out of the constructor for FeederClient, since it - is something that can change or be None during its lifetime. - Make sure we actually set .fd as well to be correct. - get-client-stats can return a 0-length array if the fd is invalid, - so warn better when that happens. - -2007-03-02 Sebastien Merle - - * flumotion/component/base/admin_gtk.py: - Added more comments and changed a class variable name - to make it less ambiguous. - -2007-03-02 Thomas Vander Stichele - - * flumotion/test/test_feedcomponent010.py: - Fix test after I renamed methods at the last moment. - -2007-03-02 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/feeders.glade: - * flumotion/component/feedcomponent010.py: - Make Feeder track FeederClient over multiple reconnects. - Add additional uiState keys, so we can get information - like total reconnects, total bytes read/buffers dropped, - and connect/disconnect times. - * flumotion/test/test_feedcomponent010.py: - Add a unit test for the FeederClient behaviour. - -2007-03-01 Michael Smith - - * common/gendoc.py: - Docs stuff needs a reactor too. - -2007-03-01 Michael Smith - - * flumotion/common/boot.py: - * flumotion/common/common.py: - * flumotion/worker/main.py: - Pychecker fixes. - - * misc/pycheckerhelp.py: - * tests/checks.py: - Update for removal of compat reactor code. - -2007-03-01 Michael Smith - - * flumotion/twisted/compat.py: - * flumotion/twisted/gtk2reactor.py: - * flumotion/twisted/Makefile.am: - We no longer support twisted 1.3, so we don't need a private copy of - the gtk2reactor. Also delete the code that picked which reactor to - install. - - * flumotion/common/boot.py: - Install a gtk2 reactor here unconditionally (moved from compat.py) - - * flumotion/common/common.py: - Add a utility function to set up our standard log messages and - optionally daemonize. - When daemonizing, a stale pid file is an error, always. - - * flumotion/component/component.py: - Don't call self.error, as it tracebacks if we don't override it. - Don't override self.error to do silly things like stopping the - reactor unconditionally. - - * flumotion/job/job.py: - Do not call self.error - - * flumotion/manager/admin.py: - Don't raise SystemExit on a remote stop() call, just stop the - reactor. - - * flumotion/manager/main.py: - Use new startup helper for logging and daemonizing. Do not wrap - reactor.run in try/except. Do not print THOMAS WAS HERE, because - possibly thomas wasn't here. - - * flumotion/worker/worker.py: - Don't call self.error, or override it, as above. - Add some API to Kindergarten to set a deferred to fire when our last - child terminates. - When shutting down, wait until children actually terminate. - - * flumotion/worker/main.py: - Use new startup helper for logging and daemonizing. Do not wait for - pids after the reactor exits. - -2007-03-01 Thomas Vander Stichele - - * flumotion/ui/glade.py: - Put back an experimental generator that was used by - flowtester. - -2007-03-01 Thomas Vander Stichele - - * flumotion/worker/main.py: - Factor out a method to read the config. - -2007-03-01 Thomas Vander Stichele - - * flumotion/job/main.py: - * flumotion/manager/main.py: - * flumotion/worker/main.py: - Make logging of start and stop of worker/manager uniform so - we can easily find those points in the log. - -2007-02-28 Michael Smith - - * flumotion/twisted/defer.py: - Add a utility method to wrap a deferred with another deferred that - will fire in response to the first deferred firing, but only from a - callLater - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - Remove old manual sigterm handling in favour of using a reactor - shutdown hook. Use new fdefer.defer_call_later to fire the returned - value from a callLater - * flumotion/job/job.py: - Don't fire shutdown-hook deferreds other than in a callLater; needed - for PB correctness. - -2007-02-28 Michael Smith - - * flumotion/component/component.py: - * flumotion/twisted/fdserver.py: - * flumotion/worker/worker.py: - Clean up more shutdown logic. - Ensure a failed login to the manager (other than initially) doesn't - cause a reactor shutdown. - Don't set our mood to sad when we just stopped the reactor; it isn't - useful. - -2007-02-28 Michael Smith - - * flumotion/component/component.py: - * flumotion/job/job.py: - Rewrite component/job shutdown to have a clean shutdown path going - only through the job. - Ensure through this path that we only ever stop the reactor once. - Should fix a variety of shutdown races triggered by calling - reactor.stop() from a reactor shutdown hook. - -2007-02-28 Michael Smith - - * flumotion/component/feedcomponent010.py: - client-removed has an extra argument; make sure we have it. - -2007-02-27 Michael Smith - - * flumotion/twisted/fdserver.py: - Comments to make wingo weep a little less. - -2007-02-27 Michael Smith - - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - Split removeFDCallback into removeClientCallback and - removeFDCallback, attached to client-removed and client-fd-removed, - as required for race-free use of multifdsink. - -2007-02-27 Michael Smith - - * flumotion/twisted/fdserver.py: - Stream sockets don't guarantee us message boundaries. We can't - switch to datagram sockets as they're unreliable. So, provide - protocol-level message boundaries for our FD-passing messsages, and - strip them out before passing on to PB. - Prevents protocol errors when connecting to the feed server under - load. - -2007-02-27 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Ensure we chain up to our parent when stopping! - Possibly fixes some shutdown races. - - * flumotion/component/feedcomponent010.py: - Add some debug. - -2007-02-26 Thomas Vander Stichele - - * flumotion/admin/gtk/wizard.py: - Document and comment. subclass log.Loggable. - -2007-02-26 Thomas Vander Stichele - - * flumotion/ui/glade.py: - Some easy refactoring. Create a common GladeBacked class to - avoid repeating and diverging code. Remove an experimental - generator method that I can't find any callers of. - Document and comment. - -2007-02-23 Thomas Vander Stichele - - * data/Makefile.am: - * data/make-dummy-cert: - * doc/Makefile.am: - * doc/redhat/make-dummy-cert: - move make-dummy-cert to datadir - * flumotion/configure/configure.py: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - add datadir - * flumotion/service/main.py: - * flumotion/service/service.py: - add a way of creating default manager and worker configs - -2007-02-23 Thomas Vander Stichele - - * flumotion/manager/main.py: - break out a createParser function - -2007-02-23 Thomas Vander Stichele - - * flumotion/common/common.py: - log where we try to get the pid from - * flumotion/service/service.py: - allow setting different logdir and rundir, and pass it on to - managers and workers we start - * flumotion/manager/main.py: - * flumotion/worker/main.py: - add logdir and rundir options ... - * flumotion/service/main.py: - ... and a configdir option - * flumotion/configure/configure.py: - document that we're fine with the programs poking values into this - module - This allows a user to run an installed flumotion with the service - binary, without touching the system-installed directories. - -2007-02-23 Thomas Vander Stichele - - * flumotion/common/common.py: - Catch permission denied when not able to write to the log file. - Make sure we exit for that before we fork. - -2007-02-22 Andy Wingo - - * bin/flumotion-tester.in (main): Fix bogus log statement, thanks - to edrz for the tip. - - * flumotion/common/netutils.py (RoutingTable.iterHumanReadable): - New method, iterate the routes as the route, network IP as a - string, and prefix length as an int. - - * flumotion/test/test_common_netutils.py - (TestRoutingTable.testIterHumanReadable): Test new function. - - * flumotion/test/test_common_netutils.py - (TestIpv4Parse.testIpv4ParseString): Test validation. - - * flumotion/common/netutils.py (ipv4StringToInt): Validate the IP. - -2007-02-22 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - If we get a gstreamer error, errback any stateChangeDefers that - are for state changes going up and any downward ones that start - from a higher state than the current state of the pipeline. - -2007-02-21 Andy Wingo - - * flumotion/common/netutils.py (RoutingTable.fromFile): New way of - instantiating a routing table, parsing from a file. - - * flumotion/test/test_common_netutils.py - (TestRoutingTable.testParseFromFile): Test case. - -2007-02-21 Michael Smith - - * flumotion/worker/worker.py: - If we have previously successfully logged in to the manager, an - authentication failure should be non-fatal; it's probably a - transient fault. - -2007-02-20 Andy Wingo - - * flumotion/common/common.py (daemonizeHelper): Install a - post-shutdown hook to delete the PID file. - (daemonizeHelper): Fix the post-shutdown hook, and make it so that - if we run and there's a stale PID file, we are more tenacious. - -2007-02-19 Zaheer Abbas Merali - - * flumotion/component/encoders/theora/theora.py: - Repeat after me, do not modify the config dict! - Fixes #571 - -2007-02-19 Thomas Vander Stichele - - * flumotion/launch/main.py: - print out additional debug info if it's there - -2007-02-19 Thomas Vander Stichele - - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/disker/disker.xml: - make rotateType default to None - add an Error message if a rotateType is given but the - corresponding property is not - -2007-02-18 Thomas Vander Stichele - - * flumotion/component/bouncers/icalbouncer.py: - a stray tab was breaking trial --coverage; expand it - -2007-02-18 Thomas Vander Stichele - - * common/pychecker.mk: - Andy removed the configure-time GStreamer version checking, - so pychecker does not check 0.10 code anymore. - Since atm we always require 0.10, make this an always true statement - instead to get it checked. - -2007-02-16 Michael Smith - - * flumotion/component/bouncers/bouncer.py: - Refactor base bouncer class to split 'authenticate' into a base - method that enforces keycard classes and enabled/disabled state, and - a new 'do_authenticate' method for subclasses to implement their - specific behaviour, mirroring the setup/start/stop API. - Make base bouncer class have 'enabled' state, and remote method to - change it. - Add a trivial bouncer example that only acts on that state. - Add a subclass for challenge-response bouncers. - - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/bouncers/saltsha256.py: - Move to using ChallengeResponseBouncer class. - - * flumotion/component/bouncers/icalbouncer.py: - * flumotion/component/bouncers/tokentest.py: - Clean up now that new API does more for us. - -2007-02-14 Andy Wingo - - * flumotion/common/avltree.py (insert, delete): Fix string - splicing. - -2007-02-14 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - If we get a gstreamer error, errback any stateChangeDefers for - READY->PAUSED. This fixes issue where we do not errback on - providing master clock. - * flumotion/manager/component.py: - Handle errback on providing master clock, and release port on - error. - Fixes #568. - -2007-02-14 Andy Wingo - - * flumotion/common/avltree.py (insert, delete): Fix string - splicing. - - * flumotion/common/netutils.py (RoutingTable.addSubnet): Sanity - check: net should not be too specific for mask. - (RoutingTable.__iter__): Iterate the tree in reverse order, so we - get most specific netmasks first. - - * flumotion/common/avltree.py (iteratereversed) - (AVLTree.__iter__): Implement reverse iteration. - - * flumotion/test/test_common_netutils.py - (TestRoutingTable.testBasicRouting): Rename from testRouting. - (TestRoutingTable.testBasicRouting): New test, tests that more - specific matching netmasks have precedence. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/test_common_avltree.py: Add test for all kinds of - insertion/deletion patterns. Hopefully comprehensive. - - * flumotion/common/avltree.py (height): Fix copynpasteo. - (_balance): Fix balance factors and hdiff returns in a number of - cases, brought out by the test suite. - (insert): Only report an increase in height if the balance factor - was even or tilted towards the inserted side. - -2007-02-14 Thomas Vander Stichele - - * flumotion/component/producers/firewire/firewire.py: - always scale down to solve interlacing, even if the end height - is more than 288 - -2007-02-14 Sebastien Merle - - * common/pychecker.mk: - Keep the environment PYTHONPATH variable. - Now uninstalled gst-python can be used. - * flumotion/component/base/admin_gtk.py: - Keep a reference to the glade file in BaseAdminGtkNode to be able - to create more widgets from the same file. - Added a method to create a new instance of a widget by name. - -2007-02-13 Andy Wingo - - * flumotion/test/test_common_netutils.py - (TestRoutingTable.testRoute): Update tests. - - * flumotion/common/netutils.py (RoutingTable): Change "Network" to - RoutingTable, and make it use an AVL tree. - - * flumotion/common/avltree.py: New file, an AVL tree - implementation. - -2007-02-13 Michael Smith - - * flumotion/component/bouncers/icalbouncer.py: - Thomas broke ANOTHER THING WITH HIS DAMN RENAMING. - -2007-02-12 Andy Wingo - - * flumotion/common/netutils.py (ipv4IntToString): Change the - algorithm to appease pychecker? Nits? - - * flumotion/common/netutils.py (Network._parseSubnet) - (Network.addSubnet, Network.removeSubnet): - * flumotion/test/test_common_netutils.py - (TestNetwork.testAddRemove): Remove support for noncontinguous - netmasks, as it seems they don't work on the Real Internet(tm). - Fewer error paths! - - * flumotion/common/netutils.py (ipv4StringToInt, ipv4IntToString): - New functions. We could use inet_pton and the like from socket, - but the interface seems more error-prone. - (Network): New object, a named set of subnets. Has a match() - method to test if an ipv4 address falls within the set. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/test_common_netutils.py: New tests, test ipv4 - parsing and the Network subnet set object. - -2007-02-09 Michael Smith - - * data/upgrade-to-0.4.1.xsl: - Rewrite theora bitrate rule to be more specific and elegent. - Fixes problem where all other bitrate props were being deleted. - -2007-02-08 Andy Wingo - - * common/common.mk (dist-hook): Add a dist hook to remove the - cache dir, which could contain a registry after distcheck. - -2007-02-07 Andy Wingo - - * common/trial.mk (TRIAL_ENV): Make the environment that we run - our tests in configurable, defaulting to top_srcdir. - - * flumotion/test/Makefile.am (TRIAL_ENV): Flumotion generates the - env script, so set TRIAL_ENV to top_builddir. - - * common/trial.mk (trial): Use the env script instead of mucking - with pythonpath. Other flumotion modules might need to add an en - script. - - * env.in (src_dir): Properly subst in @top_srcdir@, which is - relative to top_builddir. - -2007-02-06 Andy Wingo - - * flumotion/common/boot.py (init_gst, boot): Fix so that checking - the version doesn't require a built installed/uninstalled.py. - - * configure.ac: When running python code from the source tree, add - srcdir to the pythonpath. Fixes builddir != srcdir. - - * common/as-python.m4: Make it so that a negative result of a - check is reported by python itself; allows multiple failure modes - to be reported properly. - -2007-02-06 Michael Smith - - * flumotion/common/boot.py: - Move tup2version() to where it needs to be to work. - Fix except call that pychecker didn't like. - -2007-02-06 Andy Wingo - - * common/as-python.m4: Allow stdout of the test program to hit the - console. Write the catchall exception message to stderr. - - * flumotion/common/boot.py: Moved here from boot.py.in; not - autogenerated any more. Less clever and more comprehensive checks. - Don't munge sys.path any more to include dirs found at - configure-time; instead if the caller wants to affect which pygtk - we find it should change the environment. Fixes #500. - - * pkgconfig/flumotion.pc.in: - * pkgconfig/flumotion-uninstalled.pc.in: Don't add gstreamer to - the pkg-config requires; pkg-config is unsuited to flumotion. - - * configure.ac: Remove pkg-config checks for gstreamer and pygtk - -- use the same runtime checks that flumotion uses. We have to - check pygtk's pkg-config file tho, because of defs and codegen. - - * common/as-python.m4: Only check for python >= 2.2. Use - sys.version_info instead of textual comparison. Add 2.3, 2.4, and - 2.5 as candidates. - -2007-02-06 Michael Smith - - * data/upgrade-to-0.4.1.xsl: - A more complete component name and property name upgrader. This one - works for all the configs I have. - -=== release 0.4.1 === - -2007-02-01 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - Since a mount-point of / doesn't work, issue a clear failure message - for that case. - -2007-02-01 Michael Smith - - * flumotion/component/component.py: - Always exit after calling stop(), even if the component stop fails - for some reason (otherwise the component will be upstoppable). - -2007-01-31 Michael Smith - - * README: - We don't support twisted 1.3 in 0.4.x - -2007-01-31 Andy Wingo - - * flumotion/twisted/portal.py (BouncerPortal._authenticateCallback): - * flumotion/worker/feed.py (getKeycardClassesCb): Debug - improvements. - (_WorkerFeedDispatcher.requestAvatar): Prevent a race condition if - the remote side shuts down the socket right after authenticating. - See #566. - - * tools/analyze-flu-log (TracebackAnalyzer.finish_traceback) - (TracebackAnalyzer.print_summary): OK finally order them by when - we first saw the tracebacks, and print a summary. - -2007-01-31 Michael Smith - - * flumotion/manager/manager.py: - A component config must ALWAYS have an avatarId, so when inventing a - config for a logging-back-in component, add this. - -2007-01-31 Andy Wingo - - * tools/analyze-flu-log (TracebackAnalyzer): New log analyzer, - finds unique tracebacks, printing them in order of how many times - they were seen. - (analyze, main): Add support for --tracebacks. - (TracebackAnalyzer.linein): Break on 'Twisted traceback:' also. - (TracebackAnalyzer.print_summary): Sort by count and length of - traceback. - - * flumotion/test/test_twisted_compat.py: Remove tests for - deprecated behavior, and enable tests that didn't work on T1.3. - - * flumotion/component/feedcomponent010.py - (FeedComponent.eatFromFD, FeedComponent.feedToFD): If we don't - have a pipeline yet, just close the fd and return, assuming that - the other element will eventually reconnect when we are fully set - up. - -2007-01-24 Andy Wingo - - * flumotion/admin/commands.py - (_parse_typed_args._do_parse_typed_args): Parse dicts and bools. - For example, {(sb)(is)} foo true 3 bar => {'foo': True, 3=>'bar'}. - - * flumotion/admin/gtk/client.py (Window.setPlanetState): Accept - the first flow instead of rejecting any flow not named 'default'. - -2007-01-24 Thomas Vander Stichele - - * flumotion/component/component.py: - ignore already handled setup errors - * flumotion/component/feedcomponent.py: - raise a handled error when we fail to parse a pipeline - * flumotion/launch/main.py: - make sure we show messages - exit on handled setup errors - -2007-01-23 Zaheer Abbas Merali - - * doc/man/flumotion-worker.1: - Fix man page, fixes #546. - -2007-01-23 Andy Wingo - - * doc/redhat/flumotion: Lockfiles are only used if they have the - same name as the init script, so set flumotion.lock iff a call to - the init script succeeded and flumotion processes are running. - (start, stop): Parse type and name more robustly, fixes names like - foo@bar. Change so that a call to "flumotion stop worker foo" - always tries to stop the worker; the logic of which workers to - stop is now to check the PID files in $rundir. - -2007-01-23 Zaheer Abbas Merali - - * flumotion/common/worker.py: - Appease pychecker and make comment. - -2007-01-23 Sebastien Merle - - * flumotion/component/component.py: - Trap ComponentSetupHandledError after component setup. - Fixes #548 - * flumotion/common/worker.py: - On special cases, the PID is None when processEnded is called, - it failed trying to log it. Changed the ProcessProtocol - to handle this case properly. - -2007-01-23 Thomas Vander Stichele - - * flumotion/common/common.py: - add docstring - * flumotion/configure/configure.py: - privatize and remove type from variable name - -2007-01-23 Thomas Vander Stichele - - * flumotion/configure/configure.py: - Rename parseVersion and make it private to make sure no one uses - it outside of this module. - Don't call a tuple a Num. - * flumotion/common/config.py: - replace with versionTuple - * flumotion/common/common.py: - add versionTupleToString - * flumotion/test/test_common.py: - and a test for it - * flumotion/manager/manager.py: - Don't ever ever show a user a tuple! Also, provide a hint as to - what to do to fix the problem. - -2007-01-22 Andy Wingo - - * flumotion/common/log.py (reopenOutputFiles): Open both files in - the same way -- since we don't go through the streams layer - there's no need to think about buffering. - (reopenOutputFiles): A final try to get the perms right, I seem to - be stupid - - * doc/redhat/flumotion.logrotate: Add some more logrotate options. - - * flumotion/common/log.py (reopenOutputFiles): When rotating, - create files with a 0640 mask. - - * flumotion.spec.in: - * doc/Makefile.am (EXTRA_DIST): - * doc/redhat/flumotion.logrotate: Install a logrotate file. - -2007-01-22 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/disker/disker.xml: - Add filename property. Allows custom specification of filename - format string in config. Fixes #563. - -2007-01-22 Andy Wingo - - * flumotion.spec.in: Make log, run, and cache dirs root:flumotion - 770 so that flumotion can rotate logs, manage its PID file, and - also the registry cache. - (user): - -2007-01-21 Andy Wingo - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.do_check): Join strings, not ints. Thanks to - Johan for the tip. - -2007-01-19 Thomas Vander Stichele - - * configure.ac: - back to TRUNK - -=== release 0.4.0 === - -2007-01-18 Zaheer Abbas Merali - - * flumotion/admin/text/greeter.py: - Fix stupid issue with new connection swapping ssl and tcp. - -2007-01-18 Zaheer Abbas Merali - - * flumotion/admin/text/connection.py: - * flumotion/admin/text/greeter.py: - Clean up whitespace and initial port to 0.4 branch of text - admin. Fix issue where too many recent connections - appear causing writes past bottom of screen. - -2007-01-18 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - pass klass for debugging - * flumotion/component/producers/videotest/admin_gtk.py: - return deferred from setup - -2007-01-18 Thomas Vander Stichele - - * flumotion/common/worker.py: - properly get the interpolatable strings translated - -2007-01-18 Thomas Vander Stichele - - * po/POTFILES.in: - * po/nl.po: - Pick up another forgotten file for translation - -2007-01-18 Thomas Vander Stichele - - * flumotion.spec.in: - update config - * flumotion/twisted/portal.py: - give an error if there is no bouncer configured - -2007-01-18 Thomas Vander Stichele - - * flumotion/manager/depgraph.py: - fix docstring - -2007-01-17 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - cosmetics - * flumotion/component/base/feeders.glade: - downgrade - * po/POTFILES.in: - add feeders.glade file - -2007-01-17 Thomas Vander Stichele - - * flumotion/component/base/Makefile.am: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/base.xml: - * flumotion/component/base/plumbing.glade: - Rename file. - -2007-01-17 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/plumbing.glade: - Rename and clean up as mentioned in #540. - * po/nl.po: - update - -2007-01-17 Thomas Vander Stichele - - * flumotion/manager/manager.py: - Fix up a string. - * flumotion/component/effects/volume/volume.glade: - * flumotion/component/producers/audiotest/audiotest.glade: - * po/POTFILES.in: - Make more things translatable. - * po/ca.po: - * po/es.po: - * po/fr.po: - * po/nl.po: - * po/no.po: - * po/pt_BR.po: - Translate them. - -2007-01-17 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - So this is the new year. - -2007-01-17 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - Don't use the word Plumbing, but Feeders. Make the name - translatable. Don't show the tab if there are no feeders - (consumers for example). - * po/POTFILES.in: - Mark for translation. - -2007-01-17 Thomas Vander Stichele - - * flumotion/component/effects/volume/volume.glade: - Fix a small UI glitch. - -2007-01-17 Thomas Vander Stichele - - * flumotion/component/producers/audiotest/admin_gtk.py: - Respect the component protocol, return the .setup deferred - * flumotion/admin/gtk/client.py: - Clean up F0.2 TODO's. - Add _instanceSetup method so that we properly handle errors in - components in both cases. - -2007-01-11 Andy Wingo - - * flumotion/job/job.py (JobMedium.shutdownHandler): Wait for both - calls to complete (either with success or failure), as they are - independent, i.e. a failure on one does not mean the other will - fail or fail to complete. Fixes components showing up as lost - occasionally when a worker is control-C'd. - - * flumotion/manager/manager.py - (Vishnu._getComponentState.verifyExistingComponentState): If a - component logs in with stale configuration, update our - configuration instead of maintaining a difference between our - config and what is actually running on the component. This kinda - sucks, but fixes some cases between porters and streamers, whereby - restarting a porter can cause the streamers to not be able to - connect any more. - - * flumotion/admin/admin.py (AdminClientFactory.gotDeferredLogin): - Untested patch to respect tenacity if the login fails after the - tcp connection is made. - (AdminClientFactory.gotDeferredLogin): fix sin tax. - - * flumotion/admin/multi.py (MultiAdminModel.addManager): Take an - optional tenacity argument, to pass on to AdminMode.connectToHost. - -2007-01-10 Andy Wingo - - * flumotion/twisted/pb.py (Avatar.disconnect): Return the result - of loseConnection(). - - * flumotion/common/server.py (Server.startTCP, Server.startSSL): - Return the port we create. - -2007-01-10 Zaheer Abbas Merali - - * flumotion/component/misc/httpfile/admin_gtk.py: - Initialise _stats to None, so that a check on the value of _stats - does not traceback if _stats is not set in time. - * flumotion/component/misc/httpfile/httpfile.py: - Add a rotateLog method, mirroring the one in http-streamer. - * flumotion/component/plugs/loggers.py: - Add a rotate method, regression from 0.2.x. - -2007-01-10 Andy Wingo - - * flumotion/component/component.py (BaseComponent.init): Create - the jobstate with a mood of waking, because a component that is - running is in at least the waking state by definition. - (BaseComponentMedium.remote_getState): Remove mood check, as we - initialize the mood correctly now. - -2007-01-08 Andy Wingo - - * flumotion/common/planet.py (ManagerComponentState.setJobState): - Make sure mood is proxied last, fixes #552. - - * flumotion/manager/component.py (ComponentAvatar._setMood): use - setMood. - (ComponentAvatar.detached): Actually unlink the jobstate and - componentstate when the job logs out; was not being done before. - - * flumotion/manager/manager.py (Vishnu._getComponentState): - Because of the change in BaseComponentMedium.remote_getState, we - know we will have a non-sleeping component mood, so we can remove - this manual mood munge. - (Vishnu.componentAddMessage) - (Vishnu.workerAttached.workerAvatarComponentListReceived) - (Vishnu._addComponent, Vishnu._updateStateFromConf): Use setMood. - (Vishnu.componentStop.setSleeping): Set the component's mood to - sleeping after the disconnect deferred fires, should be enough - time for the component state to unlink from the job state. - (Vishnu._createErrback): A failed component start because a job is - already running only marks a component as lost if it did not log - in in the meantime. Fixes #551. Also use setMood. - - * flumotion/component/component.py - (BaseComponentMedium.remote_getState): Make sure that the mood - that we return is not sleeping. If it is sleeping, warn real loud - and set the mood to waking. - - * flumotion/common/planet.py (ManagerComponentState.setMood): New - method, sets the mood only if we are not listening to a jobState. - The intention is that all sets of mood go through this function so - as to prevent bad mood-proxy bugs like #551. The exception is that - the manager is allowed to mark the mood as sad. - -2007-01-03 Andy Wingo - - * flumotion/twisted/pb.py: Import errors, thanks distributed - pychecker - - * flumotion/twisted/pb.py: Import common. - (Avatar.mindCallRemote, Avatar.mindCallRemoteLogging.errback) - (Avatar.mindCallRemoteLogging.callback) - (Avatar.mindCallRemoteLogging): Floggulate. - (Avatar.disconnect): Don't error if we're already disconnected. - - * flumotion/common/medium.py (PingingMedium._ping): PONG - - * flumotion/twisted/pb.py (Avatar.__init__, Avatar.setMind): Add - support in the base avatar for setting self.mind. This interface - is orthogonal to that in flumotion.manager.base, because I don't - want to change that implementation right now, and because there's - no need for avatar.detached() given mind.notifyOnDisconnect(). - (Avatar.mindCallRemoteLogging, Avatar.mindCallRemote): Add support - for mindCallRemote[Logging] in the base class, so that all avatars - can easily support logging. Again this does not affect manager - avatars because they override this implementation. - (Avatar.disconnect): New method. - - * flumotion/common/medium.py (BaseMedium.callRemoteLogging): New - method, contains the guts of callRemote, but with an extra param - for the log level. - (BaseMedium.callRemote): Call callRemoteLogging with level=DEBUG. - (PingingMedium._ping): Use callRemoteLogging with level=LOG. - (BaseMedium.callRemoteLogging): Add an arg for the stack depth, - since this function can be called with different stacks. - (BaseMedium.callRemote): Use stack depth. - -2006-12-26 Thomas Vander Stichele - - * flumotion/wizard/enums.py: - Add some more sample rates to soundcard. - -2006-12-20 Thomas Vander Stichele - - * flumotion/common/registry.py: - Apparently the exception moved to fxml. - -2006-12-20 Thomas Vander Stichele - - * flumotion/component/bouncers/icalbouncer.xml: - * flumotion/component/bouncers/tokentest.xml: - * flumotion/component/producers/unixdomain/unixdomain.xml: - fix component type names and some random bits - -2006-12-19 Thomas Vander Stichele - - * flumotion.spec.in: - switch around to root:flumotion for ownership of various directories, - allowing users in the flumotion group to see logs and config - remove flumotion cache/home dir contents - clean up commenting in manager config - -2006-12-19 Thomas Vander Stichele - - * flumotion/common/registry.py: - Do not raise on a failure to parse the registry. - -2006-12-18 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Log some additional porter-related information. - -2006-12-18 Michael Smith - - * flumotion/common/planet.py: - Use 'append' on _jobStateListKeys, not 'set', so we don't clobber - messages added by the manager when the component logs in. - -2006-12-18 Michael Smith - - * flumotion/test/test_manager_manager.py: - Add 'messages' key to our ManagerJobState in FakeComponentMind; - tests pass again now. - -2006-12-18 Michael Smith - - * flumotion/common/config.py: - Assume versionless components are the current version. - -2006-12-18 Michael Smith - - * flumotion/common/planet.py: - Fix some out of date comments - -2006-12-18 Sebastien Merle - - * flumotion/component/consumers/disker/disker.py: - Added exception handling when opening the output file - to properly handle the IO errors. - Fixes #532 - - * flumotion/common/planet.py: - Make the manager forward the list keys to the admin. - Fixes #536 - - * flumotion/admin/gtk/client.py: - Added me in the Admin's About dialog :) - -2006-12-18 Michael Smith - - * configure.ac: - Back to dev. - - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/disker/disker.xml: - Permit a rotate-type of 'none' to disable rotation. - Fixes #534. - -2006-12-18 Thomas Vander Stichele - - * doc/redhat/flumotion: - source a sysconfig file if it exists - * flumotion/common/worker.py: - remove a space - -2006-12-14 Andy Wingo - - * flumotion/common/componentui.py - (ManagerComponentUIState.processUniqueID): Make sure that caches - of the same object are seen as the same by the jellier. - Fixes #519. - - * flumotion/component/base/admin_gtk.py - (PlumbingAdminGtkNode.removeFeederClient): Fix a buglet with our - use of the treemodel API. - -2006-12-14 Michael Smith - - * flumotion/admin/admin.py: - The call to setPlanetState on all views was wrong, and caused - tracebacks on reconnects due to the planet state being listened to - twice. - Removing it meant that the views were totally unused in all ways, - so deleted that code. - - * flumotion/admin/gtk/client.py: - * flumotion/admin/text/view.py: - Stop registering views, now that we no longer have that code. - -2006-12-14 Michael Smith - - * data/glade/admin.glade: - Change menu names, add appropriate icons, for Open/Quit/About. - Fixes #530. - -2006-12-14 Andy Wingo - - * flumotion/job/job.py (JobClientBroker.fileDescriptorsReceived): - Handle the 'redirectStdout' and 'redirectStderr' messages so that - we can rotate log files. - - * flumotion/worker/worker.py (JobAvatar.logTo): New method, sends - stdout and stderr file descriptors to the job. - (JobHeaven.__init__, JobHeaven._HUPHandler): Install a SIGHUP - handler to send newly-reopened stdout and stderr descriptors to - the job. - -2006-12-14 Michael Smith - - * flumotion/component/feedcomponent010.py: - Cancel callLater on shutdown, to satisfy some versions of trial. - -2006-12-14 Michael Smith - - * flumotion/test/test_http.py: - Use the correct method (startAuthentication) to begin - authentication, so that the errors get set correctly. - -2006-12-14 Andy Wingo - - * flumotion/test/test_http.py - (TestHTTPStreamingResource.testRenderHTTPAuthUnauthorized) - (TestHTTPStreamingResource.testRenderHTTPTokenUnauthorized) - (TestHTTPStreamingResource.testRenderHTTPTokenAuthorized) - (TestHTTPStreamingResource.deferAssertUnauthorized) - (TestHTTPStreamingResource.deferAssertAuthorized): Fix bogus - clusterfuck of deferred generators, weHaveAnOldTwisted, - unittest.deferredResult, and unit tests returning deferreds. - -2006-12-14 Sebastien Merle - - * flumotion/component/consumers/disker/admin_gtk.py: - Removed duplicated call to node's setUIState method. - Fixes #524 - -2006-12-14 Michael Smith - - * flumotion/component/base/http.py: - Delete unreachable code. - -2006-12-14 Michael Smith - - * flumotion/admin/gtk/client.py: - Make this file compliant with PEP-263. - Fixes distcheck. - -2006-12-14 Michael Smith - - * flumotion/component/converters/overlay/overlay.py: - Chain to parent do_stop() method, so we shut down the pipeline and - avoid nasty racy GIL-related failures on shutdown of overlays. - Fixes #438. - -2006-12-14 Sebastien Merle - - * flumotion/component/producers/audiotest/audiotest.glade.py: - Set the spine button value to the same value as the scale. - Fixes #525 - - * flumotion/common/boot.py.in: - Changed from PYGTK_BASE_REQ to PYGTK_010_REQ to reflect configure.ac - -2006-12-13 Andy Wingo - - * flumotion/admin/connections.py (get_recent_connections): Handle - bad connection files gracefully. Fixes #471. - - * flumotion/test/test_dialogs.py (TestErrorDialog.testDialogRun): - Deal with the errordialog returning a deferred. Unfortunately we - still need the gtk main loop, for some reason. - - * flumotion/admin/gtk/client.py - (Window.on_open_connection.refused): Catch all connection errors, - not just ConnectionFailed. Fixes #298. - - * flumotion/admin/gtk/main.py (_runInterface): Reworked to not run - the error dialogs in recursive main loops, and to fix - re-presentation of the greeter if the connection fails. - Fixes #531. - - * flumotion/admin/gtk/dialogs.py (ErrorDialog.run): Return a - deferred instead of running a recursive main loop, prevents - reactor-related errors. - (connection_refused_message, connection_failed_message): Retooled - to return deferreds instead of running modally. - - * flumotion/admin/admin.py - (AdminClientFactory.clientConnectionFailed): Less reliance on - operator precedence, better debug messages. - -2006-12-13 Sebastien Merle - - * flumotion/admin/gtk/client.py: - Added a header to specify the encoding (UTF-8). - -2006-12-13 Michael Smith - - * data/glade/wizard_overlay.glade: - Improve phrasing. - - * flumotion/component/feedcomponent010.py: - Improved use of spacebar in debug message - - * flumotion/wizard/save.py: - * flumotion/wizard/steps.py: - Clean up warnings from admin using wizard - -2006-12-12 Michael Smith - - * flumotion/twisted/flavors.py: - substitute variables in exception messages as intended. - -2006-12-12 Andy Wingo - - * flumotion/component/misc/httpfile/httpfile.xml: Fix the bundle - names for the admin, another fallout of cleanup-1. - - * data/glade/admin.glade: Set the right pane to shrink=False, - preventing clipping of the component UI. - - * flumotion/component/base/admin_gtk.py (BaseAdminGtk.setup): Fix - the check to see if we should add plumbing nodes or not. Fixes - #518. - -2006-12-12 Michael Smith - - * flumotion/wizard/save.py: - worker is no longer optional. Always specify it. Fixes mulaw. - -2006-12-12 Michael Smith - - * flumotion/component/producers/icecast/icecast.xml: - Rename to match the Grand New Naming Scheme. - -2006-12-11 Zaheer Abbas Merali - - * flumotion/component/bouncers/admin_gtk.py: - * flumotion/component/consumers/disker/admin_gtk.py: - * flumotion/component/producers/bttv/admin_gtk.py: - * flumotion/component/producers/firewire/admin_gtk.py: - * flumotion/component/producers/soundcard/admin_gtk.py: - * flumotion/component/producers/webcam/admin_gtk.py: - Replace bitrotten code with up to date code, fixes display - of plumbing node for all these components. - -2006-12-11 Zaheer Abbas Merali - - * flumotion/component/producers/firewire/admin_gtk.py: - Supply an apt named title for the Volume Effect gtk admin - node for firewire. - -2006-12-11 Zaheer Abbas Merali - - * flumotion/component/base/admin_gtk.py: - Add debugging on the plumbing node creation decision. - * flumotion/component/producers/firewire/admin_gtk.py: - Replace bitrotten code with up to date code. Fixes display - of plumbing node for firewire. - -2006-12-11 Michael Smith - - * flumotion/common/config.py: - 5 is a perfectly cromulent fraction. - - * flumotion/ui/url.py: - Allow right-click menu (open/copy link) to work again - -2006-12-11 Michael Smith - - * flumotion/component/component.py: - Add a debug line. - - * flumotion/wizard/steps.py: - Write bitrate as bits/s, as the theora encoder now uses. - -2006-12-11 Michael Smith - - * flumotion/component/component.py: - * flumotion/component/feedcomponent010.py: - Fix network clocking for the case of the clock master not being on - the same machine as the manager. - -2006-12-11 Sebastien Merle - - * flumotion/component/base/admin_gtk.py: - Change from DelItem and SetItem to Delitem and Setitem - (Requested by Andy) - -2006-12-07 Sebastien Merle - - * flumotion/admin/gtk/client.py: - Changed the parametere of reloadComponent to the correct type. - Now component reloading work from administration. - See #260 - -2006-12-07 Michael Smith - - * flumotion/common/planet.py: - * flumotion/component/component.py: - * flumotion/component/feedcomponent010.py: - * flumotion/manager/component.py: - * flumotion/test/test_manager_manager.py: - Rename 'ip' in component state to 'manager-ip'. - Rename getIP() to getManagerIP(). - This will be followed up by changes to do something useful with the - component's IP. - -2006-12-07 Michael Smith - - * flumotion/launch/inspect.py: - Print out clocking info in inspect. - -2006-12-07 Zaheer Abbas Merali - - * flumotion/admin/gtk/main.py: - * po/ca.po: - * po/es.po: - * po/fr.po: - * po/nl.po: - * po/no.po: - * po/pt_BR.po: - Added command line options to flumotion-admin to connect to manager - bypassing the greeter. - -2006-12-07 Michael Smith - - * README: - Some basic updates to the README to reflect that we no longer - support gstreamer 0.8, and require a fairly recent 0.10.x release. - -2006-12-07 Michael Smith - - * flumotion/admin/gtk/client.py: - Use a proper copyright symbol in the admin about box. - -2006-12-07 Michael Smith - - * flumotion/admin/command/commands.py: - In subclass of Deferred (this is bad crack!), chain up to parent's - init method. - Makes flumotion-command work again. - -2006-12-07 Michael Smith - - * flumotion/worker/worker.py: - Don't try to feed to a component which we don't know about. - Fixes downstream components trying to reconnect to a stopped - component. - -2006-12-07 Zaheer Abbas Merali - - * flumotion/component/producers/Makefile.am: - Add gdp to SUBDIRS. - -2006-12-05 Michael Smith - - * flumotion/component/converters/overlay/overlay.py: - Map old->new properties in overlay. - -2006-12-05 Andy Wingo - - * flumotion/admin/admin.py - (AdminClientFactory.clientConnectionFailed) - (AdminClientFactory.__init__): Configurable tenacity level. - (AdminModel.connectToHost): Take another argument, whether to keep - trying in the face of errors. - - * flumotion/worker/worker.py - (WorkerClientFactory.clientConnectionFailed): Log at level 4 when - we can't connect. - - * flumotion/common/log.py (stderrHandler): Die if we get an EPIPE, - so that closing stderr will make the process stop. - -2006-12-05 Michael Smith - - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/webcam/webcam.xml: - More fallout from cleanup-1. Make things work, hopefully. - - * flumotion/wizard/steps.py: - * data/glade/wizard_http.glade: - This code is deep voodoo. Prod to make http client-limit work again. - -2006-12-04 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Change properties to new-style in do_check(), which runs earlier - than configure_pipeline(), so that the checks don't spuriously fail. - -2006-12-04 Michael Smith - - * flumotion/configure/configure.py: - Provide versionNum as a conveniently pre-parsed version number in - addition to the (string) version. - - * flumotion/manager/manager.py: - Add a warning for components with a different version number. - -2006-12-04 Andy Wingo - - * flumotion/ui/glade.py (GladeWindow.with_blocked_signal) - (GladeWindow.__init__): Add a new decorator to call a function - with a blocked signal. - - * flumotion/component/base/admin_gtk.py - (PlumbingAdminGtkNode.removeFeederClient): Thank you distributed - pychecker. - -2006-12-04 Michael Smith - - * flumotion/component/feedcomponent010.py: - Comment out some unused variables (not removing them; these might be - useful later). Helps pychecker. - -2006-12-04 Michael Smith - - * data/upgrade-to-0.3.2.xsl: - When upgrading configs to 0.3.2, set version to 0.3.2 - - * flumotion/common/config.py: - Parse version attributes, put in config, so we can use them if we - want. - -2006-11-30 Andy Wingo - - * flumotion/ui/url.py (ClickyURL): New file, implementing a clicky - URL. - - * flumotion/ui/glade.py (GladeWindow): Clean up a bit. - - * flumotion/ui/glade.py (GladeWindow.__init__): Put the window in - the widgets dict also. - (GladeWindow.__connect_interesting_signals): Add a delicious hack - whereby if the object has set self.interesting_signals, we - autoconnect some signal handlers. - (GladeWindow.connect_signal): New proc, connects a widget to a - conventionally-named signal handler. - -2006-11-28 Andy Wingo - - * flumotion/component/base/admin_gtk.py (StateWatcher) - (PlumbingAdminGtkNode.addFeeder) - (PlumbingAdminGtkNode.addFeederClient) - (PlumbingAdminGtkNode.removeFeederClient) - (PlumbingAdminGtkNode.setUIState): Expect a list key instead of a - dict key. - - * flumotion/component/feedcomponent010.py (Feeder.__init__) - (Feeder.addClient, Feeder.removeClient, FeedComponent.init) - (FeedComponent.do_setup): Use list keys instead of dict keys for - now, making migration a bit easier. - - * flumotion/twisted/flavors.py (StateCacheable.setitem) - (StateCacheable.delitem): Rename from dictSet/dictRemove to be - more consistent with python's dicts. - - * flumotion/twisted/flavors.py (StateCacheable.dictRemove): Be a - bit more clear in the docs. - -2006-11-27 Andy Wingo - - * flumotion/admin/gtk/client.py - (Window._components_view_has_selection_cb): Make a generic admin - UI if the component does not provide one. - - * flumotion/component/base/admin_gtk.py - (PlumbingAdminGtkNode.setFeederClientBytesRead): Byte me - - * flumotion/component/base/plumbing.glade: - * flumotion/component/base/base.xml: - * flumotion/component/base/Makefile.am (component_DATA): Add the - glade file. - - * flumotion/component/base/admin_gtk.py (BaseAdminGtk.setup): Add - a "plumbing" node to all admin uis. - (StateWatcher): Experimental class to help out with recursive - state watching. Not really sure what to do with it tho. - (PlumbingAdminGtkNode): New crazy UI to see what's going on with - low-level thingses on elements. - - * flumotion/component/producers/videotest/admin_gtk.py - (VideoTestAdminGtk.setup): - * flumotion/component/producers/audiotest/admin_gtk.py - (AudioTestAdminGtk.setup): Use the stock .nodes attribute, and - chain up correctly. - -2006-11-23 Andy Wingo - - * flumotion/job/job.py (JobClientBroker.fileDescriptorsReceived): - Pass along the eaterId to the component. - (JobClientBroker.fileDescriptorsReceived): Cope with older - workers. Also this is my best hack of the last couple weeks! - - * flumotion/worker/feed.py (FeedAvatar.__init__) - (FeedAvatar._sendFeedReplyCb) - (_WorkerFeedDispatcher.requestAvatar): Take advantage of the - avatarId on the keycard to identify the feeder client. - - * flumotion/worker/worker.py (WorkerBrain.feedToFD) - (JobAvatar.sendFeed): Take an extra argument from the feed server, - the eaterId. Send it to the component via the message in - sendFileDescriptor. - - * flumotion/component/feedcomponent010.py (Feeder, FeederClient): - New classes, keep track of statistics about feeders and their - clients. Export a uiState object. - (FeedComponent.init, FeedComponent.do_setup): Set up the Feeders - as soon as we know about them. - (FeedComponent.setup_pipeline) - (FeedComponent._feeder_probe_calllater): Every so often, check the - stats from multifdsink so we can see e.g. the number of dropped - buffers. - (FeedComponent.feedToFD, FeedComponent.removeFDCallback): Add and - remove feeder clients as appropriate. feedToFD now takes an - optional eaterId argument, to identify the feeder client. - - * flumotion/admin/command/commands.py - (do_showcomponent.show_uistate): Recursive UI state printing woo. - - * flumotion/twisted/flavors.py (StateCacheable.addListKey) - (StateCacheable.addDictKey): Stricter check for default value; - otherwise passing an initial value of [] or {} was not respected, - resulting in the creation of a separate object. - -2006-11-22 Andy Wingo - - * flumotion/test/test_flavors.py (TestRoot.remote_haggis): Remove - dup bearChild - - * flumotion/admin/text/view.py (AdminTextView.update_components): - Pychecker fix. - - * flumotion/test/test_flavors.py - (TestStateSet.testStateDictListener) - (TestState.testStateDictAppendRemove, TestStateSet.listen): Add - some testes. - - * flumotion/twisted/flavors.py (StateCacheable.addDictKey) - (StateCacheable.dictSet, StateCacheable.dictRemove) - (StateRemoteCache.addListener, StateRemoteCache.observe_dictSet) - (StateRemoteCache.observe_dictRemove): Implement dict keys in - statecache/statecacheable objects. - - * flumotion/twisted/flavors.py (StateRemoteCache.addListener): In - a nod to compatibility with many managers running different - versions, allow old behavior, with a warning. - (StateRemoteCache.addListener): Cache objects are not loggable... - - * flumotion/twisted/flavors.py (StateRemoteCache.addListener): - Simplify by requiring callers to pass in event handlers for 'set', - 'append', and 'remove' events. This means that callers don't have - to implement a specific interface any more. - - * flumotion/component/base/admin_gtk.py (BaseAdminGtk.setUIState) - (BaseAdminGtkNode.setUIState): Update for new API. - (EffectAdminGtkNode): Doc fix. - - * flumotion/ui/trayicon.py (FluTrayIcon.update): - * flumotion/manager/component.py (ComponentAvatar.attached): - * flumotion/component/bouncers/admin_gtk.py - (KeycardsNode._gotStateCallback): - * flumotion/wizard/worker.py (WorkerListStore.__init__): - * flumotion/common/planet.py (ManagerComponentState.setJobState): - Update for new API. - - * flumotion/admin/command/commands.py (MoodListener) - (do_avatar_action): Update to take advantage of new API. Increase - evil in the world. - - * flumotion/admin/gtk/client.py (Window.setPlanetState) - (Window._components_view_has_selection_cb): - * flumotion/admin/gtk/parts.py (ComponentsView.update): - * flumotion/admin/text/view.py (AdminTextView.update_components) - (AdminTextView.setPlanetState): Update to comform to and take - advantage of newer API. - - * flumotion/test/test_manager_manager.py (MyListener.__init__) - (TestVishnu._verifyConfigAndOneWorker): - * flumotion/test/test_common_planet.py (setUp): - * flumotion/test/test_flavors.py - (TestStateSet.testStateWrongListener.got_state_and_stop) - (TestStateSet.listen, TestStateSet.testStateSetListener) - (TestStateSet.testStateAppendRemoveListener) - (TestFullListener.testStateAppendRemoveListener) - (TestFullListener.testStateSetListener): - * flumotion/test/test_common_componentui.py (TestStateSet.listen) - (TestStateSet.testSimpleStateListener) - (TestStateSet.testStateListener) - (TestStateSet.testStateListenerIntermediate) - (TestStateSet.testStateSaveReference): Adapt tests to new - requirements of statecache API. - -2006-11-28 Andy Wingo - - * flumotion/wizard/save.py (WizardSaver.getVideoOverlay): - * flumotion/wizard/enums.py (VideoDevice): Fix some parts of the - wizard for The Breaking Of The Code Coherence. Oh the taint! - -2006-11-27 Michael Smith - - * conf/managers/default/planet.xml: - Fix default planet.xml for The Great Breakage^wRenaming - -2006-11-27 Michael Smith - - * data/upgrade-to-0.3.2.xsl: - * flumotion/component/misc/porter/porter.py: - * flumotion/component/misc/porter/porter.xml: - socket_path -> socket-path for porter component. - -2006-11-20 Thomas Vander Stichele - - * flumotion/common/registry.py: - * flumotion/component/consumers/httpstreamer/http.py: - fix layout of generated registry code and fix test - -2006-11-20 Thomas Vander Stichele - - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - fix two problems caught by pychecker - -2006-11-20 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/feedcomponent010.py: - fix cleanup problems in these two files that were brought out - by writing a unit test for component setup - * flumotion/test/Makefile.am: - * flumotion/test/test_component_httpstreamer.py: - add a test for the property renaming - -2006-11-16 Thomas Vander Stichele - - * DONE: - add httpfile issuer -> issuerClass - * flumotion/component/consumers/httpstreamer/http.py: - fix some properties that I had mangled for testing - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/httpfile.xml: - issuer -> issuerClass - document some more properties - -2006-11-13 Thomas Vander Stichele - - * flumotion/common/registry.py: - fix a syntax error - -2006-11-13 Thomas Vander Stichele - - * data/upgrade-to-0.3.2.xsl: - add another property added by Mike on trunk - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - Fix up merge conflicts - -2006-11-09 Thomas Vander Stichele - - * data/upgrade-to-0.3.2.xsl: - fix up theora bitrate if it's below 10000 to convert to bps - * flumotion/component/component.py: - add fixRenamedProperties to deal with properties that have - been deprecated and renamed. - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/producers/firewire/firewire.py: - Use it to deal with the renamed properties almost transparently. - * flumotion/component/encoders/theora/theora.py: - 'bitrate' property below 10000 gets treated as deprecated, - and converted. - -2006-11-08 Thomas Vander Stichele - - * data/upgrade-to-0.3.2.xsl: - Mike helped me fix my xslt for the bitrate property - -2006-11-06 Thomas Vander Stichele - - * DONE: - * flumotion/component/producers/videotest/videotest.xml: - added videotest->videotest-producer - * data/upgrade-to-0.3.2.xsl: - added a first stab at the stylesheet to convert our xml configs - to the new names; only needs a solution for theora-encoder's - bitrate unit change - -2006-10-09 Thomas Vander Stichele - - * flumotion/component/encoders/theora/theora.py: - make bitrate be in bps, like all other components - -2006-10-07 Thomas Vander Stichele - - * flumotion/common/common.py: - add strToBool - * flumotion/common/fxml.py: - remove istrue - * flumotion/common/registry.py: - use strToBool - * flumotion/launch/parse.py: - use strToBool, so things like quality=False actually works - -2006-10-07 Thomas Vander Stichele - - * flumotion/common/registry.py: - Move time-checking code on registry directories before addRegistry. - This fixes a bug where renaming a component leaves both old and new - name in the registry. - -2006-10-07 Thomas Vander Stichele - - * flumotion/wizard/step.py: - fix up the code that automatically gets state from widgets - because our options are now dashed, not underscored - * flumotion/wizard/save.py: - * flumotion/wizard/steps.py: - adapt to new dashed properties - name components something-type - -2006-10-06 Thomas Vander Stichele - - * flumotion/common/fxml.py: - * flumotion/common/registry.py: - allow for description on component and property - prettify xml output - * flumotion/test/test_registry.py: - add tests for it - * flumotion/launch/inspect.py: - show descriptions - -2006-11-23 Thomas Vander Stichele - - * flumotion/component/misc/httpfile/Makefile.am: - Autotools is not *that* hard to get right, there's lots of - examples in the tree! - -2006-11-22 Michael Smith - - * flumotion/common/interfaces.py: - Add IStreamingComponent interface - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/misc/httpfile/httpfile.py: - Implement IStreamingComponent interface in two classes. - -2006-11-21 Michael Smith - - * flumotion/common/errors.py: - * flumotion/component/misc/httpfile/file.py: - * flumotion/component/misc/httpfile/httpfile.py: - Make client timeouts work. - -2006-11-21 Michael Smith - - * flumotion/component/misc/httpfile/Makefile.am: - * flumotion/component/misc/httpfile/file.py: - * flumotion/component/misc/httpfile/httpfile.py: - Redesign httpfile. Pull more of static.File into our local copy. - Use a proper subclass instead of Evil Wrapper Hacks. - -2006-11-21 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Fewer typos. More workingness! - -2006-11-21 Michael Smith - - * flumotion/component/base/http.py: - id is a builtin function. Python is my nemesisisis. - * flumotion/component/consumers/httpstreamer/resources.py: - Don't do try/except; it was hiding the exception related to this - bug. - -2006-11-20 Michael Smith - - * flumotion/manager/depgraph.py: - Remove hungry-override of component moods, which results in - incorrect moods in manager being shown in admin clients. - -2006-11-20 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/misc/httpfile/httpfile.py: - If stop() is called without start() having been called, don't - traceback due to self._pbclient not existing, or being None - - * flumotion/manager/depgraph.py: - Comment-only change. - -2006-11-20 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Set setLogFilter, not non-existing addLogFilter, for streamer-wide - log filters (which we don't use, so this wouldn't have affected us). - -2006-11-20 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - Have a description; needed for streamdata. - -2006-11-20 Zaheer Abbas Merali - - * flumotion/component/misc/httpfile/Makefile.am: - Dist the glade file too. Should fix the build really! - -2006-11-20 Zaheer Abbas Merali - - * flumotion/component/misc/httpfile/Makefile.am: - Actually dist the admin_gtk. Should fix the build. - -2006-11-20 Andy Wingo - - * flumotion/manager/manager.py (Vishnu._createErrback): If the - worker claims to have a component that we don't know about, treat - it as lost. This is clever and true! - - * flumotion/worker/worker.py (WorkerBrain.deferredCreate): - * flumotion/common/errors.py (ComponentAlreadyRunningError): New - error, can be raised by a worker if it knows that it has a job - running that perhaps the manager does not know about. - -2006-11-17 Thomas Vander Stichele - - * flumotion/twisted/pb.py: - Fix getFormatArgs module call - -2006-11-17 Thomas Vander Stichele - - * flumotion/launch/main.py: - Fix flumotion-launch. - -2006-11-17 Zaheer Abbas Merali - - * flumotion/component/misc/httpfile/admin_gtk.py: - Thanks pychecker. - -2006-11-17 Zaheer Abbas Merali - - * flumotion/component/misc/httpfile/admin_gtk.py: - * flumotion/component/misc/httpfile/httpfile.glade: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/httpfile.xml: - Add basic httpfile UI to show current clients and total bytes - consumed. - -2006-11-16 Andy Wingo - - * flumotion/admin/admin.py - (AdminClientFactory.clientConnectionFailed): Treat ConnectErrors - like ConnectionRefusedErrors, so that we can catch e.g. "no route - to host". - (AdminModel.connectionFailed): Handle all kinds of failures, not - just two. - - * flumotion/admin/command/main.py (setup_reactor.failed): Print - out unanticipated exceptions as well as connection failure/refusal - messages. - - * flumotion/admin/admin.py (AdminModel): New signal, - 'connection-error', for unanticipated errors when connecting. - (AdminClientFactory.gotDeferredLogin): Emit 'connection-error' on - the model if there is an uncaught exception, rather than only - logging the exception. - (AdminModel.connectToHost): Connect to 'connection-error' so that - we can errback on the connectToHost deferred. - - * data/glade/wizard_firewire.glade: Mark a couple of frames as - expand=false. Fixes odd spacing in the wizard. - -2006-11-15 Andy Wingo - - * flumotion/manager/manager.py (Vishnu._getComponentState): Add - the component to the depgraph. Fixes a bug in manager restart with - components not in the config. - - * flumotion/manager/depgraph.py (DepGraph.addComponent): Allow - this function to be called when a component is already added. - -2006-11-14 Andy Wingo - - * flumotion/common/log.py (stderrHandler): Fix doc. - (reopenOutputFiles): New function, um, reopens output files. - (outputToFiles): New function, redirects stdout and stderr, and - installs a SIGHUP handler to call reopenOutputFiles(). - (reopenOutputFiles, outputToFiles): So little code, so many bugs! - Final fixor. - - * flumotion/common/common.py (daemonize): Just handle stdin here, - stdout and stderr handled by log.outputToFiles. - -2006-11-10 Michael Smith - - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/muxers/ogg.py: - Redesign the way we build muxer pipelines, so we have a queue directly - after the fdsrc, not after gdpdepay. - - Then, allow components to interceed in reconnection. Implement this - for muxers, so they can unlock things stuck in queue. - - This prevents muxer deadlocks on reconnection attempts. - - -2006-11-09 Andy Wingo - - * tools/analyze-flu-log (HistogramAnalyzer): Fix to align buckets - with the half-hours, and to properly record 0 lines for empty - buckets. - -2006-11-07 Michael Smith - - * tools/theora-bench.py: - Incomplete benchmarking/graphing/awesomeifying tool. - -2006-11-06 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - *cough* BPB. - -2006-11-06 Michael Smith - - * flumotion/component/base/http.py: - Improve parser; allow specifying single IPs, raise ConfigError if - invalid. - * flumotion/test/test_logfilter.py: - Tests for logfilter parser. - -2006-11-06 Michael Smith - - * flumotion/test/test_config.py: - Now that I'm using multiple=yes in configs, add testing that to the - config parser test. - -2006-11-06 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/httpfile.xml: - Add IP-filters for logging if configured. - -2006-11-02 Michael Smith - - * flumotion/component/base/http.py: - Add a class to filter IPs based on networks, for use in http - logging. - -2006-11-02 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - Fix stale comment. - -2006-11-02 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - Since we send Connection: close, we must close the connection after - the request. - -2006-11-01 Andy Wingo - - * flumotion/common/common.py (daemonizeHelper): New function, - handles the PID file / log file foo. - - * common/setup.m4: Fix the m4 for internal autoconf churn, again. - -2006-10-31 Thomas Vander Stichele - - * flumotion/admin/command/commands.py: - print result of invoke - -2006-10-30 Zaheer Abbas Merali - - * data/glade/wizard_disk.glade: - * flumotion/wizard/steps.py: - Add a record at startup checkbutton to the disker wizard step. - -2006-10-30 Thomas Vander Stichele - - * flumotion/component/consumers/disker/disker.xml: - Register the property with the correct bool type. - -2006-10-30 Zaheer Abbas Merali - - * flumotion/manager/manager.py: - When you stop a lost or sad component that has mood pending of - happy, then reset moodPending to None. - When a worker logs in, it should be told to start all components - that are sleeping. moodPending should not need to be checked because - when a job is created, mood is set to waking. - -2006-10-26 Thomas Vander Stichele - - * common/as-ac-expand.m4: - Update to newer version, fixes Edward's bug. - -2006-10-26 Andy Wingo - - * flumotion/common/registry.py (RegistryWriter): Factor out of - ComponentRegistry. - (ComponentRegistry.dump): Use the registry writer. - (RegistrySubsetWriter): New class, writes out only the subset of - the registry that is provided by the given bundles. - - * flumotion/common/bundle.py (MergedBundler): New object, - extending the Bundler class to also package up bundles in addition - to just files. The effect is that when you call bundle() on a - MergedBundler, you get one zip with a union of all subbundles' - contents, in addition to any loose files that you added. - (makeBundleFromLoadedModules): New exciting function, outputs a - zip file and a registry fragment corresponding to a subset of - loaded modules. For example: - FLU_ATEXIT='flumotion.common.bundle.makeBundleFromLoadedModules \ - /tmp/flumotion.zip /tmp/flumotion.xml flumotion' \ - bin/flumotion-launch videotest - - * flumotion/common/boot.py.in (boot): Support another environment - variable, FLU_ATEXIT, that specifies a function to call just - before exiting. Any arguments to the function should be given as - space-delimited strings. For example, FLU_ATEXIT='a.b.c d e f' - will evaluate a.b.c("d", "e", "f"). - -2006-10-26 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py: - Use the summary of the event in the vCalendar as the filenameTemplate. - -2006-10-26 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py: - Add optional property to changeFilename where the filename template - as a strftime formatted string can be passed. - Example flumotion-command use: - invoke /default/disk-audio changeFilename s abcd-%H%M%S - -2006-10-26 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - Roughly identical patch for httpfile component: adds - updatePorterDetails. We should factor out a bunch of common code - between these two... - -2006-10-26 Michael Smith - - * conf/managers/default/flows/porter.xml: - Updated example. - - * flumotion/manager/component.py: - * flumotion/twisted/pb.py: - Some comments; no functional changes. - - * flumotion/component/consumers/httpstreamer/http.py: - Add a remote updatePorterDetails method to change which porter the - streamer connects to. - -2006-10-25 Andy Wingo - - * flumotion/worker/worker.py (JobHeaven.lostAvatar): Track when - jobs go away, not just when they are added. - (JobAvatar.perspective_cleanShutdown) - (WorkerBrain.deferredShutdownRegistered) - (WorkerBrain.deferredShutdownTrigger) - (WorkerBrain.deferredShutdown): Add infrastructure to track - whether a job is in the process of shutting down, so that if the - manager finds out the job is gone before we do and subsequently - asks for the component to start, that we accept that request, and - handle it when we eventually reap the job. - (WorkerBrain.deferredCreate): Refuse to start a job that we - already have running, unless it is already in the process of - shutting down. - (JobProcessProtocol.processEnded): Tell the heaven to lose its - avatar. Also tell the workerbrain that the job was reaped, if a - deferred shutdown was registered. - - * flumotion/job/job.py (JobMedium.shutdownHandler): Normally if - the worker is asked to start a component that it already has, it - refuses. However when we're being shutdown there's an unavoidable - race between the manager and worker finding out about the - component logging out. - -2006-10-25 Michael Smith - - * flumotion/component/consumers/disker/disker.py: - Make recurrence rules work if the initial time is in the past. - -2006-10-25 Michael Smith - - * flumotion/component/consumers/disker/admin_gtk.py: - Started to fix this so that you can upload an ical file, but - incomplete... - - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/disker/disker.xml: - Add a property to give a filename for an ics file to load. - Fix logic so that recurrences work. - -2006-10-25 Andy Wingo - - * flumotion/admin/admin.py - (AdminModel.setRemoteReference.writeConnection): Ignore a failure - to cache the connection data. - -2006-10-25 Michael Smith - - * flumotion/component/consumers/disker/admin_gtk.py: - * flumotion/component/consumers/disker/disker.glade: - * flumotion/component/consumers/disker/disker.py: - Commit ical code from zaheer, so we can deploy it. Needs some - further work, but this is ok for now. - -2006-10-24 Andy Wingo - - * flumotion/component/consumers/disker/disker.py - (Disker.update_symlink): Implement the symlink updating. - (Disker.change_filename, Disker.stop_recording) - (Disker.configure_pipeline): Plumb in the symlink code. - - * flumotion/component/consumers/disker/disker.xml: Add two new - properties, symlink-to-current-recording and - symlink-to-last-recording. If given they will keep the named - symlinks up to date with the current and/or last recording, - respectively. - -2006-10-24 Michael Smith - - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/disker/disker.xml: - Merge part of #486 (not all yet). Adds remote stopRecording method, - and start-recording property which can be used to disable the disker - starting writing when started. - -2006-10-24 Michael Smith - - * flumotion/component/feedcomponent010.py: - Change variable name to be more similar to the other uses of the - same variable. - -2006-10-24 Andy Wingo - - * flumotion/manager/component.py (ComponentAvatar.__init__): - Update docs. - (ComponentAvatar.attached): No need to get the jobstate, - Vishnu.componentAttached does it for us now. - (ComponentHeaven.registerComponent): Nothing to do anymore. - - * flumotion/manager/base.py (ManagerHeaven.createAvatar): More - debugging. - - * flumotion/manager/manager.py (Vishnu.componentAttached, - (Vishnu.componentDetached, Vishnu._getComponentState): Rework what - happens when a component is attached so that we always ask, first - thing, what the component's config and jobstate are. This allows - us to get a mood early, reduces the number of not-quite-set-up - states, and allows us to see if a component is running with an old - config or not. - (Vishnu.registerComponent): Remove lots of code, now folded into - _getComponentState. - - These changes help manager restart to work in more cases. Also, - atmosphere components are now properly put into the atmosphere - instead of a flow named atmosphere. - - * flumotion/component/component.py - (BaseComponentMedium.remote_getConfig): Less hysteric log. - (BaseComponent.setup.setupErrback): More debugging. - - * flumotion/test/test_manager_manager.py - (FakeComponentMind.remote_getConfig): Implement getConfig. - (_logoutAvatar, TestVishnu._requestAvatar.got_result): A little - more cleverness here. - (MyListener.stateSet): Although deferred does indeed start with d, - it is formatted using %s. - - * tools/analyze-flu-log (log_re): Fix PID parsing. - -2006-10-24 Edward Hervey - - * flumotion/component/producers/unixdomain: - moap files... - -2006-10-24 Zaheer Abbas Merali - - * flumotion/common/keycards.py: - Add generic keycard. - * flumotion/component/base/http.py: - Add a generic keycard issuer. - * flumotion/component/bouncers/Makefile.am: - * flumotion/component/bouncers/icalbouncer.py: - * flumotion/component/bouncers/icalbouncer.xml: - New component: icalbouncer. This restricts access to times - during events specified in an ics file. - * flumotion/component/consumers/httpstreamer/http.py: - Handle a failure in running the authenticate with a warning in the log. - -2006-10-24 Edward Hervey - - * configure.ac: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/unixdomain: - * flumotion/component/producers/unixdomain/Makefile.am: - * flumotion/component/producers/unixdomain/__init__.py: - * flumotion/component/producers/unixdomain/unixdomain.py: - * flumotion/component/producers/unixdomain/unixdomain.xml: - Add new component for receiving data from a unix domain socket. - The component creates the socket and waits for incoming gdp-payloaded - data. - -2006-10-23 Michael Smith - - * flumotion/common/errors.py: - * flumotion/manager/component.py: - Patch from s.merle@gmail.com: - Properly handle both synchronous and async errors when - starting/setting up components, consistently. - -2006-10-20 Michael Smith - - * flumotion/component/producers/icecast/icecast.py: - Add comments, mp3 support (untested). Ogg now works perfectly with - CVS -base. - -2006-10-20 Michael Smith - - * configure.ac: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/icecast/Makefile.am: - * flumotion/component/producers/icecast/__init__.py: - * flumotion/component/producers/icecast/icecast.py: - * flumotion/component/producers/icecast/icecast.xml: - Add new component to relay streams from icecast. - Currently only tested with ogg; has problems after chain boundaries. - -2006-10-19 Michael Smith - - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/job/job.py: - More FD leaks! Oh, the pain! - Connect to client-fd-removed signal on multifdsink; call a - user-supplied cleanup function when that's triggered. In the current - case, just close the fd. - -2006-10-19 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.xml: - Forgot to add new property to XML. - -2006-10-19 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Revert incorrect part of change due to copy-paste malfunction. - -2006-10-19 Michael Smith - - * flumotion/component/base/http.py: - * flumotion/component/consumers/httpstreamer/http.py: - Add 'duration' parameter to set a default connection duration when - the keycard doesn't provide one. - -2006-10-18 Thomas Vander Stichele - - * flumotion/component/misc/porter/porter.py: - not sure why we were logging the type of str - -2006-10-18 Andy Wingo - - * tools/analyze-flu-log: New script, analyzes flumotion logs. - Geto. - - * flumotion/manager/manager.py (Vishnu._configToComponentState): - Allow conf == None so that we can stop this component. - - * flumotion/component/component.py (BaseComponent.do_check) - (BaseComponent.do_setup): Better worded docs. - (BaseComponentMedium.remote_getConfig): Return None as the config - if the component did not get fully set up. - -2006-10-12 Zaheer Abbas Merali - - * flumotion/component/plugs/loggers.py: - Check file is open before attempting to close. - Remove unneeded import of log. - -2006-10-11 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - Remove duplicate copy of method. - -2006-10-11 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - Hack to override connectionLost on the wrapped request, call - requestFinished from there, so we log incomplete requests. - -2006-10-11 Michael Smith - - * flumotion/component/feedcomponent010.py: - * flumotion/manager/depgraph.py: - * flumotion/manager/manager.py: - Handle reconnecting clock-masters properly in the depgraph. - Avoid pausing an already-running pipeline when asked for clocking - information. - Fixes #480. - -2006-10-10 Michael Smith - - * flumotion/common/errors.py: - * flumotion/common/planet.py: - * flumotion/component/base/Makefile.am: - * flumotion/component/base/__init__.py: - * flumotion/component/base/base.xml: - * flumotion/component/bouncers/tokentest.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/httpfile.xml: - * flumotion/component/misc/porter/porterclient.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - Merge mike-http-improvements-1 to trunk. - Adds support for on-demand streaming for the platform, improves - http streaming (bursting, mostly, and some bugfixes), and some core - fixes for managing component moods. - -2006-10-10 Zaheer Abbas Merali - - * flumotion/worker/worker.py: - Log better. - -2006-10-10 Zaheer Abbas Merali - - * flumotion/worker/worker.py: - RuntimeError has no capital T. duh! - -2006-10-10 Zaheer Abbas Merali - - * flumotion/worker/worker.py: - Fix missing import and exception variable. - -2006-10-10 Zaheer Abbas Merali - - * flumotion/worker/feed.py: - * flumotion/worker/worker.py: - Fix leak of fds in feedserver. Fixes bug #479. - Add comments to prevent people using the broken - receiveFeed methods without fixing them. - -2006-10-10 Thomas Vander Stichele - - * flumotion/common/worker.py: - don't call workers "machine" - -2006-10-10 Thomas Vander Stichele - - * flumotion/admin/admin.py: - log better - -2006-10-09 Zaheer Abbas Merali - - * flumotion/worker/worker.py: - Added a FIXME comment regarding the disregard of the return - value of sendFileDescriptor. - -2006-10-09 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - EatFromFD takes ownership of fd's and thus should close them - when they get replaced. - Fixes #477. - -2006-10-06 Thomas Vander Stichele - - * data/glade/admin.glade: - remove translatibility of an unused string - * po/nl.po: - update - -2006-10-06 Thomas Vander Stichele - - * flumotion/common/errors.py: - * flumotion/component/component.py: - * flumotion/manager/component.py: - * po/POTFILES.in: - Catch exceptions during do_setup locally at the component, and - add the message there, so we know what to fix. From that point on, - treat it as handled everywhere. Create an error for handled setup - errors. Add to translations. - -2006-10-06 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - * flumotion/worker/worker.py: - Implement functions needed to support checking if a worker - can import given modules. - Use it to check for PIL in the wizard, linking to the website. - * TODO: add a note about the message area - -2006-10-03 Andy Wingo - - * flumotion/wizard/step.py (WizardStep.workerRun.callback): Move - the deferred-results-must-be-Result-instances code here from the - generic version, as is appropriate. - - * flumotion/common/medium.py (BaseMedium.runBundledFunction): Doc - more. Only wrap some specific exceptions; in the case of e.g. a - syntax error or some exception running the proc, pass the original - error unmolested. - - * flumotion/wizard/steps.py: - * flumotion/common/medium.py: Revert bits about defer_generator - removal from [3889], they caused errors in f-g-c. - - * configure.ac: Comment out the bit about multiple versions of - gstreamer. - -2006-09-28 Thomas Vander Stichele - - * configure.ac: - back to trunk - -=== release 0.3.1 === - -2006-09-28 Thomas Vander Stichele - - * Makefile.am: - * NEWS: - * RELEASE: - * configure.ac: - * flumotion.doap: - * flumotion.spec.in: - releasing 0.3.1, "La Merce" - -2006-09-27 Thomas Vander Stichele - - * flumotion/admin/admin.py: - catch errors on remote component calls, and display a reasonable - Warning message for them so we know what to fix. - * flumotion/common/errors.py: - document the expected arguments for RemoteMethodError, - taking the method name as the first argument - * flumotion/wizard/step.py: - follow this change through - * flumotion/component/feedcomponent.py: - document remote_effect - * flumotion/manager/admin.py: - use the more useful log.getExceptionMessage - * flumotion/manager/base.py: - check for the difference between AttributeError and NoSuchMethod - if we can - * po/POTFILES.in: - add flumotion/admin/admin.py for translation - (port from 0.2 patch) - -2006-09-27 Thomas Vander Stichele - - * flumotion/worker/worker.py: - unravel defgen so we can actually see where problems are - pass through a RemoteRunError, it's already wrapped - -2006-09-27 Zaheer Abbas Merali - - * flumotion/common/medium.py: - Refactor runBundledFunction to not be a defer generator. - Essential for debugging issues. - * flumotion/wizard/steps.py: - Refactor runChecks to not be a defer generator. - Essential for debugging issues. - * flumotion/worker/checks/check.py: - Fix log line to actually send the log category. - -2006-09-26 Thomas Vander Stichele - - * flumotion/common/config.py: - use list length 0 as False to check multiple and required - -2006-09-26 Thomas Vander Stichele - - * flumotion/manager/main.py: - use CannotListenError correctly - -2006-09-26 Thomas Vander Stichele - - * flumotion/manager/main.py: - Replace something that has been deprecated since Python 1.5 (!) - Thank you pychecker. - -2006-09-26 Thomas Vander Stichele - - * flumotion/common/worker.py: - use ones and zeroes - -2006-09-26 Thomas Vander Stichele - - * flumotion/admin/admin.py: - move imports inside defgen - * flumotion/common/connection.py: - * flumotion/job/main.py: - remove imports - * flumotion/component/muxers/checks.py: - respect coding style - no idea how Zaheer got the periods in - the other branch :) - -2006-09-26 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - Fix race where _stats would not be set if widget tree - was received before uiState. - -2006-09-26 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - Check we have _stats before using it. - -2006-09-26 Zaheer Abbas Merali - - * configure.ac: - Bump twisted requirement to 2.0.1. - -2006-09-25 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/admin_gtk.py: - We use old style classes so can't use super :( - -2006-09-24 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/admin_gtk.py: - Actually update filename when uiState changes rather - than just at time of getting ui state. - -2006-09-24 Thomas Vander Stichele - - * Makefile.am: - * common/Makefile.am: - * common/rpm.mk: - add an "rpm" target that builds rpms - -2006-09-24 Thomas Vander Stichele - - * flumotion/worker/main.py: - break out a _createParser() function - -2006-09-24 Zaheer Abbas Merali - - * flumotion/admin/admin.py: - Add needed imports. Why were they taken out? - -2006-09-24 Thomas Vander Stichele - - * flumotion/common/errors.py: - add a ComponentConfigError ... - * flumotion/manager/manager.py: - ... and catch, showing a nice error message - * flumotion/manager/component.py: - also show a nice error message when we're asked for a feederAvatar - that we don't have - -2006-09-24 Thomas Vander Stichele - - * flumotion/worker/feed.py: - remove debug lines we don't need anymore - -2006-09-23 Thomas Vander Stichele - - * flumotion/admin/connections.py: - another real bug caught by pychecker - -2006-09-23 Thomas Vander Stichele - - * flumotion/job/main.py: - * flumotion/launch/inspect.py: - * flumotion/manager/worker.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/worker/worker.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/admin/command/main.py: - * flumotion/admin/text/admin_text.py: - * flumotion/admin/text/main.py: - * flumotion/component/base/admin_text.py: - * flumotion/admin/admin.py: - various pychecker-assisted cleanups - * misc/pycheckerrc: - disable shadows, since the output it gives does not help you fix - the problem - -2006-09-22 Thomas Vander Stichele - - * flumotion/worker/checks/video010.py: - remove unused import - -2006-09-22 Thomas Vander Stichele - - * doc/random/configuration: - update notes - * flumotion/common/config.py: - * flumotion/common/errors.py: - * flumotion/common/fxml.py: - make ConfigError and ParserError more strictly defined in - arguments; obviously it was necessary, because a broken XML - resulted in a useless error message - -2006-09-21 Thomas Vander Stichele - - * flumotion/common/identity.py: - * flumotion/component/plugs/identity.py: - * flumotion/component/plugs/adminaction.py: - * flumotion/manager/base.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/test/test_manager_manager.py: - "anything" is not really a good alternative to a decent interface. - And really, we are dealing with identities that can be either - local or remote; so implement it as such. - Disambiguate remoteIdentity where appropriate. - -2006-09-21 Thomas Vander Stichele - - * flumotion/component/misc/httpfile/httpfile.py: - Make pychecker happy. Lament the absence of documentation - or comments. - -2006-09-21 Thomas Vander Stichele - - * flumotion/manager/admin.py: - * flumotion/twisted/pb.py: - a pb.Error is a serializable exception; as a reply to a remote - method, it is similar to a Failure and should be logged. - -2006-09-21 Thomas Vander Stichele - - * flumotion/worker/feed.py: - remove debug lines that are now done for us on a lower level - -2006-09-21 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - Show a warning if someone requests a feed from us that we - don't have. Ideally one should not get here - this should - be caught in the manager, but this is a last line of defense. - -2006-09-21 Thomas Vander Stichele - - * flumotion/common/common.py: - every assert should have a useful message - -2006-09-21 Thomas Vander Stichele - - * flumotion/admin/gtk/parts.py: - Put back restart option, I used it, removal was not discussed, - the commit removing it was mixed with something completely - unrelated, and the ChangeLog entry for it was crap. - -2006-09-21 Thomas Vander Stichele - - * flumotion/common/registry.py: - handle the case where FLU_PROJECT_PATH points to non-project - directories, or directories that were in the registry before - no longer exist, by making some methods return False if the - path is not a registry path, and consequently removing them from - the parser. - -2006-09-21 Thomas Vander Stichele - - * doc/random/naming: - * flumotion/common/common.py: - * flumotion/manager/main.py: - * flumotion/worker/main.py: - * flumotion/service/service.py: - add a --service-name argument from which names of log and pid files - are derived when daemonized. - Make the code and logging more consistent and useful - -2006-09-21 Thomas Vander Stichele - - * flumotion/worker/worker.py: - properly trap an out-of-date manager we can't log in to. - -2006-09-21 Thomas Vander Stichele - - * flumotion/common/common.py: - make writePidFile return the path to the pid file - * flumotion/worker/main.py: - log a little more - -2006-09-21 Michael Smith - - * flumotion/manager/manager.py: - Backport to trunk: allow stopping components that are trying to - start, but haven't succeeded or explicitly failed. - -2006-09-20 Thomas Vander Stichele - - * Makefile.am: - add an integration make target - -2006-09-20 Thomas Vander Stichele - - * Makefile.am: - * configure.ac: - * flumotion/test/Makefile.am: - * flumotion/test/integration/Makefile.am: - * flumotion/test/integration/__init__.py: - * flumotion/test/integration/common.py: - * flumotion/test/integration/test_qa.py: - * flumotion/test/integration/test_torture.py: - Move integration outside of flumotion.test so we can separate it - from the unit test suite - * tests/integration/common.py: - clean up the ugly path code a little bit - -2006-09-20 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - Revert time-based bursting; will move this to a branch. - -2006-09-19 Thomas Vander Stichele - - * flumotion/service/service.py: - do not set name with -n on worker/manager because they already have - sensible ways of figuring it out if not specified, and when - the worker does specify it it should take precedence - -2006-09-19 Andy Wingo - - * flumotion/manager/component.py - (ComponentHeaven._startComponent): Until the network map is - implemented, hack to allow intra-worker connections behind a - firewall to work. - -2006-09-19 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - burst-time property for http-streamer. - Allows time-based bursting, if multifdsink fully supports it - (currently requires patches). - Some refactoring for clarity. No behaviour changes by default. - Fixes #462 - -2006-09-18 Michael Smith - - * flumotion/component/misc/httpfile/httpfile.py: - Fix cortado problems due to porter redirections and persistent - connections. - -2006-09-18 Zaheer Abbas Merali - - * flumotion/component/muxers/checks.py: - * flumotion/worker/checks/encoder.py: - * flumotion/worker/checks/video010.py: - Fix checks to use get_plugin_version correctly. - -2006-09-18 Zaheer Abbas Merali - - * flumotion/common/gstreamer.py: - Actually make get_plugin_version return a tuple of integers - not strings. - -2006-09-16 Zaheer Abbas Merali - - * flumotion/manager/manager.py: - Fix comment parameter ordering. - -2006-09-14 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - Add burst-size property, in kB. - When set, use this to configure streamers using new multifdsink - burst modes. - -2006-09-14 Zaheer Abbas Merali - - * flumotion/common/gstreamer.py: - Make get_plugin_version return a tuple not a string. Make nano - non-optional in the return value. - * flumotion/component/feedcomponent010.py: - Use fixed get_plugin_version. - * flumotion/component/muxers/checks.py: - Use fixed get_plugin_version. - * flumotion/worker/checks/encoder.py: - Use fixed get_plugin_version. - -2006-09-14 Michael Smith - - * flumotion/admin/command/commands.py: - * flumotion/admin/command/main.py: - Allow vararg commands, use for invoke. - -2006-09-14 Andy Wingo - - * flumotion/admin/command/commands.py (_parse_typed_args): New - exciting typed args parser. - (do_invoke): Use the args parser to allow e.g. "invoke - /default/foo fooCommand is(ss) 4 foo bar baz", which will do a - componentCallRemote on /default/foo with the args (4, 'foo', - ('bar', 'baz')). - -2006-09-14 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Add event probe to each gdpdepay's src pad to filter subsequent - new segment events. This worksaround bugs in gdp's handling - of 2nd (and after) newsegment events with changed caps after. - This fixes issues with reconnection to upstream components that - have been re-started - -2006-09-13 Zaheer Abbas Merali - - * flumotion/test/integration/Makefile.am: - * flumotion/test/integration/common.py: - Add helper methods to stop all and start all components in a - manager. - * flumotion/test/integration/test_qa.py: - Remove unneeded import. - * flumotion/test/integration/test_torture.py: - Create test that stops and starts all components many times. - -2006-09-13 Andy Wingo - - * flumotion/component/misc/httpfile/httpfile.py - (RequestWrapper.request): - * flumotion/component/plugs/streamdata.py: Pacify pychecker. - -2006-09-12 Andy Wingo - - * flumotion/launch/main.py (start_components.do_start): Fix a bug - when running pipelines with no clocking-requiring components. - - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.getStreamData): Support pluggable - getStreamData() on the new StreamDataProvider socket. - - * flumotion/component/misc/httpfile/httpfile.xml: - * flumotion/component/misc/httpfile/httpfile.py: Support the - logging socket, and require the 'path' property. Test via - `flumotion-launch httpfile path=/etc/passwd - /apachelogger,logfile=/dev/stdout'. - - * flumotion/component/plugs/Makefile.am (component_PYTHON): - * flumotion/component/plugs/plugs.xml: - * flumotion/component/plugs/streamdata.py: New plug/socket, - providing pluggability for streamers' getStreamData() method. - -2006-09-12 Michael Smith - - * flumotion/manager/manager.py: - Don't start components on loading a configuration unless those - components were in the loaded config. - -2006-09-09 Zaheer Abbas Merali - - * flumotion/test/test.xml: - Update test.xml for GStreamer 0.10. - * flumotion/common/boot.py.in: - Add option on whether to install reactor, needed for the web admin - because it needs to import nevow (which installs the reactor) before - it munges stuff. - -2006-09-08 Michael Smith - - * configure.ac: - Check for PyGTK didn't work since I upgraded to 2.10.x, since it was - a string comparison. Since we have a check for the appropriate - version already there, ~10 lines above, just delete that. - -2006-09-08 Thomas Vander Stichele - - * flumotion/test/integration/test_qa.py: - make the tests a little less taxing on slower hardware by reducing - sizes - wait for some of the first components as well to be able to - distinguish where it fails - -2006-09-08 Thomas Vander Stichele - - * flumotion/common/log.py: - fix docstring - * flumotion/launch/main.py: - * flumotion/launch/parse.py: - appease pychecker and fix docstrings - -2006-09-07 Zaheer Abbas Merali - - * flumotion/admin/command/commands.py: - Make delete, stop and start more general doing actions on - components, flows, the whole atmosphere or all (root). - Refactor into one method. Rename commands in flumotion-command. - * flumotion/admin/command/utils.py: - Add utility method that will parse an avatar path and return - a list that identifies the type of avatar path and the rest - of the avatar. - -2006-09-07 Andy Wingo - - * flumotion/admin/gtk/parts.py (ComponentMenu.__init__): Remove - restart menu item; stop and start should be good enough for - anyone, with their 640k. - - * flumotion/manager/manager.py (Vishnu._startComponents) - (Vishnu._workerCreateComponents, Vishnu._configToComponentState): - Remove some old code that assumed that workerRequested could be - None. - -2006-09-07 Michael Smith - - * flumotion/manager/base.py: - * flumotion/manager/manager.py: - Restarting components was racy, and usually failed, because we - didn't wait for the component to actually be logged out. Do so. - Fixes #450. - -2006-09-07 Zaheer Abbas Merali - - * flumotion/admin/command/commands.py: - Add deletecomponent to flumotion-command. - -2006-09-07 Zaheer Abbas Merali - - * flumotion/admin/command/commands.py: - Add startcomponent and stopcomponent to our lovely array of - commands that flumotion-command can execute. - -2006-09-06 Andy Wingo - - * flumotion/test/test.xml: Specify worker for all components. - - * flumotion/test/test_manager_manager.py - (TestVishnu.testLoadConfiguration.verifyEmptyDAG): Given that we - specify a worker for all components, remove that dep from the - graph as well. - - * flumotion/common/config.py (FlumotionConfigXML._parseComponent) - (FlumotionConfigXML._parseManager): Make sure that - nodes have a worker attribute, except if we are parsing a bouncer - component for a manager, in which case the worker attribute can't - be present. (Got it?) - - * flumotion/test/test_config.py - (TestConfig.testParseComponentNoWorker): Add a new test, ensuring - that all component entries have non-null worker attributes. Adapt - the other tests so that they do specify a worker. - - * flumotion/common/errors.py (ComponentWorkerConfigError): New - error. - -2006-09-06 Michael Smith - - * flumotion/test/integration/test_qa.py: - Unskip disker test, disker now works with a fixed multifdsink. - -2006-09-06 Michael Smith - - * doc/random/component-initialization-protocol: - Update for information about master/slave clocks - -2006-09-06 Michael Smith - - * flumotion/launch/main.py: - Fix -launch for master clock changes. - -2006-09-05 Michael Smith - - * flumotion/component/feedcomponent010.py: - * flumotion/manager/depgraph.py: - * flumotion/test/test_manager_depgraph.py: - * flumotion/test/test_manager_manager.py: - Revert recent depgraph changes, so we again set up clock masters - before starting them. - - Now, in provide_master_clock, set the pipeline to PAUSED before - trying to get the pipeline clock, to ensure we get the correct - clock. Add some generic infrastructure to wait for a particular - state change. - - Fixes #447. - -2006-09-05 Michael Smith - - * flumotion/component/feedcomponent010.py: - Add buffer and event probes before starting the pipeline, not - after. Fix up some comments/log lines. - -2006-09-05 Thomas Vander Stichele - - * flumotion/common/registry.py: - add a getUnder() accessor - use it when writing out the registry, so it finds the locale files - correctly and doesn't warn and rebuild on it - -2006-09-05 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/resources.py: - ASF should not send a Pragma header with features=broadcast. - This allows WMP to play asf streams on port 80 on FQDN'd urls. - -2006-09-05 Michael Smith - - * flumotion/worker/feed.py: - Clean up feedserver FD/transport dropping. Fixes #446 - -2006-09-05 Andy Wingo - - * flumotion/launch/main.py: One more doc line. - - * flumotion/launch/parse.py (parse_args): Remove some unused vars. - - * flumotion/launch/main.py: Document via a docstring. Refactor to - use the flumotion.launch.parse library. Update for changes in - component startup: components connect over pipes instead of TCP - ports. - - * flumotion/launch/parse.py: New file, exports one function that - takes an argv fragment and returns an ordered list of config - dicts. Refactorage. - - * flumotion/test/test_dag.py (TestDAG.testSort): Fix broken test. - - * flumotion/common/dag.py (topological_sort): Fix return to follow - docs, broken since the depgraph merge. - -2006-09-04 Michael Smith - - * flumotion/component/feedcomponent010.py: - Set pipeline to PAUSED/PLAYING to trigger base_time redistribution - within the pipeline, since we're managing it manually. - -2006-09-04 Zaheer Abbas Merali - - * flumotion/test/test_manager_manager.py: - Fix test that checks the depgraph. We now will have - component, CLOCKMASTER as offspring from - component, COMPONENTSTART. - -2006-09-04 Zaheer Abbas Merali - - * flumotion/test/test_manager_depgraph.py: - Fix test that tests the depgraph to use the changed behaviour from - previous commit. - -2006-09-04 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Add debug to see when master clock is set on a clock slave. - * flumotion/manager/component.py: - In start, if component is the master clock, do not tell - component to provide master clock. That is done by - tryWhatCanBeStarted. - * flumotion/manager/depgraph.py: - Make CLOCKMASTER dep on COMPONENTSTART, the GStreamer clock only - gets selected on state change to PLAYING. - -2006-09-01 Michael Smith - - * flumotion/worker/feed.py: - * flumotion/worker/worker.py: - Use PassableServerPort so we can actually shut down feed-server-side - copies of the FD after passing to the job. - Avoids leaking FDs. - There's a lot of possible cleanup when we do things this way, - leaving that for another patch. - -2006-09-01 Zaheer Abbas Merali - - * flumotion/worker/checks/video.py: - * flumotion/worker/checks/video010.py: - Do the deferToThread on set_state only for the webcam check. - -2006-09-01 Zaheer Abbas Merali - - * flumotion/worker/checks/video010.py: - Setting state to PLAYING can take a lot longer than 12.5 seconds - so run in a separate thread. 12.5 seconds is our ping timeout. - This fixes the Webcam worker check for example. - -2006-09-01 Zaheer Abbas Merali - - * common/trial.mk: - Fix properly! - -2006-09-01 Zaheer Abbas Merali - - * common/trial.mk: - Fix pythonpath for running tests by using an absolute path. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/manager/component.py: - Should not return, now that we iterate over the deplist rather - than take the first item. - Also remove the call to _tryWhatCanBeStarted now that the returns - have been removed. - * flumotion/test/integration/test_qa.py: - Skip videotest with overlay integration test. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/admin/command/commands.py: - Actually output success when invoke runs successfully. - * flumotion/test/integration/test_qa.py: - Remove files correctly. - * scripts/check-disker-file-type: - Check file type of file currently being written to by disker. - * scripts/check-file-type: - No longer needed. - * scripts/remove-disker-files: - Script to remove the file currently being written to by disker. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/test/Makefile.am: - Fix disting of integration Makefile. - -2006-08-31 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/httpfile.xml: - make porter_ properties consistent - there is no porter master mode, there is only master mode where - there is no porter - -2006-08-31 Thomas Vander Stichele - - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/httpfile.xml: - * flumotion/test/integration/test_qa.py: - rename path_to_file to path - -2006-08-31 Zaheer Abbas Merali - - * flumotion/manager/depgraph.py: - Whoops, we were letting too many nodes through in whatShouldBeStarted. - -2006-08-31 Zaheer Abbas Merali - - * scripts/wait-for-http-headers: - Forgot to add this script. Whoops. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/test/integration/test_qa.py: - Add integration test of videotest with overlay. - * scripts/check-file-type: - Wait for file to be non-empty before checking file type. - -2006-08-31 Michael Smith - - * flumotion/manager/base.py: - Fix up formatting of remote call logging. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/test/integration/test_qa.py: - Add test for default wizard audiotest with disker. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/test/integration/test_qa.py: - Add test to check whether token bouncing works. - * scripts/check-token-for-http: - Add test that does 2 requests, one with a correct token - and one with an incorrect token. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/test/integration/common.py: - configure.bindir is top_src_dir/bin. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/component/bouncers/tokentest.py: - Fix use of wrong implements method and bad property - requesterName. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/component/bouncers/tokentest.xml: - Add bundle definitions to test token bouncer. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/component/bouncers/tokentest.py: - * flumotion/component/bouncers/tokentest.xml: - Fix wingo's b0rked commit. - -2006-08-31 Zaheer Abbas Merali - - * flumotion/test/integration/test_qa.py: - Check http-video streams and check disker outputs ogg files. - * scripts/check-file-type: - Script to check file type. - -2006-08-31 Andy Wingo - - * flumotion/component/bouncers/Makefile.am (component_PYTHON): - * flumotion/component/bouncers/tokentest.xml: - * flumotion/component/bouncers/tokentest.py - (TokenTestBouncer.authenticate): New bouncer, only allows requests - with a certain token through. - -2006-08-31 Thomas Vander Stichele - - * flumotion/wizard/save.py: - don't save properties comments, it's really annoying when - you want to comment out blocks of components - add some spacing, makes it easier to read - -2006-08-31 Zaheer Abbas Merali - - * flumotion/admin/command/commands.py: - Actually output something if someone does not have cowsay - installed. - -2006-08-31 Zaheer Abbas Merali - - * scripts/wait-for-component-mood: - * scripts/wait-for-http-port: - * scripts/wait-for-show-planet: - * scripts/wait-for-worker: - Stupid svn won't let me commit my propsets of svn:executable - so had to modify the files too. - -2006-08-30 Zaheer Abbas Merali - - * flumotion/test/integration/common.py: - * flumotion/test/integration/test_qa.py: - Use random ports within a range so concurrent buildbots - running the test have a low chance of clashing ports. - -2006-08-30 Zaheer Abbas Merali - - * configure.ac: - Forgot to add in my last commit. - * flumotion/test/integration/__init__.py: - Whoops, forgot to add this file. - * flumotion/test/integration/common.py: - Add some helper methods to base class - * flumotion/test/integration/test_qa.py: - Add Videotest with no overlay integration test. - -2006-08-30 Michael Smith - - * bin/flumotion-manager.in: - Don't use gstreamer in the manager. - - * flumotion/manager/main.py: - Don't print out gstreamer-related variables in the manager, since - we're not importing it. - -2006-08-30 Zaheer Abbas Merali - - * flumotion/admin/command/commands.py: - Add command to show workers logged into a manager. - * flumotion/component/misc/httpfile/httpfile.py: - Work properly when not using a porter. - * flumotion/test/integration/Makefile.am: - * flumotion/test/integration/common.py: - * flumotion/test/integration/test_qa.py: - Add some simple integration tests. - * scripts/wait-for-component-mood: - * scripts/wait-for-http-port: - * scripts/wait-for-show-planet: - * scripts/wait-for-worker: - Add some scripts for the integration tests. - -2006-08-30 Zaheer Abbas Merali - - * flumotion/common/dag.py: - Remove more un-needed log lines. - * flumotion/manager/manager.py: - Reset mood pending when component unregisters, or about - to tell worker to create a really lost component. - -2006-08-30 Andy Wingo - - * flumotion/manager/admin.py (AdminAvatar._saveFlowFile): Break - out from loadConfiguration so that we can instrument it as an - admin action. - -2006-08-30 Michael Smith - - * flumotion/manager/manager.py: - Syntactically superior. - -2006-08-30 Michael Smith - - * flumotion/manager/manager.py: - If a worker logs in and we detect that lost components are gone, - set them to sleeping before restarting them. - -2006-08-30 Andy Wingo - - * flumotion/admin/command/main.py (command_usage) - (parse_commands): Support optional arguments to commands. - - * flumotion/admin/command/commands.py (commands) - (do_loadconfiguration): Add an optional 'save-as' argument. - - * flumotion/manager/admin.py - (AdminAvatar.perspective_loadConfiguration): Accept an optional - saveAs argument that will save the XML fragment to a file in the - manager's flows directory. - -2006-08-30 Zaheer Abbas Merali - - * flumotion/common/dag.py: - Remove unneeded dag log lines. - * flumotion/manager/component.py: - Make line under 80 characters width. - -2006-08-30 Zaheer Abbas Merali - - * flumotion/manager/manager.py: - Clear avatar flags after component has stopped. - -2006-08-29 Thomas Vander Stichele - - * flumotion/worker/feed.py: - use transport.loseConnection() instead - -2006-08-29 Thomas Vander Stichele - - * flumotion/worker/feed.py: - * flumotion/worker/worker.py: - if we can't hand off the fd to the job because the mind is gone, - bubble up a False result, and use it to drop all references to - the transport. - -2006-08-29 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - comment on the FIXME - -2006-08-29 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - add an event probe for EOS and swallow it - reconnect will be - triggered due to buffer probe. - There may be a better way to deal with this though. - -2006-08-29 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - further fix feed reconnection for stopped upstream components: - - handle fdsrc EOS in bus handler by reconnecting - - in _checkEater(), try to reconnect even if the lastTime was - set to 0 - - in eaterDisconnected(), reset lastTime to 0 to make sure - our checkEater() doesn't spuriously mark the feed as connected - again just because we received data right before the disconnect - -2006-08-29 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - implement feed reconnection for eaters: - - make checks for receiving data per-eater instead of global - - rename to _checkEater, and keep track of callLater state - so we can use this method both as a callLater and a normal method - - add overridable vmethods eaterDisconnected and eaterConnected, - which by default set to hungry if any eater is disconnected, - and happy otherwise. Subclasses can override this behaviour here. - - _checkEater will also re-attempt connection if the previous - reconnection did not result in receiving new data in the eater - - add a _reconnectEater method that properly reconnects, and - tracks state of connection attempts - - fixed EatFromFD() to handle the case where fdsrc is already in - PAUSED/PLAYING; where it doesn't accept a change of fd, by - taking fdsrc out, changing state, adding, and reinserting - -2006-08-29 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - key the feederFeedServer on feedId instead - -2006-08-29 Thomas Vander Stichele - - * flumotion/worker/worker.py: - handle the case where a job is gone by closing the fd, - which indicates EOS - -2006-08-29 Thomas Vander Stichele - - * flumotion/manager/manager.py: - fix args error in exception - -2006-08-29 Thomas Vander Stichele - - * flumotion/manager/component.py: - when setup fails, give us a UI error message - -2006-08-29 Andy Wingo - - * flumotion/component/misc/repeater/repeater.py - (Repeater.get_pipeline_string): This component was 25% buggy. And - the other 75% was boilerplate. Don't overload the logs with a - verbose message for every buffer. - -2006-08-29 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/resources.py: - No longer using this ugly hack in httpfile. - * flumotion/component/misc/httpfile/httpfile.py: - Use twisted's preferred way of having a tree of resources instead - of Thomas's ugly hack. - -2006-08-29 Andy Wingo - - * flumotion/component/producers/firewire/firewire.py - (Firewire.getVolume): Implement this, needed for the volume effect - to work. - - * flumotion/worker/checks/video010.py (do_element_check.run_check) - (check1394.do_check): Fix bogus log.debug() calls that caused - errors. - -2006-08-29 Thomas Vander Stichele - - * flumotion/test/test_pbstream.py: - Show that we can also stop streaming before handing off the fd - to multifdsink - -2006-08-28 Zaheer Abbas Merali - - * flumotion/component/misc/httpfile/httpfile.py: - Check for file existing could never be run, duh! - -2006-08-28 Zaheer Abbas Merali - - * flumotion/component/misc/httpfile/httpfile.py: - Forgot an import. Bad me. - -2006-08-28 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/misc/httpfile/httpfile.py: - Copy Thomas's hacked subclass of Resource to httpfile - so we can also handle non root dir urls in httpfile. - -2006-08-28 Zaheer Abbas Merali - - * flumotion/component/component.xml: - Add misc/__init__.py to component-base bundle. - -2006-08-28 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/http.py: - Import porterclient. - * flumotion/component/consumers/httpstreamer/http.xml: - Add bundle dependency on porterclient. - * configure.ac: - * flumotion/component/misc/Makefile.am: - * flumotion/component/misc/httpfile/Makefile.am: - * flumotion/component/misc/httpfile/__init__.py: - * flumotion/component/misc/httpfile/httpfile.py: - * flumotion/component/misc/httpfile/httpfile.xml: - Add new component to serve static files over HTTP. - * flumotion/component/misc/porter/porterclient.py: - Move HTTPPorterClientFactory to porterclient. - * flumotion/component/misc/porter/porter.xml: - Add porterclient bundle. - -2006-08-28 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - make hungry-because-of-eos sticky - -2006-08-22 Thomas Vander Stichele - - * flumotion/manager/manager.py: - a lost component should also be stoppable. Not yet sure - what should happen if the manager thinks it is "stopped", and - then the lost component logs back in though. - -2006-08-28 Thomas Vander Stichele - - * flumotion/manager/manager.py: - Fix wrong number of arguments in commatized log statement. - Also, INFO and above needs to be clear, human-readably, and - not overly verbose. - -2006-08-28 Thomas Vander Stichele - - * flumotion/component/component.py: - remove ugly hack by just logging the avatarId, which is more - correct anyway. - -2006-08-28 Michael Smith - - * flumotion/component/component.py: - Improve comment that was a bit confusing. - -2006-08-28 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Don't treat maxclients == -1 as meaning no client is allowed; this - means there's no max set. - However... don't set maxclient to -1 by default; default to using - the system soft limit - reserve. - -2006-08-28 Andy Wingo - - * flumotion/test/common.py: Fix a screwup. - - * flumotion/twisted/integration.py (Plan._makeOutputDir): Ensure - that the test directory exists before making subdirs in it. Should - fix twisted 2.0.1 build failures, where trial logs into - /tmp/tmpXXXXXX instead of ./_trial_temp. - -2006-08-28 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/test/test_http.py: - add a test for requesting a direct root child, and fix the bug - exposed by it. - -2006-08-28 Michael Smith - - * flumotion/manager/manager.py: - Improve correctness of debug output. - -2006-08-28 Michael Smith - - * flumotion/manager/manager.py: - Fix typo. - -2006-08-28 Michael Smith - - * flumotion/component/component.py: - Set mood to 'waking' when setup() is called. - - * flumotion/manager/manager.py: - Note a waking component (on login) as having already been set up, - but not started. - A 'hungry' component is setup and started. - Improve some log lines. - -2006-08-26 Zaheer Abbas Merali - - * flumotion/worker/worker.py: - Fix docstring. - -2006-08-25 Zaheer Abbas Merali - - * flumotion/manager/component.py: - Remove call to tryWhatCanBeStarted when component attaches, because - we moved it to a similar place in vishnu where the depgraph - setting is happening. - * flumotion/manager/manager.py: - When worker attaches, check what components worker has running - so manager does not attempt to start them. Also make worker - create any components that are lost but assigned for that worker - and are not components worker already has running. Useful when - machine worker is running on has an unclean shutdown/power outage. - - Move depgraph setting on component attach to after we are guaranteed - we have received the job state and hence the mood any components - have before this connection to manager. Fixes a race. - * flumotion/manager/worker.py: - Add remote method so that manager can query worker for what - components it has. Useful when worker re-connects after network - failure so manager does not try and setup/start the components. - * flumotion/test/test_manager_manager.py: - Add stub method for getting components worker has. - * flumotion/worker/worker.py: - Add remote method so that manager can query worker for what - components it has. Useful when worker re-connects after - network failure so manager does not try and setup/start the - components. - -2006-08-25 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/resources.py: - Our streamer component never supported non-root URI's. - Add handling for it... - * flumotion/test/test_http.py: - ... and a test. - -2006-08-25 Michael Smith - - * flumotion/manager/manager.py: - When a component attaches to the manager, if it already has a happy - mood, set the depgraph setup and start nodes to true. - Avoids trying to re-setup/restart components that are already - running. - -2006-08-25 Zaheer Abbas Merali - - * doc/random/component-dependencies/depgraph-scenario2.dia: - Update to new depgraph semantics. - -2006-08-25 Zaheer Abbas Merali - - * doc/random/component-dependencies/depgraph-scenario1.dia: - Add missing dep lines between COMPONENTSTART nodes. - -2006-08-25 Thomas Vander Stichele - - * flumotion/manager/component.py: - when handling direct dependencies that can be changed, handle - all of them, not just the first one. This allows other - non-depending components to start even if the first one ran - into an error. - -2006-08-24 Thomas Vander Stichele - - * flumotion/common/log.py: - log the str() of an exception, more useful than just the first arg - * flumotion/manager/component.py: - pass on on already handled component start errors - -2006-08-24 Thomas Vander Stichele - - * flumotion/common/log.py: - do not log an empty Exception.args[0] - * flumotion/manager/component.py: - also add ConnectError (No route to host) as something to show an - error message for. Log the frame inside this file, so we do not - see a defgen frame. - -2006-08-24 Thomas Vander Stichele - - * flumotion/common/errors.py: - clarify args of ComponentError and BusyComponentError - * flumotion/manager/component.py: - a component turning happy should clear its moodPending - * flumotion/manager/manager.py: - reset moodPending when logging out - * flumotion/test/test_manager_manager.py: - add fake eatFrom/feedTo - verify moodPending - fix test - -2006-08-24 Thomas Vander Stichele - - * flumotion/common/log.py: - clean up warningFailure, documenting it, and adding a - swallow boolean, that controls whether we propagate the failure or - not - * flumotion/manager/component.py: - use swallow, so that our second errback can still function and - throw up a decent message when we can't start a component - -2006-08-24 Thomas Vander Stichele - - * flumotion/common/log.py: - add ellipsize function for long (+8 lines) strings - * flumotion/common/medium.py: - * flumotion/manager/admin.py: - * flumotion/manager/base.py: - * flumotion/twisted/pb.py: - use it. This makes sure we don't see complete .pyc files in our logs - * flumotion/test/test_bundle.py: - allow for logging - -2006-08-24 Thomas Vander Stichele - - * flumotion/manager/manager.py: - actually set moodPending, to make sure we don't start a component - more than once. This fits with all the code that checks moodPending. - Solves the problem of having components being started more than once - if we have multiple loadConfiguration calls in a row. - -2006-08-24 Zaheer Abbas Merali - - * flumotion/manager/component.py: - Document _tryWhatCanBeStarted a bit more and give rationale - for why it's doing what it's doing. - * doc/random/component-dependencies/depgraph-scenario1.dia: - Update diagram to be up to date with latest component dependencies - things. - -2006-08-24 Andy Wingo - - * flumotion/manager/manager.py - (Dispatcher.createAvatarFor.got_identity): Fix indentation error. - (Vishnu.computeIdentity): Always return a deferred. - - * flumotion/test/test_twisted_integration.py (_deferred_result): - Pull from common.py. - - * flumotion/test/test_manager_manager.py - (TestVishnu._requestAvatar): New helper method. - (TestVishnu._loginWorker, TestVishnu._loginComponent): Use - _requestAvatar, return a deferred now. - (TestVishnu._logoutAvatar): Rearrange arg order to correspond to - manager.py. - (TestVishnu.testConfigBeforeWorker): - (TestVishnu.testConfigAfterWorker) - (TestVishnu._verifyConfigAndOneWorker): - (TestVishnu.testWorker): Adapt to deferred avatars. - - * flumotion/test/common.py (deferred_result): New function, a - decorator for tests that return deferreds that will make T1.3 - happy. - (deferred_result): Decorator to handle old twisted deferred - returns. - -2006-08-24 Thomas Vander Stichele - - * flumotion/component/component.py: - error()'s prototype has changed at some point, so fix our override - -2006-08-24 Andy Wingo - - * flumotion/manager/manager.py - (Dispatcher.requestAvatar.got_error): Fix bogus .trap statement :/ - -2006-08-24 Thomas Vander Stichele - - * flumotion/manager/component.py: - add a generic error message for not being able to start a component - * flumotion/manager/manager.py: - * flumotion/worker/worker.py: - log.getFailureMessage() is slightly more useful - -2006-08-24 Michael Smith - - * flumotion/component/component.py: - Add a hack to figure out the name of a component that hasn't been - set up (because it never logged in) when printing out a login - failure message. - -2006-08-24 Andy Wingo - - * flumotion/manager/manager.py (Dispatcher.createAvatarFor): - Change to return a deferred, because computeIdentity returns a - deferred. - (Dispatcher.requestAvatar): Change to return a deferred instead of - an immediate value. - - * flumotion/component/plugs/identity.py - (ExampleIdentityProvider.computeIdentity): Change this protocol to - return a deferred instead of an immediate result. - -2006-08-23 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Change getStreamData to return 'url' and 'description' - -2006-08-23 Zaheer Abbas Merali - - * flumotion/component/feedcomponent010.py: - Set mood of component to hungry instead of sad when receiving - an EOS. The EOS is caused when it disconnects from it's feeder. - -2006-08-23 Thomas Vander Stichele - - * flumotion/common/boot.py.in: - reinstall our packager's import hooks - after installing the reactor - also, allow specifying whether we want gst as part of the boot - process, so we can disable it for programs that don't need it - * flumotion/common/package.py: - factor out a Packager.install() method so we can reinstall the - import hooks - * flumotion/twisted/compat.py: - add a note about the reactor overriding import hooks - -2006-08-23 Andy Wingo - - * flumotion/twisted/integration.py (TimeoutException): Take some - args so our __str__ can be more useful. - (ProcessProtocol.timeout, Process.wait): Pass around more context - so we can annotate our errors better. - - * flumotion/configure/configure.py: - * flumotion/configure/uninstalled.py.in (get): - * flumotion/configure/installed.py.in (get): Add 'bindir' as a - conf variable. - -2006-08-23 Thomas Vander Stichele - - * flumotion/job/job.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/worker/worker.py: - remote_create only needs the nice level, not the whole config - Fixes a long-standing FIXME and allows me to tighten down the - component protocol - * flumotion/test/test_worker_worker.py: - fix test for removal of .config and adding of .nice - -2006-08-23 Thomas Vander Stichele - - * flumotion/manager/component.py: - guard against the mood key being set to None - -2006-08-23 Michael Smith - - * flumotion/test/test_porter.py: - Write tests for a private bug report. - Ensure that we handle (i.e. ignore) GET parameters in the porter - HTTP parser. - -2006-08-22 Andy Wingo - - * flumotion/component/consumers/httpstreamer/resources.py - (HTTPStreamingResource.logWrite): Log the already-parsed get - parameters as well. - - * flumotion/twisted/integration.py (test): Sigh, it seems trial - 2.4 requires a timeout. - - * flumotion/component/plugs/loggers.py - (_http_session_completed_to_apache_log): Assume that 'username' is - in the args, and comment on the role of ident. - - * flumotion/component/consumers/httpstreamer/resources.py - (HTTPStreamingResource.logWrite): Add 'username' to args, with the - intention of filling it in properly later. - - * flumotion/twisted/integration.py (ProcessProtocol.processEnded): - More debugging. - (PlanExecutor._checkProcesses): Debugging, and make sure we don't - callback a Failure -- that would put us down the errback side. - (test): Set timeout attr to None, so trial never times out on our - behalf. - - * flumotion/test/test_twisted_integration.py (_call_in_reactor): - Be P2.3-friendly. - (_deferred_result): New decorator for deferred results, to handle - T1.3. - (CompatTestCase): New base class, makes sure failUnlessFailure is - there. Other test cases derive from this now. - (IntegrationProcessTest.testTransientProcess) - (IntegrationProcessTest.testTimeOut) - (IntegrationProcessTest.testKill) - (IntegrationPlanExecuteTest.testTransientProcess) - (IntegrationPlanExecuteTest.testKill) - (IntegrationPlanExecuteTest.testUnexpectedProcessExit) - (IntegrationPlanExecuteTest.testUnexpectedExitCode) - (IntegrationPlanExecuteTest.testProcessesStillRunning): Use the - _deferred_result decorator. - - * flumotion/test/test_twisted_integration.py - (IntegrationProcessTest.failUnlessFailure): Fix my broken fallback - failUnlessFailure implementation. - - * flumotion/twisted/integration.py (Process.wait.got_exit): Status - can be None, change the format string. - (warning): For some reason, the level is WARN and not WARNING. - This is crazy. - - * flumotion/admin/command/utils.py (find_component): Find - components in the atmosphere as appropriate. - - * flumotion/twisted/integration.py (_which): IMF structural - adjustment. - (log, debug, info, warning, error): New wrappers. Use em in a - bunch of places. This way you can run trial with - FLU_DEBUG=integration:5 and see what's going on. - -2006-08-21 Thomas Vander Stichele - - * flumotion/common/boot.py.in: - suppress pychecker warning about redefining catching - -2006-08-21 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - * flumotion/manager/manager.py: - * flumotion/test/test_manager_manager.py: - doc, indentation, and logging changes - -2006-08-21 Andy Wingo - - * flumotion/twisted/integration.py (test): For old twisted, return - unittest.deferredResult. Cope with older python as well. - (test.wrappedtest): BPB. - - * flumotion/twisted/integration.py (Plan.__init__): Attempt to - pass distcheck via using trial's temp dir for logging. Don't - bother appending the time, trial ensures we are in a pristine dir. - -2006-08-21 Thomas Vander Stichele - - * flumotion/manager/component.py: - a component logging in could already be running, so don't set the - mood to waking on login - -2006-08-21 Thomas Vander Stichele - - * common/common.mk: - remove -R from trial for coverage - -2006-08-17 Andy Wingo - - * flumotion/test/test_twisted_integration.py - (IntegrationTestDecoratorTest.testParallelStartAndKill): Update - for new kill semantics. - - * flumotion/twisted/integration.py (Plan.kill): Change to only - kill one process, with an optional wait status. status=None, the - default, means that the signal handler kills the program. status=0 - means that the app caught the signal and returned 0. - -2006-08-16 Andy Wingo - - * common/setup.m4: No ac_dest in autoconf 2.60; but we do have - ac_file. - (setup): Return the package path, in case any script wants to know - the srcdir. - - * flumotion/manager/main.py (main): Return 1 on all argument - errors. - - * flumotion/test/test_twisted_integration.py - (IntegrationPlanGenerationTest.testTransientProcess) - (IntegrationPlanGenerationTest.testKill) - (IntegrationPlanExecuteTest.testTransientProcess) - (IntegrationPlanExecuteTest.testKill) - (IntegrationPlanExecuteTest.testUnexpectedProcessExit) - (IntegrationPlanExecuteTest.testUnexpectedExitCode) - (IntegrationPlanExecuteTest.testProcessesStillRunning): Update for - Plan initargs. - - * flumotion/twisted/integration.py (Plan.__init__): Take the test - case instead of its name, so that we can output our logs in the - correct directory. - (_classNameToFileName): New happy function. - (test.wrappedtest): Create a Plan with the proper initargs. - - * flumotion/test/test_twisted_integration.py - (IntegrationProcessTest.testTransientProcess) - (IntegrationProcessTest.testTimeOut) - (IntegrationProcessTest.testKill) - (IntegrationTestDecoratorTest.testTransientProcess) - (IntegrationTestDecoratorTest.testParallelWait) - (IntegrationTestDecoratorTest.testFalse) - (IntegrationTestDecoratorTest.testKill) - (IntegrationTestDecoratorTest.testParallelStartAndKill): Python - 2.3-friendly decorators. - -2006-08-14 Andy Wingo - - * flumotion/test/test_twisted_integration.py - (IntegrationPlanExecuteTest.testUnexpectedExitCode): Remove some - debugging cruft. - (IntegrationPlanExecuteTest.testUnexpectedExitCode): BPB. - (IntegrationProcessTest.testTransientProcess): Because we can - immediately be STOPPED for short-lived processes, relax this check - to != NOT_STARTED. - (IntegrationProcessTest.failUnlessFailure): Implement if not - present. - - * flumotion/twisted/integration.py (Process.start): Reorder an - addCallback to account for the case in which the deferred already - fired. Fixes a wee bug. Remove all this prints in this file. - - * flumotion/test/test_twisted_integration.py: Unit test for - integration framework. - - * flumotion/twisted/integration.py: New file, implements a - framework for spawning processes from within unit tests, so you - can use trial to make integration tests. See the docstring for - more info. Still a couple of bugs to iron out. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/twisted/Makefile.am (flumotion_PYTHON): Requisite - autotoolage. - -2006-08-09 Thomas Vander Stichele - - * flumotion/common/log.py: - fix docstring - -2006-08-09 Andy Wingo - - * flumotion/component/misc/porter/porter.py - (PorterMedium.remote_getPorterDetails): Report the iptables-port, - not the port we actually listen on. - (Porter.init): - (Porter.do_setup): Get iptables-port from the config, defaulting - to props['port']. - - * flumotion/component/misc/porter/porter.xml: New optional - property iptables-port, for e.g listening on port 8800 but saying - we listen on 80, because iptables redirects 80->8800. - -2006-08-09 Andy Wingo - - * flumotion/component/misc/porter/porter.xml: Add a comment. - - * flumotion/component/misc/porter/porter.py - (PorterMedium.remote_getPorterDetails): Also return the interface - the porter is listening on. - -2006-08-08 Thomas Vander Stichele - - * flumotion/twisted/Makefile.am: - Yay for adding files but not keeping the dist working - -2006-08-07 Andy Wingo - - * flumotion/common/boot.py.in (boot): Support profiling of any - flumotion process via setting the FLU_PROFILE environment - variable. - -2006-08-02 Thomas Vander Stichele - - * flumotion/manager/admin.py: - log perspectiveMessageReceived for admin avatars - -2006-07-31 Andy Wingo - - * flumotion/common/connection.py (PBConnectionInfo.__str__): Fix - __str__ in the case of an authenticator transferred over the wire. - -2006-07-27 Michael Smith - - * flumotion/component/component.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - Cleanup of mood handling: transitions to/from sleeping MUST only be - done by the manager, not by a component. Fixes #426. - - Also fix a cleanup issue if stop gets called multiple times on a - component. - - -2006-07-27 Thomas Vander Stichele - - * flumotion/manager/component.py: - * flumotion/manager/depgraph.py: - doc and debug fixes - -2006-07-27 Thomas Vander Stichele - - * flumotion/manager/manager.py: - remove messages when asked to stop a component; fixes #410 - -2006-07-26 Michael Smith - - * flumotion/component/feedcomponent010.py: - Make the interval for checking for recent-buffers 2.5 times the - interval we use for getting the buffer. - Having them the same frequently causes components to spuriously go - hungry, then back to happy shortly after. - -2006-07-26 Michael Smith - - * flumotion/component/component.py: - Fix CPU updating by adding a callLater loop. - Cancel cpu updating callLater in BaseComponent.stop() - - * flumotion/test/test_component.py: - * flumotion/test/test_component_init.py: - * flumotion/test/test_htpasswdcrypt.py: - * flumotion/test/test_pb.py: - * flumotion/test/test_saltsha256.py: - Update tests to stop components they create so we don't have - callLaters lying around which trial dislikes. - -2006-07-26 Thomas Vander Stichele - - * flumotion/admin/gtk/parts.py: - actually update the CPU usage column when we receive an update - * flumotion/component/component.py: - add a log line - -2006-07-24 Thomas Vander Stichele - - * flumotion/twisted/pb.py: - add a Referenceable and Avatar that is also loggable, so we can - hook into remoteMessageReceived for logging - * flumotion/common/medium.py: - subclass BaseMedium from our new Referenceable - * flumotion/common/log.py: - add getFileLine as a public method - add getFormatArgs to aid in creating format and args string for - debug statements without interpolating variables - expose _handle() as doLog() - add Loggable.doLog(), allowing more control over file and line it - shows - * flumotion/component/component.py: - * flumotion/component/feedcomponent.py: - * flumotion/worker/worker.py: - * flumotion/worker/feed.py: - * flumotion/manager/component.py: - * flumotion/job/job.py: - remove debug lines that are now done for us - * flumotion/manager/base.py: - add debugging to ManagerAvatar - -2006-07-22 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - respect the do_stop() protocol - -2006-07-22 Thomas Vander Stichele - - * flumotion/manager/admin.py: - * flumotion/manager/manager.py: - move implementation of stopping a component to Vishnu; - an admin avatar should not implement component-specific - behaviour - -2006-07-22 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/common/dag.py: - doc fixes - -2006-07-21 Thomas Vander Stichele - - * flumotion/manager/depgraph.py: - doc cleanups - -2006-07-20 Thomas Vander Stichele - - * flumotion/common/common.py: - remove unused module - -2006-07-20 Thomas Vander Stichele - - * flumotion/common/dag.py: - DAG was never intended to only take int types, so use %r - everywhere for type - Move some debugging to log, it's too verbose otherwise - * flumotion/manager/depgraph.py: - use strings for type, makes debug a lot more readable - add a FIXME for a very doubtful two lines of code - speed up turning downstream components to hungry when we - stop a component - * flumotion/manager/component.py: - use strings for type, makes debug a lot more readable - * flumotion/test/test_dag.py: - * flumotion/test/test_manager_depgraph.py: - * flumotion/test/test_manager_manager.py: - Fix tests as well - -2006-07-20 Thomas Vander Stichele - - * flumotion/component/component.py: - add a doc - * flumotion/component/feedcomponent010.py: - make defaults for turning hungry smaller - fix the check_for_buffer_data callLater; components now - turn hungry (slowly) when they stop receiving data - -2006-07-20 Zaheer Abbas Merali - - * TODO: - * flumotion/common/dag.py: - Added logging. Remove references to nodes that may not exist - anymore, which end up actually being added to the sorted list. - * flumotion/manager/depgraph.py: - More debug. Also remove dag nodes from _state when the component - and worker are removed. - * flumotion/test/test_manager_depgraph.py: - Added test that adds components, removes them, adds them again. - * flumotion/test/test_pb.py: - Remove un-needed print statement. - Fixes #408. - -2006-07-20 Michael Smith - - * flumotion/job/job.py: - Don't give a warning about 'unknown message' for every sendFeed - - use elif rather than if. - -2006-07-20 Thomas Vander Stichele - - * flumotion/admin/multi.py: - connect to connection refused and failed - * flumotion/component/bouncers/htpasswdcrypt.py: - debug which user we are authenticating for - -2006-07-20 Thomas Vander Stichele - - * configure.ac: - * flumotion/configure/configure.py: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - add sbindir so other code can find the flumotion service program - * flumotion/twisted/compat.py: - do not try to avoid the threaded resolver. This fixes resolving - for Mike and me from the admin clients. - -2006-07-20 Andy Wingo - - * flumotion/admin/command/main.py (main): Update for - PBConnectionInfo changes. - - * flumotion/admin/connections.py (parsePBConnectionInfo): New - parser, the same as common.connection variant but with some - special lovin from the connections cache. - -2006-07-20 Michael Smith - - * flumotion/manager/depgraph.py: - Comment changes so I can read this, and an extra debug line. - -2006-07-20 Andy Wingo - - * flumotion/admin/command/commands.py (do_loadconfiguration): Add - a new command. - - * flumotion/common/connection.py (PBConnectionInfo.__str__): In - the case that we have no username, don't prepend user@. - - * flumotion/admin/admin.py (AdminModel.connectToHost): Do what we - should have done ages ago, make the managerId directly from a - PBConnectionInfo. - - * flumotion/admin/gtk/client.py (Window.on_open_connection) - (Window.on_recent_activate) - (Window._append_recent_connections.append_txt) - (on_have_connection): Update for authenticator/PBConnectionInfo - changes. - -2006-07-20 Thomas Vander Stichele - - * flumotion/common/dag.py: - * flumotion/manager/depgraph.py: - style and debug changes, before actually changing logic - -2006-07-19 Andy Wingo - - * main.py (parse_options): Update for config parsing changes. - - * controller.py (HoustonController.update_recent_connections): - recent will return a PBConnectionInfo now. - (HoustonController.open_connection): No more auth callback, later - for manual connections we should make a different kind of - authenticator. Future work... - - * dialogs.py (OpenConnectionDialog.get_state): Update for - PBConnectionInfo auth changes. - - * flumotion/admin/connections.py - (get_recent_connections.parse_connection): Read into a - PBConnectionInfo, not a funny dict. - (get_recent_connections): 'info' not 'state'. - - * flumotion/admin/gtk/connections.py - (Connections._populate_liststore): admin.connections changed - 'state' to 'info', adjust accordingly... - - * flumotion/admin/gtk/greeter.py (LoadConnection.on_next): The - recent connections will give us a PBConnectionInfo; convert to our - native dict storage. - - * flumotion/twisted/pb.py (RemoteAuthenticator.username) - (RemoteAuthenticator.password): Add attributes for convenience; - should be part of the interface at some point. Will always be - None. - - * env.in (src_dir): Change to build_dir. Dunno how the full path - to srcdir can be gotten. - -2006-07-19 Thomas Vander Stichele - - * flumotion/manager/worker.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - If feederports is specified in XML, but empty, then do not start - a feedserver. - Ideally, we should rename the option to something more generic, - and allow for not starting a FeedServer. - Closes #415. - -2006-07-17 Michael Smith - - * configure.ac: - Add new makefile to configure.ac - -2006-07-17 Michael Smith - - * flumotion/component/misc/Makefile.am: - * flumotion/component/misc/gdptestsrc/Makefile.am: - * flumotion/component/misc/gdptestsrc/Makefile.in: - * flumotion/component/misc/gdptestsrc/__init__.py: - * flumotion/component/misc/gdptestsrc/gdptestsrc.py: - * flumotion/component/misc/gdptestsrc/gdptestsrc.xml: - Add gdptestsrc element which uses a tcpclientsrc ! gdpdepay pipeline - to feed a flumotion flow. - -2006-07-17 Michael Smith - - * flumotion/manager/component.py: - Remove superfluous exclamation marks. - -2006-07-17 Michael Smith - - * flumotion/manager/component.py: - Downstream connection doesn't work reliably currently due to races. - Change to upstream for now so we can do testing. - -2006-07-14 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.py: - add more debugging about burst-on-connect - -2006-07-14 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - log the first buffer probe at debug level, and all the others - at log, since we do not want to clutter our logs. - In the future, we may want to also go back to debug level after - a reconnect - -2006-07-14 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - move the buffer frequency callLater start to a later stage than - init. Fixes tests for twisted 2.0.1 and 2.1.0 - -2006-07-14 Michael Smith - - * flumotion/manager/component.py: - Commit patch I wrote in my dream last night: clear happydefers - correctly. - -2006-07-14 Thomas Vander Stichele - - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/bouncers/saltsha256.py: - fix debugging - -2006-07-14 Thomas Vander Stichele - - * flumotion/common/medium.py: - add some debug and docs - -2006-07-14 Michael Smith - - * flumotion/common/medium.py: - Make the check for startPinging being called multiple times more - sane. Fixes pinging after a disconnect/reconnect. - -2006-07-13 Andy Wingo - - * flumotion/manager/admin.py - (AdminAvatar.perspectiveMessageReceived): Ignore the ping message. - - * flumotion/common/connection.py: Fix some bugaroos. - -2006-07-13 Michael Smith - - * flumotion/manager/manager.py: - remove component from depgraph in deleteComponent. - -2006-07-13 Michael Smith - - * doc/random/component-initialization-protocol: - * flumotion/common/bundle.py: - * flumotion/common/dag.py: - * flumotion/component/component.py: - * flumotion/component/feedcomponent010.py: - * flumotion/manager/Makefile.am: - * flumotion/manager/component.py: - * flumotion/manager/depgraph.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_dag.py: - * flumotion/test/test_manager_depgraph.py: - * flumotion/test/test_manager_manager.py: - - Merge component-dependencies. Mostly a manual merge (apart from - pre-existing files), as other code had changed a lot. - -2006-07-13 Andy Wingo - - * flumotion/admin/command/main.py (setup_reactor): Update for - admin initargs. - - * flumotion/admin/gtk/main.py (_runInterface): Update for admin - initargs. - - * flumotion/admin/text/connection.py (connect_to_manager): Update - for admin initargs. - - * flumotion/admin/multi.py (MultiAdminModel.addManager): - Authenticators, not keycards. - - * flumotion/admin/admin.py (AdminModel.__init__): Take an - authenticator as the initarg. - (AdminModel._makeFactory): Take an authenticator. - (AdminModel.connectToHost) - (AdminModel.setRemoteReference.writeConnection): Update. - - * flumotion/common/connection.py (PBConnectionInfo): Port to use - authenticators. - - * flumotion/common/common.py (checkPortFree, getFirstFreePort) - (checkRemotePort): - * flumotion/test/test_common.py (TestPort): Remove fundamentally - broken code. - -2006-07-12 Thomas Vander Stichele - - * flumotion/common/common.py: - "depreciate" componentPath - blame pychecker - * flumotion/common/config.py: - * flumotion/manager/base.py: - * flumotion/manager/manager.py: - * flumotion/test/test_common.py: - * flumotion/test/test_manager_manager.py: - remove all users of componentPath - -2006-07-12 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - * flumotion/job/job.py: - * flumotion/manager/base.py: - * flumotion/manager/component.py: - * flumotion/worker/feed.py: - doc fixes - -2006-07-12 Thomas Vander Stichele - - * TODO: - * flumotion/common/keycards.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/manager/component.py: - requesterName -> requesterId - -2006-07-12 Thomas Vander Stichele - - * TODO: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/component.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/misc/porter/porter.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/looper/looper.py: - finally rename to componentMediumClass - -2006-07-12 Thomas Vander Stichele - - * flumotion/twisted/pb.py: - put back normal login/startLogin of ReconnectingPBClientFactory - add asserts to not get keycards in the FPB ClientFactory classes - -2006-07-12 Thomas Vander Stichele - - Merge the feed-1 branch: - * flumotion/common/interfaces.py: - add IFeedMedium and IFeedServerParent - * flumotion/worker/feed.py: - - actually add all objects - FeedComponentAvatar, - FeedClient, ... and the feedServerFactory method - - implement perspective_receiveFeed and perspective_sendFeed - - implement FeedAvatar (FeedServer-side object) and FeedClient - - rename internal dispatcher class; the idea is that a manager - could use its dispatcher, with a FeedHeaven, to proxy feeds - between components - - make ProxyManagerBouncer get keycardClasses remotely - add perspectiveInterface - * flumotion/worker/Makefile.am: - add feed.py - * flumotion/test/test_worker_worker.py: - fix test by adding a port to FakeOptions - - * flumotion/component/feedcomponent010.py: - - use fdsrc and multifdsink for feeders and eaters - remove _setup_eaters() and _setup_feeders() - now handled - outside of component - - add FeedToFD() and EatFromFD(), which are the new - interface points for making a component connect - to the outside - - change link() - * flumotion/component/feedcomponent.py: - - change do_start() to remove eaters/feedersData - - change ClientFactory to new interface - - implement remote_feedTo and remote_eatFrom - - * flumotion/worker/worker.py: - - add remote_getFeedServerPort() - - give the medium all but the last feeder port, which we - use for the FeedServer - - listen with fdserver.FDPort for the job server, so - we can pass fd's - - add WorkerBrain's IFeedServerParent methods: - eatFromFD and feedToFD - - add JobAvatar.receiveFeed - - store feedserver's port object so we can shutdown properly - - document JobHeaven.avatars so we are free to use it as public - API - * flumotion/job/job.py: - Use a JobClientBroker that can receive fd's - handle getting a receiveFeed and sendFeed message - * flumotion/job/main.py: - connect our job client with fdserver.FDConnector so we - can receive fd's - * flumotion/manager/worker.py: - privatize portSet - get the FeedServerPort and use it instead of previous - separate reservedPorts - * flumotion/manager/manager.py: - - factor out a getWorker, add a method to get feedServerPort - - add a warning for when a worker is already logged out when - we're trying to shut down a component - * flumotion/manager/component.py: - - clean up naming confusion in FeederSet and related, it - deals with feedId (componentName:feedName) now - - Use eatFrom() or feedTo() before start() to link components - - break out eatFrom into its own method, since we - are going to use it for reconnecting as well, - besides using feedTo too - - move the connecting of a component's eater to before the start - method - - remove feedersData, it's irrelevant now that the - component itself doesn't do the listening anymore for its - feeders - - implement both upstream and downstream connection, both work - * flumotion/common/common.py: - add methods to deal with feedId, fullFeedId, componentId - * flumotion/common/keycards.py: - also log the requesterName in our __repr__ - * flumotion/common/planet.py: - add documentation about eaterNames and feederNames keys - * flumotion/component/converters/overlay/overlay.py: - replace do_start() implementation with configure_pipeline() - - * flumotion/common/errors.py: - add HandledException - * flumotion/twisted/defer.py: - fix errback-of-last-resort, to not trigger it if the - failure is due to a HandledException - - * flumotion/twisted/pb.py: - add an assert for our sanity - change docstring - * flumotion/twisted/portal.py: - getKeycardInterfaces() now returns a deferred - * flumotion/component/component.py: - make startLogin take an authenticator now - change setKeycard to setAuthenticator - * flumotion/manager/base.py: - add a method to get the manager bouncer's getKeycardClasses() - - * flumotion/test/Makefile.am: - * flumotion/test/test_pbstream.py: - add a test that tests our way of switching from PB - to GStreamer data protocol streaming over the underlying - connection - * flumotion/test/test_manager_manager.py: - fix test by adding method to FakeWorkerMind - - * doc/random/naming: - docs about naming of objects, so we can start cleaning up - some variable names used everywhere - add notes on feedserver and how to name things to request - * doc/random/feed: - add notes on the current way of connecting eaters and feeders - - * flumotion/admin/admin.py: - * flumotion/common/medium.py: - add some debug - -2006-07-12 Thomas Vander Stichele - - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - change getKeycardInterfaces to getKeycardClasses. That was pretty - dumb. - -2006-07-12 Thomas Vander Stichele - - * flumotion/twisted/pb.py: - - add an Authenticator object that can issue keycards and respond - to challenges on keycards, given the secret data necessary - - use this authenticator as an argument to login and startLogin, - instead of the keycard directly. Also always use self.medium - as the client, and self.perspectiveInterface as the interface - being requested - - add a remote_getKeycardInterfaces to announce which keycards the - manager supports - - add a RemoteAuthenticator adapter that can be used to adapt - the pb.RemoteReference for an Authenticator to the same - Authenticator "interface" - * flumotion/twisted/portal.py: - add getKeycardInterfaces() - * flumotion/admin/admin.py: - * flumotion/component/component.py: - use the new startLogin with an authenticator - add perspectiveInterface to the FPB.ClientFactory subclasses - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - * flumotion/job/job.py: - same as above; - also change keycard to authenticator everywhere, - and use the RemoteAuthenticator adapter in remote_bootstrap - * flumotion/test/test_pb.py: - Test the new FPB, which uses authenticator - Also add test for the saltsha256 bouncer - -2006-07-12 Andy Wingo - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.failedSlaveStart): Removed, this code path is - gone now. - -2006-07-12 Michael Smith - - * flumotion/common/medium.py: - Stop pinging on remoteReference disconnection. - - * flumotion/manager/base.py: - Don't start ping-checking until we have an attached mind. - - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_manager_worker.py: - * flumotion/test/test_worker_worker.py: - Fix tests to clean up properly so that we don't have unclear - reactors. - -2006-07-12 Thomas Vander Stichele - - * flumotion/component/bouncers/htpasswdcrypt.py: - reorder to prefer the challenger-based keycard - * flumotion/component/bouncers/saltsha256.py: - check for the right interface - * flumotion/component/bouncers/bouncer.py: - document - -2006-07-12 Michael Smith - - * flumotion/common/medium.py: - Remove bogus method. - - * flumotion/manager/manager.py: - When cleaning out the planet, we can only send stop() to components - for which we have avatars - if it's lost or sad, we might not. - -2006-07-12 Michael Smith - - * flumotion/test/test_manager_manager.py: - Improve test so that we test both expected and unexpected logouts, - and ensure that the state is correct (sleeping for expected, lost - for unexpected) after this. - - * flumotion/test/test_worker_worker.py: - Make FakeRef stub out a few other things. - -2006-07-12 Michael Smith - - * flumotion/twisted/pb.py: - Move PingableAvatar here. - - * flumotion/common/medium.py: - Move PingingMedium here. - - * flumotion/admin/admin.py: - Subclass from PingingMedium - - * flumotion/component/component.py: - Add a rather ugly hack to note here when we've stopped the reactor, - so that we can avoid calling reactor.stop() twice (which fails - badly). - - Make BaseComponentMedium subclass PingingMedium. - - Remove heartbeats, as these are now done by the PingingMedium - automatically. - - * flumotion/job/job.py: - When shutting down (in a system event trigger), do a remote call to - the manager to tell it that we're doing a clean shutdown. - - Ensure we don't stop the reactor twice. - - * flumotion/job/main.py: - Add the system event trigger - - * flumotion/manager/base.py: - Manager-side avatars are all PingableAvatars, now. - - * flumotion/manager/component.py: - Remove manager side of heartbeats, now done by lower-level classes. - - When a component disconnects, if the shutdown was 'clean' (as - notified by the component telling us with a remote call before it - shuts down), set mood to sleeping. For any other shutdown, mood - becomes lost (in both cases, we never clear a 'sad' mood, though). - - Ensures mood transitions in all cases end up, correctly, in - sleeping, lost, or sad (and importantly, we never go through - sleeping on the way to sad now!) - - * flumotion/worker/worker.py: - Use PingingMedium - -2006-07-12 Thomas Vander Stichele - - * doc/random/authentication: - update notes on authentication - * flumotion/test/test_common_planet.py: - add another assertion - -2006-07-11 Thomas Vander Stichele - - * flumotion/test/test_common_componentui.py: - * flumotion/test/test_keycards.py: - perspective -> remoteRoot - -2006-07-11 Thomas Vander Stichele - - * flumotion/test/testclasses.py: - add a TestPB class that implements a PB connection with .send - and .receive for easier testing - * flumotion/test/test_testclasses.py: - add a test for our testclasses - show possible implementation of Keycard using Cacheable/RemoteCache - and still have a working observer, as well as control over the - exact cached state - * flumotion/test/Makefile.am: - add test_testclasses - -2006-07-11 Andy Wingo - - * flumotion/common/worker.py (PortSet.setPortsUsed) - (PortSet.numUsed): New functions. - - * flumotion/component/producers/audiotest/audiotest.py - (AudioTest): - * flumotion/component/producers/audiotest/admin_gtk.py - (AudioTestAdminGtkNode): Port to use UIState. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.do_check): Fix silly bug. Unclear how this - slipped past the test suites. - - * flumotion/manager/component.py - (ComponentAvatar.perspective_adminCallRemote): Remove, not used - any more. - - * flumotion/admin/gtk/client.py (Window.componentCall): - * flumotion/admin/admin.py (AdminModel.remote_componentCall): - Removed, not called any more. Yay. - - * flumotion/component/consumers/httpstreamer/admin_gtk.py - (HTTPStreamerAdminGtk): Remove logging tab, it sucked and also - was completely bogus. - - * flumotion/component/plugs/plugs.xml: - * flumotion/component/plugs/loggers.py - (RequestStringToAdminLogger): Removed, uses an old interface - that's not going to be replaced. Also, completely the wrong - approach to statistics. - -2006-07-11 Andy Wingo - - * flumotion/component/producers/audiotest/Makefile.am - (component_DATA): Dist audiotest.glade. - - * flumotion/test/test_config.py - (TestConfig.testParseManagerWithPlugs): Added a plug, update the - test... - - * flumotion/manager/manager.py (Vishnu.computeIdentity): Fix - bicho. - - * flumotion/test/test_manager_manager.py - (TestVishnu.testConfigAfterWorker) - (TestVishnu.testConfigBeforeWorker) - (TestVishnu.testLoadConfiguration): Fix for loadConfigurationXML - requiring the caller to provide its identity. - -2006-07-07 Andy Wingo - - * flumotion/manager/main.py (_initialLoadConfig): - * flumotion/manager/manager.py (RUNNING_LOCALLY) - (Vishnu._makeBouncer, Vishnu._addManagerPlug) - (Vishnu._addComponent, Vishnu.loadConfigurationXML): - loadConfigurationXML can be called in two ways: from a remote - admin client, and during manager startup to parse XML files given - on the command line. In the latter case we don't want to go - through the adminaction mechanism. Make it so that bypassing the - adminaction checks must be explicitly requested. - (Vishnu.computeIdentity): Fall back to creating a remote identity - object. - - * flumotion/component/plugs/identity.py - (ExampleIdentityProvider.computeIdentity): IdentityProviders have - to return instances of RemoteIdentity now. - (IdentityProvider.computeIdentity): Make sure this method is - implemented. - - * flumotion/common/errors.py (InsufficientPrivilegesError): New - error, indicates that the remote caller does not have the - necessary privileges. - - * flumotion/common/Makefile.am (flumotion_PYTHON): Dist. - - * flumotion/common/identity.py: New file, implements a base class - for remote identities. - -2006-07-05 Andy Wingo - - * flumotion/component/plugs/Makefile.am (component_PYTHON): Dist. - - * flumotion/component/plugs/plugs.xml: - * flumotion/component/plugs/identity.py: A sample implementation - of the IdentityProvider socket. - - * flumotion/common/config.py (FlumotionConfigXML._parseManager): - Support the IdentityProvider socket. - - * conf/Makefile.am (EXTRA_DIST): - * conf/managers/default/exampleidentityprovider.xml: Plug file to - enable the exampleidentityprovider. - - * flumotion/manager/admin.py - (AdminAvatar.perspective_loadConfiguration): Give our - remoteIdentity so that loadConfiguration instrumentation works. - - * flumotion/manager/manager.py (Vishnu._addManagerPlug): Split out - from _addManagerPlugs, instrumented for adminAction. - (Vishnu._makeBouncer): Instrument. - (Vishnu._addComponent): Instrument. - (Vishnu._updateStateFromConf): Pass along remoteIdentity to - _addComponent. - - * flumotion/manager/admin.py - (AdminAvatar.perspectiveMessageReceived): Pass our remoteIdentity, - not the avatar. - - * flumotion/component/plugs/adminaction.py - (AdminActionFileLogger.action): Take a remoteIdentity, not an - avatar. - - * flumotion/manager/main.py (_initialLoadConfig): Use the new - loadConfigurationXML. - - * flumotion/manager/base.py (ManagerAvatar.__init__) - (ManagerHeaven.createAvatar): s/keycard/remoteIdentity/. - - * flumotion/manager/manager.py (Dispatcher.createAvatarFor): - Instead of annotating the keycard and passing it around - everywhere, call a _createIdentity function to create a - manager-side object to describe the remote host. This identity - will be used for logging via the adminaction mechanism. - (Dispatcher.requestAvatar): Pass the remote host in addition to - the keycard to createAvatarFor. - (Dispatcher.__init__): Take a computeIdentity parameter, a - callable that will return an identity object. - (Vishnu.computeIdentity): New method, first tries to see if a plug - can give a suitable identity to the remote host, falling back on - the string 'user@host'. - (Vishnu.__init__): Give our computeIdentity to the dispatcher. - (Vishnu.adminAction): Take a remoteIdentity instead of the avatar. - (Vishnu._addManagerPlugs, Vishnu._updateStateFromConf) - (Vishnu._startComponents, Vishnu._loadConfiguration) - (Vishnu.loadConfigurationXML): Because we want to instrument - loadConfiguration more finely, we need to pass around the - remoteIdentity of the caller. Do so. - - * flumotion/test/test_manager_manager.py - (TestVishnu.testConfigAfterWorker) - (TestVishnu.testConfigBeforeWorker) - (TestVishnu.testLoadConfiguration) - (TestVishnu.testLoadConfiguration): loadConfigurationXML, not - loadConfiguration. - - * flumotion/manager/admin.py - (AdminAvatar.perspectiveMessageReceived): Use vishnu.adminaction. - (AdminAvatar.perspective_loadConfiguration): loadConfigurationXML, - not loadConfiguration. - - * flumotion/manager/manager.py (Vishnu.adminAction): New method to - encapsulate the adminaction plug mechanism. - (Vishnu._loadConfiguration, Vishnu.loadConfigurationXML): Split - loadConfiguration in two, one part that makes a config object, and - one that processes it. The one public interface is now - loadConfigurationXML. Reflowed all helper methods so that the - order of operations is more clear. Hopefully there are no semantic - changes here. - - * flumotion/common/fxml.py (Parser.getRoot): Fix our - filename-vs-string mess by taking only file objects as sources of - XML. As a nicety, minidom allows a filename or a file object as - the argument to parse(), so allow that as well. - - * flumotion/common/config.py (BaseConfigParser.__init__) - (BaseConfigParser.add, FlumotionConfigXML.__init__) - (AdminConfigParser.__init__, AdminConfigParser.add) - * flumotion/common/registry.py (RegistryParser.parseRegistryFile) - (RegistryParser.parseRegistry, ComponentRegistry.addFile) - (ComponentRegistry.addFromString) - * flumotion/manager/manager.py (Vishnu.loadConfiguration): - Update for fxml Parser cleanups. - - * flumotion/test/test_config.py (AdminConfig, ConfigXML): Update - tests to use file api instead of string api. - - * flumotion/manager/admin.py - (AdminAvatar.perspective_loadConfiguration): The cleanups mean - that vishnu.loadConfiguration has to take a filename or a file - object; use StringIO to make a file object. - -2006-07-10 Andy Wingo - - * flumotion/component/consumers/disker/disker.py (Disker): - * flumotion/component/consumers/disker/admin_gtk.py - (FilenameNode): Fix for uiState. - - * flumotion/component/producers/videotest/admin_gtk.py - (PatternNode.render): Fix print - - * flumotion/component/consumers/httpstreamer/admin_gtk.py - (StatisticsAdminGtkNode.haveWidgetTree): Make sure self.widget - gets set. - - * flumotion/component/base/admin_gtk.py - (BaseAdminGtkNode.haveWidgetTree): Does not return anything any - more. - (BaseAdminGtkNode.render): All nodes have the glade_file attr, - it's a question of 'is it set' or not... - - * flumotion/component/producers/looper/looper.py - * flumotion/component/producers/looper/admin_gtk.py (LooperNode) - (FileInfo): Use base glade support, and use UIState. - - * flumotion/component/effects/volume/admin_gtk.py - (VolumeAdminGtkNode.haveWidgetTree): Use base glade support. - - * flumotion/component/effects/colorbalance/admin_gtk.py - (ColorbalanceAdminGtkNode.haveWidgetTree): Use the base glade - support. Assume that the UI will be set up when setUIState is - called. - - * flumotion/component/base/admin_gtk.py (BaseAdminGtk.setUIState): - Call node.gotUIState instead of setUIState. - (BaseAdminGtkNode.gotUIState): New method, here to ensure that - setUIState is called only after the ui is properly set up. - (BaseAdminGtkNode.render): If we already got the UI state, call - setUIState. This means that all admin_gtk code should chain up to - render() at some point, if they provide a custom renderer. - - * flumotion/component/producers/videotest/videotest.py - (VideoTest): - * flumotion/component/producers/videotest/admin_gtk.py - (PatternNode): Update for uiState. - - * flumotion/component/effects/volume/volume.py (Volume): Update - for uiState. - - * flumotion/component/effects/volume/admin_gtk.py - (VolumeAdminGtkNode): Update for uiState. - -2006-07-04 Andy Wingo - - * flumotion/component/effects/colorbalance/colorbalance.py - (Colorbalance.setUIState): Add keys to the UI state here. - (Colorbalance.effect_setColorBalanceProperty): Don't do - callRemote, refactor to use the uistate instead. Also, interpret a - value of None to mean 'refresh the UI state'. - (effect_getColorBalanceProperties): Gone, we have the UI state - now. - (Colorbalance._setInitialColorBalance): Small refactoring. - - * flumotion/component/feedcomponent.py (Effect.setUIState): New - method, called by setComponent. The intention is to allow - subclasses to add keys to the ui state in this method. - - * flumotion/component/base/admin_gtk.py (BaseAdminGtk.setUIState): - Actually implement, and use it to add a listener on the state. - Chain up if you extend. - (BaseAdminGtkNode.stateRemove, BaseAdminGtkNode.stateAppend) - (BaseAdminGtkNode.stateSet, BaseAdminGtkNode.setUIState): New - methods. The node will now get the UI state and listen to it - automatically, users just have to override the statelistener - methods. - - * flumotion/component/effects/colorbalance/admin_gtk.py - (ColorbalanceAdminGtkNode): Refactor to use the uistate to - communicate instead of remote calls. Also cleaned up a bit. - -2006-07-10 Andy Wingo - - * flumotion/component/consumers/httpstreamer/http.xml: Remote - porter_name. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.do_check): When in slave mode, we need all of - the porter props. - (MultifdSinkStreamer.configure_pipeline): Always get porter props - when in slave mode. - (MultifdSinkStreamer.do_start): No more autoconfiguration in - porter slave mode. Removes the only call to componentCallRemote in - the components. - - * flumotion/manager/component.py - (ComponentAvatar.perspective_componentCallRemote): Removed. It's - too broad and has bad security implications. adminCallRemote is - next :) - -2006-07-06 Thomas Vander Stichele - - * flumotion/component/misc/porter/porterclient.py: - remove unused import - * flumotion/twisted/fdserver.py: - fix sole wrong docstring in a sea of missing docstrings - * flumotion/twisted/credentials.py: - remove a sad cut and paste and paste again mistake - -2006-07-06 Thomas Vander Stichele - - * flumotion/test/test_saltsha256.py: - fix another test - -2006-07-06 Thomas Vander Stichele - - * flumotion/test/test_credentials.py: - * flumotion/twisted/credentials.py: - make sure our zeros don't get dropped to the floor when converting - a byte string to hex values - -2006-07-06 Thomas Vander Stichele - - * flumotion/common/keycards.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/bouncers/saltsha256.py: - * flumotion/component/bouncers/saltsha256.xml: - * flumotion/test/test_credentials.py: - * flumotion/test/test_saltsha256.py: - * flumotion/twisted/checkers.py: - * flumotion/twisted/credentials.py: - add credentials, keycard, checker, and bouncer for - a salted SHA-256 password backend - -2006-07-06 Thomas Vander Stichele - - * flumotion/component/producers/audiotest/admin_gtk.py: - * flumotion/component/producers/audiotest/audiotest.glade: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/audiotest/audiotest.xml: - add a Node for audiotestsrc properties like wave (on which we - cheat for now) and frequency - -2006-07-06 Thomas Vander Stichele - - * TODO: - add some TODO notes - * flumotion/admin/gtk/client.py: - log the component view we have a warning on - * flumotion/component/base/admin_gtk.py: - fix inconsistent arg name - -2006-07-05 Thomas Vander Stichele - - * data/glade/admin.glade: - set border_width on VPane, and then remove the unneeded HBox - that was used for padding - * flumotion/admin/gtk/client.py: - create _component_view_set_widget() and use it - -2006-07-05 Thomas Vander Stichele - - * data/glade/admin.glade: - Change the window's size to not be minimum width and height, - but default. Also make it slightly bigger. - create a VPaned to separate the messages view from the rest, - so that it can be resized as needed. - Adjust padding so that the textview lines up with the notebook - and componentsview - put the label inside a component_view vbox of 1, so we can - later adjust the code to embed inside this vbox always - * flumotion/admin/gtk/parts.py: - if no selection, do not traceback, just return None - * flumotion/admin/gtk/client.py: - the widget we want is actually components_view - the view on the - left on all components - when we have a node render error, show a message - add 2006, we're living it - add other authors, they've earned it - * flumotion/admin/gtk/message.py: - adjust padding to make text view and buttons line up - -2006-07-05 Michael Smith - - * flumotion/component/feedcomponent010.py: - Assert that the pipeline is None before setting it. - This triggers when restarting a manager; without the assert we end - up crashing in multifdsink. - Need to figure out why we're setting a replacement pipeline, but - this at least makes sure we get a clear assertion failure in python - rather than nasty segfaults. - -2006-07-03 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Fix other caller of the gotPorterDetails callback to supply the port - number correctly - -2006-07-03 Thomas Vander Stichele - - * bin/flumotion-admin-text.in: - * bin/flumotion-admin.in: - * bin/flumotion-command.in: - * bin/flumotion-inspect.in: - * bin/flumotion-job.in: - * bin/flumotion-launch.in: - * bin/flumotion-manager.in: - * bin/flumotion-tester.in: - * bin/flumotion-worker.in: - * bin/flumotion.in: - correctly go up the hierarchy. Still doesn't work for kiwi. - -2006-07-03 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Add current_load to the tuple returned from getLoadData(), so that - the cluster admin can use it to determine when to stop streamers. - -2006-07-03 Andy Wingo - - * flumotion/manager/component.py - (ComponentHeaven.registerComponent): Remove some commented-out - code from 2004? - -2006-07-03 Michael Smith - - * flumotion/component/misc/porter/porter.py: - Fix docstring for previous change. - -2006-07-03 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/misc/porter/porter.py: - Return the port on which the porter is listening with the other - porter details; the streamer needs to know this so that it can - generate correct playlist files. - -2006-06-28 Thomas Vander Stichele - - * bin/flumotion-admin-text.in: - * bin/flumotion-admin.in: - * bin/flumotion-command.in: - * bin/flumotion-inspect.in: - * bin/flumotion-job.in: - * bin/flumotion-launch.in: - * bin/flumotion-manager.in: - * bin/flumotion-tester.in: - * bin/flumotion-worker.in: - check for a flumotion/.svn dir instead, so we can work with kiwi - * flumotion/admin/gtk/dialogs.py: - give the ok button a name so kiwi can work - -2006-06-23 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Import socket module to check attribute - -2006-06-23 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Disable special 2.4.3 bug workaround if the socket module has a - "has_2_4_3_patch" attribute. - -2006-06-23 Thomas Vander Stichele - - * TODO: - add a note - * flumotion/manager/manager.py: - add getBundlerBasket() which also checks if the registry - needs updating, and recreates the basket - * flumotion/manager/base.py: - use the new getBundlerBasket() so that we're always getting - the latest information - - Fixes #388 - -2006-06-21 Thomas Vander Stichele - - * flumotion/manager/base.py: - * flumotion/manager/component.py: - move perspective_authenticate() to the base class - also allow for a None bouncerName, in which case the manager will - use its bouncer to authenticate against - -2006-06-21 Thomas Vander Stichele - - * flumotion/component/misc/porter/porter.py: - * flumotion/twisted/fdserver.py: - move Passable classes as well - -2006-06-21 Thomas Vander Stichele - - * flumotion/component/misc/porter/porterclient.py: - * flumotion/twisted/fdserver.py: - Break out the FDPassingBroker, adding a second argument - to its constructor in the process so we can choose - a Connection subclass to use. - -2006-06-21 Thomas Vander Stichele - - * flumotion/common/reflectcall.py: - also format a generic Exception nicely - -2006-06-21 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.xml: - remove deprecated attributes. Prevents me from actually - using them and then wondering why nothing changed. - -2006-06-21 Thomas Vander Stichele - - * po/POTFILES.in: - remove 08 files - -2006-06-21 Michael Smith - - * flumotion/common/errors.py: - Add a general-purpose WrongStateError. - - * flumotion/component/consumers/httpstreamer/http.py: - declare a variable earlier. - -2006-06-21 Andy Wingo - - * http.py (Stats.__init__): Add some instance vars for tracking - load deltas. - (Stats.clientRemoved, Stats.clientAdded): Keep count of total - clients added and removed. - (Stats.updateLoadDeltas): Method to call when you want to update - the load deltas info. - (Stats.getLoadDeltas): New method. - (MultifdSinkStreamer._checkUpdate): Update load deltas every so - often yo. - (MultifdSinkStreamer.getLoadData): Return actual load deltas. - -2006-06-20 Thomas Vander Stichele - - * flumotion/manager/admin.py: - * flumotion/manager/base.py: - * flumotion/manager/manager.py: - doc updates - * flumotion/worker/worker.py: - a last 0.8 relic - -2006-06-20 Thomas Vander Stichele - - * flumotion/common/boot.py.in: - make the assert more helpful - * flumotion/test/common.py: - set up gobject and gst before running tests, so we are guaranteed - to have the gst-python version we actually support. - -2006-06-20 Thomas Vander Stichele - - * common/pychecker.mk: - * configure.ac: - * flumotion/common/boot.py.in: - * flumotion/common/gstreamer.py: - * flumotion/component/Makefile.am: - * flumotion/component/component.xml: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/effects/colorbalance/colorbalance.py: - * flumotion/component/effects/volume/volume.py: - * flumotion/component/encoders/Makefile.am: - * flumotion/component/encoders/jpeg/jpeg.py: - * flumotion/component/encoders/vorbis/vorbis.py: - * flumotion/component/encoders/vorbis/vorbis.xml: - * flumotion/component/encoders/vorbis/vorbis08.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent08.py: - * flumotion/component/muxers/multipart.py: - * flumotion/component/muxers/ogg.py: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/jukebox/Makefile.am: - * flumotion/component/producers/jukebox/jukebox.xml: - * flumotion/component/producers/jukebox/jukebox08.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/webcam/webcam.py: - * flumotion/test/test_common_gstreamer.py: - * flumotion/wizard/steps.py: - * flumotion/worker/checks/Makefile.am: - * flumotion/worker/checks/package.xml: - * flumotion/worker/checks/video.py: - * flumotion/worker/checks/video08.py: - remove support for GStreamer 0.8, but keep the infrastructure - for supporting multiple versions. - -2006-06-20 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Only listen on a specific interface if explicitly configured, not if - we've guessed a hostname - -2006-06-20 Michael Smith - - * flumotion/porter/Makefile.am: - * flumotion/porter/__init__.py: - * flumotion/porter/porterclient.py: - Delete this directory; all of this has been in - flumotion/component/misc/porter for ages. - -2006-06-19 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - * flumotion/common/server.py: - factor out the code that runs a PB server on TCP or SSL into - a new Server class ... - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - ... and use it. - -2006-06-19 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Implement new getLoadData() remote call, remove old getLoadDeltas() - -2006-06-18 Thomas Vander Stichele - - * flumotion.spec.in: - allow building against 0.8 or 0.10 with the right rpmbuild options - -2006-06-18 Thomas Vander Stichele - - * flumotion.spec.in: - sync with Extras spec file - -2006-06-18 Thomas Vander Stichele - - * flumotion.spec.in: - updates to spec file for new home dir and default worker/manager - -2006-06-17 Thomas Vander Stichele - - * flumotion/common/common.py: - handle the case with twisted 2.0.x where a simple class does not - have __implemented__ - -2006-06-16 Thomas Vander Stichele - - * flumotion/component/producers/audiotest/audiotest.py: - That was pretty bad - the source already had a name - -2006-06-16 Thomas Vander Stichele - - * flumotion.spec.in: - only create default manager/worker if - $sysconfig/flumotion/(manager,worker) does not exist - -2006-06-16 Thomas Vander Stichele - - * flumotion.spec.in: - create default manager config dir in post script - -2006-06-16 Thomas Vander Stichele - - * flumotion.spec.in: - require pkgconfig since we install a .pc file - -2006-06-16 Thomas Vander Stichele - - * flumotion/component/effects/volume/admin_gtk.py: - make the effect's ui query the initial volume first - * flumotion/component/base/admin_gtk.py: - effect nodes should forward title - * flumotion/component/effects/volume/volume.py: - add .getVolume(), document - * flumotion/component/producers/audiotest/Makefile.am: - * flumotion/component/producers/audiotest/admin_gtk.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/audiotest/audiotest.xml: - add a UI for the audiotest component, with a volume node - * flumotion/component/producers/soundcard/soundcard.py: - add getVolume() - * po/POTFILES.in: - add new admin_gtk.py - -2006-06-15 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - If we can't instantiate the admin ui view, show us in the admin - UI - * flumotion/manager/admin.py: - perspective_... should return a deferred always - * flumotion/job/job.py: - Since we are a proper spawn and not a fork, we can remove the - os._exit() hack and let the reactor do .stop correctly. Cleans - up a bunch of shutdown failures. - * flumotion/manager/base.py: - logging ourself as a dependency is confusing, so don't - -2006-06-15 Zaheer Abbas Merali - - * flumotion/test/test_http.py: - Fix things broken by Mike's renaming :) - -2006-06-15 Zaheer Abbas Merali - - * flumotion/test/test_common_componentui.py: - Unnest testStateListenerIntermediate and so solve the state scope - issue. - -2006-06-15 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Use variables with better existingness. - -2006-06-15 Andy Wingo - - * flumotion/test/test_common_componentui.py - (TestStateSet.testStateListener): - (TestStateSet.testSimpleStateListener): Fix references to state - in nested scope. - -2006-06-15 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Change to match changes within resources.py - -2006-06-15 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Increase our soft fd limit to a higher value if possible, and if - neccesary to meet the max clients setting. - -2006-06-15 Zaheer Abbas Merali - - * flumotion/test/test_common_componentui.py: - Port more tests away from unittest.deferredResult() etc. - 2 tests, testStateListener and testStateListenerIntermediate - do weird things when having an explicit del of a RemoteCache - inside the callback so the del's have been left commented. Read - the comments above the tests. - - Add a simpler test to expose this behaviour called - testSimpleStateListener. - -2006-06-14 Thomas Vander Stichele - - * flumotion/component/consumers/disker/disker.py: - move link_setup() code to configure_pipeline(), which is - part of the component protocol - * flumotion/component/feedcomponent010.py: - * flumotion/component/feedcomponent08.py: - remove calling link_setup() on subclasses, since all subclasses now - use configure_pipeline() instead - -2006-06-14 Michael Smith - - * flumotion/worker/main.py: - Fix more things broken by thomas's untested renaming. - -2006-06-14 Zaheer Abbas Merali - - * flumotion/test/test_common_messages.py: - * flumotion/test/test_component.py: - More tests ported to new twisted. - -2006-06-14 Michael Smith - - * flumotion/common/medium.py: - Add newly-needed import, broken by addition of runBundledFunction to - this file. - -2006-06-14 Michael Smith - - * flumotion/worker/main.py: - worker_client_brain got renamed, so use the renamed one. - -2006-06-14 Andy Wingo - - * flumotion/worker/worker.py (WorkerMedium.remote_runFunction): - Call runBundledFunction. - - * flumotion/common/medium.py (BaseMedium.runBundledFunction): - Moved back here from from flumotion.worker.worker, because fgc - uses it, and the flumotion admin should use it in the future. In - general you want a facility whereby a remote medium can run a - function from a bundled module; why make it specific? Reverts - [2776], pulling in the changes from [2778], [2805] and [2807]. - -2006-06-13 Thomas Vander Stichele - - * flumotion/manager/main.py: - When missing the .pem file, show a link to the manual - -2006-06-13 Andy Wingo - - * flumotion/common/Makefile.am (flumotion_PYTHON): Install - connection.py. - - * flumotion/common/connection.py: New file, implements a copyable - object describing a PB connection, and a function to parse a - string like user@host:7531 into this object. - - * flumotion/common/config.py (BaseConfigParser.__init__): - `filename' really is optional, mark it as such. - (BaseConfigParser.add): Factor out setting the file to this new - public method. - (AdminConfigParser.__init__): Eviscerate. Yum. - (AdminConfigParser._parse): Privatize. - (AdminConfigParser.add): Go ahead and parse here. - - * flumotion/twisted/compat.py (implementedBy): New compat wrapper - for zope.interface.implementedBy. - - * flumotion/test/test_common_connection.py (TestConnection): Test - for connection parsing. - - * flumotion/test/Makefile.am (EXTRA_DIST): - * flumotion/test/test_common_connection.py: New file, and - autotoolage. - - * flumotion/test/test_config.py (AdminConfigTest): Fix to account - for parsing at construction-time. - -2006-06-12 Andy Wingo - - * fxml.py: Add some comments. - (Parser.parseFromTable): Call handler() outside of the try block - -- we don't want to catch just any old KeyError. - - * config.py: Add a note about an XML format change we should do in - the future sometime. - (BaseConfigParser): New base class so that planet config and admin - config parsers can share code. Factored out of FlumotionConfigXML. - (FlumotionConfigXML): Use BaseConfigParser. - (AdminConfigParser): New class to parse admin config xml. - - * test_config.py (AdminConfigTest): New test for the admin config - code. - -2006-06-10 Thomas Vander Stichele - - * TODO: - * flumotion/test/test_worker_worker.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - update documentation - privatize more variables - remove some unused imports - privatize and rename WorkerBrain.setup(), and make it return - only the factory it creates - use twisted naming - -2006-06-10 Thomas Vander Stichele - - * flumotion/job/job.py: - update documentation - assigning self.component in remote_create makes it clearer where - this happens - use twisted naming - -2006-06-09 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Methods to get load deltas from the streamer (implementation - just stubbed out for now) - - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/feedcomponent08.py: - * flumotion/component/misc/porter/porter.py: - Clean up duplicate imports as pointed out by pyflakes - -2006-06-08 Zaheer Abbas Merali - - * flumotion/test/test_htpasswdcrypt.py: - Fix test to work on Twisted 2.4. - -2006-06-08 Zaheer Abbas Merali - - * flumotion/test/test_http.py: - Fix test to work on Twisted 2.4. - -2006-06-08 Thomas Vander Stichele - - * doc/random/styleguide: - add notes about API docs - * flumotion/manager/admin.py: - privatize some instance vars, and comment out some unused - methods - * flumotion/manager/component.py: - privatize some Avatar instance vars - * flumotion/admin/admin.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/manager/base.py: - * flumotion/manager/worker.py: - update documentation - -2006-06-08 Zaheer Abbas Merali - - * flumotion/test/test_keycards.py: - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_worker_worker.py: - Fix tests to work on twisted 2.4. - -2006-06-08 Zaheer Abbas Merali - - * flumotion/test/test_keycards.py: - Fix keycards test to use new interface api. - -2006-06-08 Zaheer Abbas Merali - - * flumotion/common/common.py: - Make mergeImplements work for new Interface API. - * flumotion/component/component.py: - Remove evil attribute that is never used and move to new - Interface API. - * flumotion/test/test_twisted_compat.py: - Remove test for deprecated warnings as twisted 2.4.0 has removed - the depracations. Add Interface and implements tests. - * flumotion/twisted/compat.py: - Add compatibility stuff for Interface, implements and - implementsInterface due to changes in twisted. - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/parts.py: - * flumotion/admin/text/admin_text.py: - * flumotion/admin/text/view.py: - * flumotion/admin/text/greeter.py: - * flumotion/common/interfaces.py: - * flumotion/common/keycards.py: - * flumotion/common/medium.py: - * flumotion/common/planet.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/admin_text.py: - * flumotion/component/bouncers/admin_gtk.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/feedcomponent.py: - * flumotion/job/job.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/test/test_common.py: - * flumotion/test/test_common_componentui.py: - * flumotion/test/test_common_planet.py: - * flumotion/test/test_flavors.py: - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_pb.py: - * flumotion/twisted/checkers.py: - * flumotion/twisted/credentials.py: - * flumotion/twisted/flavors.py: - * flumotion/twisted/gtk2reactor.py: - * flumotion/twisted/pb.py: - * flumotion/ui/trayicon.py: - * flumotion/wizard/worker.py: - * flumotion/worker/worker.py: - Use new API for Interface and implements. - -2006-05-26 Thomas Vander Stichele - - * flumotion/common/config.py: - handle cases where we have empty nodes, like - - * flumotion/component/bouncers/bouncer.py: - document base authenticate() method - * flumotion/component/bouncers/htpasswdcrypt.py: - do_setup should return deferred failures instead of raising - * flumotion/component/component.py: - assert this in the docs for do_setup() - * flumotion/manager/main.py: - when doing log.error, catch the SystemError we'll be getting - since it just gives a long traceback in the reactor - * flumotion/manager/manager.py: - get a referred back when setting up the bouncer - handle some failure cases better - * flumotion/twisted/portal.py: - do not allow anonymous login when bouncer is missing - earns us the enterprise 'highly securized' property - -2006-05-26 Thomas Vander Stichele - - * flumotion/common/errors.py: - * flumotion/component/consumers/httpstreamer/http.py: - add and use a ComponentStartHandledError to indicate we've - handled the error in a satisfactory way, thus the manager - needs to drop them. - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - if the admin requests to stop a sad component, we can clear the - sad state immediately after stopping, since the admin has seen it. - -2006-05-26 Andy Wingo - - * flumotion/twisted/defer.py - (defer_generator.wrapper.errback.raise_error): Catch all of the - cases in which we can't reproduce the remote error. - -2006-05-26 Thomas Vander Stichele - - * flumotion/admin/admin.py: - add reloadAdmin() method to only reload local admin code - * data/glade/admin.glade: - * flumotion/admin/gtk/client.py: - allow calling the method from the UI - -2006-05-26 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - refactor some cleanup code, so that we properly set sensitivity - of start/stop, as well as clearing our internal current_component - state - * flumotion/test/test_parts.py: - add a test for sensitivity - -2006-05-25 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - privatize and rename self._sidepane - clear the sidepane when a component goes to sleeping. - Fixes #263. - -2006-05-25 Thomas Vander Stichele - - * flumotion/manager/admin.py: - avoid exceptions.KeyError: - 'flumotion.component.plugs.adminaction.AdminAction' - -2006-05-25 Thomas Vander Stichele - - * flumotion/manager/main.py: - * flumotion/service/main.py: - * flumotion/worker/main.py: - use IOError's strerror argument more - -2006-05-25 Zaheer Abbas Merali - - * flumotion/test/test_checkers.py: - Stupid typo. - -2006-05-25 Zaheer Abbas Merali - - * flumotion/test/test_checkers.py: - Refactor to not give warnings on Twisted 2.2. - -2006-05-25 Zaheer Abbas Merali - - * flumotion/test/test_flavors.py: - Make check for twisted version smaller. - * flumotion/test/test_pb.py: - Refactor to not give warnings on Twisted 2.2. - -2006-05-24 Thomas Vander Stichele - - * flumotion/common/common.py: - allow unnamed binaries, for our programs From The Future - -2006-05-24 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Fix error in previous commit. FYA. - -2006-05-24 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Limit our max-users to 1024 - reserve_fds on python 2.4.3, due to a - bug in that version. - -2006-05-24 Andy Wingo - - * flumotion/admin/multi.py - (MultiAdminModel.addManager.disconnected_cb): Keep the managerId - -> admin mapping around a little bit longer. - -2006-05-23 Thomas Vander Stichele - - * flumotion/configure/configure.py: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - add "daemondir", which is where daemonized programs will run from - core dumps will thus end up there if requested - * flumotion/common/common.py: - add an argument to daemonize for the run directory - * flumotion/manager/main.py: - * flumotion/worker/main.py: - add a --daemonize-to option, only allowed when -D/--daemonize is - used - * flumotion/service/service.py: - use the new --daemonize-to option - Fixes #374 - -2006-05-23 Zaheer Abbas Merali - - * flumotion/test/test_flavors.py: - Fix, so the tests actually get run. - * ChangeLog: - Fix Thomas's lack of full-stop. - -2006-05-23 Thomas Vander Stichele - - * doc/redhat/flumotion: - * flumotion/service/main.py: - Make service script make sure that service.log is owned by - flumotion. Fixes #372, and some other details. - -2006-05-23 Zaheer Abbas Merali - - * flumotion/test/test_flavors.py: - Really fix the test on twisted < 2. Detect twisted version better. - Remove reactor.iterate as it is not really needed. - -2006-05-23 Zaheer Abbas Merali - - * flumotion/test/test_flavors.py: - Hacks to get make test working with twisted < 2. - -2006-05-23 Thomas Vander Stichele - - * configure.ac: - we need Python.h to build fdpass. - -2006-05-23 Zaheer Abbas Merali - - * flumotion/test/test_flavors.py: - Need to iterate reactor. - -2006-05-23 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Add some comments and a TODO. - -2006-05-23 Michael Smith - - * flumotion/test/test_pb.py: - Fix one of the tests which was failing - disconnect the client so we - don't have a dirty reactor. - -2006-05-22 Zaheer Abbas Merali - - * flumotion/test/test_manager_worker.py: - Fix failing TestHeaven.testAttached test. - -2006-05-22 Zaheer Abbas Merali - - * flumotion/component/misc/porter/porter.py: - Fix typo/use of wrong Loggable method. - -2006-05-18 Andy Wingo - - * flumotion/manager/worker.py (WorkerHeaven.workerDetached) - (WorkerHeaven.workerAttached): Manage 'workers' in the - WorkerHeavenState in addition to 'names'. - - * flumotion/common/worker.py (ManagerWorkerState) - (AdminWorkerState): New state cacheable/caches, to hold more - detailed information about workers. - (ManagerWorkerHeavenState.__init__): Add a 'workers' key to hold - ManagerWorkerState instances. - -2006-05-17 Andy Wingo - - * flumotion/worker/config.py (WorkerConfigXML.parseManager): - Support an empty 'host' parameter == 'localhost'. - (WorkerConfigXML.parseFeederports): Support having an empty set of - feeder ports, as well as comma-separated feeder ports. - -2006-05-16 Andy Wingo - - * flumotion/manager/admin.py - (AdminAvatar.perspective_deleteComponent): New remote method for - deleting components. - - * flumotion/manager/manager.py (Vishnu.deleteComponent): New - method, deletes a component from the state. - - * flumotion/common/worker.py (ProcessProtocol): - * flumotion/worker/worker.py (JobProcessProtocol): Rework to - export the guts of the process protocol in common/. - (JobProcessProtocol.processEnded): Add a kindergarten-specific - call here instead of in worker/. - -2006-05-16 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Configure interface to listen on for http streamer. - -2006-05-16 Michael Smith - - * flumotion/component/misc/porter/porter.py: - * flumotion/component/misc/porter/porter.xml: - Allow configuring network interface to listen on. - -2006-05-16 Andy Wingo - - * flumotion/manager/worker.py (PortSet): Pull in from - flumotion.common.worker. - - * flumotion/common/worker.py (PortSet): Moved here from - flumotion.worker.worker so that the FSP can use it to track ports - on a server with multiple workers. - -2006-05-15 Michael Smith - - * flumotion/component/misc/porter/porter.py: - Add deregisterPrefix method - -2006-05-15 Michael Smith - - * flumotion/component/misc/porter/porter.py: - * flumotion/component/misc/porter/porter.xml: - * flumotion/component/misc/porter/porterclient.py: - Allow prefix matching in porter (needs an efficient algorithm) - Fix some more fallout from porter move. - -2006-05-15 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/misc/porter/porter.py: - * flumotion/test/test_porter.py: - fix errors caught by pychecker - -2006-05-15 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Clean up some deferred stuff. - Import the correct module for the porter client. - -2006-05-11 Andy Wingo - - * flumotion/admin/multi.py (MultiAdminModel.addManager): Allow a - keycard argument instead of user + auth_cb. - - * flumotion/admin/admin.py (AdminClientFactory.__init__) - (AdminModel.__init__, _makeFactory, AdminModel.connectToHost) - (AdminModel.setRemoteReference): Add a bunch of optional arguments - so that we can login with a user-supplied keycard instead of - user/pass. Existing programs should still work tho. - -2006-05-11 Michael Smith - - * flumotion/twisted/http.py: - * flumotion/twisted/rtsp.py: - Import a subset of RTSP support into core, so we can use it from - multiple project modules. - -2006-05-10 Andy Wingo - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.getStreamData): Fix splice. - - * flumotion/admin/multi.py (MultiAdminModel.addManager): Return - the AdminModel we create. - -2006-05-10 Michael Smith - - * flumotion/common/netutils.py: - len(struct('P', 0)) gives the length of a pointer, from python. - I am a bad, bad, person. - -2006-05-10 Michael Smith - - * configure.ac: - * flumotion/component/Makefile.am: - * flumotion/component/misc/Makefile.am: - * flumotion/component/misc/__init__.py: - * flumotion/component/misc/porter/Makefile.am: - * flumotion/component/misc/porter/porter.xml: - * flumotion/component/misc/repeater/Makefile.am: - * flumotion/component/misc/repeater/__init__.py: - * flumotion/component/misc/repeater/repeater.py: - * flumotion/component/misc/repeater/repeater.xml: - * flumotion/component/porter/Makefile.am: - * flumotion/component/porter/__init__.py: - * flumotion/component/porter/porter.py: - * flumotion/component/porter/porter.xml: - * flumotion/component/porter/porterclient.py: - Create flumotion/component/misc directory, for misc components. - Move porter into here. - Add repeater component. - -2006-05-08 Michael Smith - - * configure.ac: - * flumotion/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/common/interfaces.py: - * flumotion/component/Makefile.am: - * flumotion/component/component.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/manager/component.py: - * flumotion/test/Makefile.am: - * flumotion/twisted/fdserver.py: - * flumotion/twisted/pb.py: - Merge porter-1 to trunk - -2006-05-08 Michael Smith - Merge trunk to porter branch (3199:3203) - -2006-05-08 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Allow setting an empty description - - * flumotion/component/consumers/httpstreamer/http.xml: - Change property name in registry as well (see previous commit) - - * flumotion/component/porter/porter.py: - Clarify comments on os.unlink() of socket, following testing. - Raise NotImplementedError for some not implemented methods. - -2006-05-04 Michael Smith - - * conf/managers/default/flows/porter.xml: - * flumotion/component/consumers/httpstreamer/http.py: - Rename porter_id in config to porter_name, as it's a component name - in the atmosphere, not an avatarId. - -2006-05-04 Michael Smith - Merge trunk to porter branch (3041:3199) - -2006-05-04 Michael Smith - - * flumotion/component/porter/porter.py: - Fix references to now-private variables. - Add exception handling around os.unlink(). - Add some debug messages. - - * flumotion/component/porter/porterclient.py: - Use fpb.ReconnectingPBClientFactory instead of pb.PBClientFactory, - so we can reconnect automatically if our porter vanishes. - - * flumotion/component/consumers/httpstreamer/http.py: - Adapt for automatic reconnection. Cleanup to not fire deferred - returned from do_start() until we've logged into porter and - registered ourselves successfully. - - Automatic reconnection doesn't work without an explicitly-configured - porter socket path. - - -2006-05-04 Michael Smith - - * flumotion/twisted/pb.py: - Add a ReconnectingPBClientFactory that just adds reconnecting to the - pb.PBClientFactory (plus the gotLoginDeferred()/startLogin APIs), - so I don't have to deal with bouncers/keycards. - -2006-05-04 Michael Smith - - * flumotion/twisted/fdserver.py: - Handle recvmesg() returning no message as CONNECTION_DONE, so that - a terminated (on the server-side) connection is properly dropped by - twisted. - -2006-05-03 Michael Smith - - * flumotion/component/component.py: - Log a message when catching exceptions in component startup - -2006-05-03 Michael Smith - - * flumotion/component/porter/porter.py: - * flumotion/test/test_porter.py: - Add some comments, remove some incorrect ones from test. - -2006-05-02 Michael Smith - - * conf/managers/default/flows/porter.xml: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - Renaming of config parameters as requested. - - * flumotion/component/porter/porter.py: - * flumotion/component/porter/porter.xml: - Rename config parameters, privitise a bunch of variables. - - * flumotion/test/test_porter.py: - Comment out a wrong line in the test that was failing. Need some - explanation of the comment here? - - * flumotion/twisted/fdserver.py: - Import socket module (used in handling exceptions) - -2006-05-02 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/porter/porter.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_porter.py: - * flumotion/twisted/fdserver.py: - Patch from Thomas: add tests, cosmetic changes. - -2006-05-02 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Implement remote_getStreamData() for http streamers. - -2006-05-02 Michael Smith - - * flumotion/common/Makefile.am: - * flumotion/common/netutils.py: - Nasty functions to guess a public IP/hostname when one hasn't been - explicitly configured. - -2006-04-24 Michael Smith - - * flumotion/component/porter/porterclient.py: - Call startReading() earlier, now that I've convinced myself it's - safe to do so. Avoids nasty errors from abusing twisted's internals. - - * flumotion/twisted/fdserver.py: - Rewrite a bit so it's closer to what twisted does, and so that it - won't potentially drop FDs under heavy load. - -2006-04-24 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Clean up some of the comments here, which were out of date, wrong, - misleading, or all of the above. - Move a couple of lines into a different order along with a comment: - we don't ever want to use an FD as a key outside the lifetime of - that file descriptor. - -2006-04-20 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - Rename/privatise porter-related variables, declare earlier. - - * flumotion/component/porter/porter.py: - * flumotion/component/porter/porterclient.py: - Doc updates, some variable name changes. - -2006-04-19 Michael Smith - - * flumotion/component/porter/porter.py: - Simplify porter Realm and Avatar some more. - -2006-05-04 Andy Wingo - - * flumotion/admin/multi.py - (MultiAdminModel.addManager.disconnected_cb, close_admin): - Refactor a bit so that close_admin is more of an action (by a user - of the admin client) and disconnected_cb is a reaction to a - disconnection. Calling close_admin will call shutdown on the - admin, so that it doesn't try to reconnect. - - * flumotion/admin/admin.py (remote_shutdown): Remote method - removed, nothing ever calls it AFAICT. - (AdminModel.shutdown): New method, call it to shut down the - current connection to the manager, and to not try to reconnect. - -2006-05-03 Andy Wingo - - * flumotion/component/plugs/adminaction.py - (AdminActionFileLogger.action): I can't convince myself that - keycards will always have usernames, so play it safe here. - - * flumotion/manager/manager.py (Vishnu._addPlugs): We can have - more than one plug of a given type, why not. Suggestion from - Magnanimous Mike! - - * flumotion/manager/manager.py (Vishnu.loadConfiguration): Add a - comment about the meaning of workerId == None. - - * flumotion/common/planet.py (ManagerFlowState.__init__): Comment - the method's args. - - * flumotion/common/config.py (FlumotionConfigXML._parseManager): - Make sure that the plugs dict has an entry for every socket, even - if no section is present. - -2006-04-27 Andy Wingo - - * flumotion/common/log.py - (_handle, errorObject, warningObject, infoObject, debugObject) - (logObject): Only splice if there are arguments to splice in. - Should ensure that no existing case fails. - - * flumotion/common/log.py (errorObject, warningObject) - (infoObject, debugObject, logObject): Interpret additional - arguments after the first string as parameters to be spliced into - the first as a format string. - (error, warning, info, debug, log): Adapt to allow format strings. - (Loggable.error, Loggable.warning, Loggable.info, Loggable.debug) - (Loggable.log, Loggable.warningFailure, Loggable.logFunction): - Adapt to allow format strings. - - * flumotion/test/test_log.py (LogFunctionTester.logFunction): - Update so that the logFunction can take more arguments. - (TestLog.testFormatStrings): Add new test for format strings + - values in the logger. - -2006-04-26 Andy Wingo - - * flumotion/wizard/worker.py (WorkerListStore.__init__): Use the - new set=None idiom from flavors to simplify our code. - - * flumotion/admin/multi.py (WatchedDict): New class, similar to - the WatchedList. Note that this infrastructure was only being used - by FGC, which hasn't been ported over from houston to multi yet. - (MultiAdminModel.admins): Changed from a list to a hash table of - managerId -> admin. - (MultiAdminModel.addManager.connected_cb, close_admin): Adapt for - changes. - - * flumotion/admin/admin.py (AdminModel.__init__) - (AdminModel.connectToHost, adminInfoStr): Create a managerId - string for the manager, whose intent it is to uniquely identify - the view that we have on the manager at the other end (read: the - manager itself, plus the permissions we have for our user). This - happened to be what adminInfoStr was before. - - * flumotion/twisted/flavors.py (StateRemoteCache.addListener): - Make twice as useful to use and ten times more painful to - implement by adding support for None values to mean that the call - should be ignored. Useful suggestions for improving this - implementation would be good. - (StateRemoteCache.observe_set, StateRemoteCache.observe_append) - (StateRemoteCache.observe_remove): Update to only call the - set/append/remove if the function is there (non-false). - - * flumotion/test/test_flavors.py - (TestFullListener.testStateAppendRemoveListener): Test positional - arguments here as well as the keyword arguments above. - - * flumotion/test/test_common_planet.py (ListenerTest.setUp): - Properly ignore those parts of IStateListener that we don't - implement. - -2006-04-25 Andy Wingo - - * flumotion/wizard/worker.py (WorkerListStore.__init__): Hm, it - seems we didn't actually implement IStateListener before. - - * flumotion/twisted/flavors.py (StateRemoteCache): Make the set of - listeners a dict rather than a list. - (StateRemoteCache.addListener): Add keyword arguments for the - state set, append, and remove functions, so that listeners can - specify which functions to use if they want. The functions are - stored in the dict of listeners. - (StateRemoteCache.observe_set, StateRemoteCache.observe_append) - (StateRemoteCache.observe_remove): Update for the changes of the - representation of the listener set. - - * flumotion/test/test_flavors.py (TestFullListener): Add test for - the custom add/set/remove functions. - -2006-04-25 Andy Wingo - - * flumotion/test/test_flavors.py: Refactored so as not to use - unittest.deferredResult, avoids lots of nasty warnings with - twisted 2.2. - - * flumotion/manager/manager.py (Vishnu.setConnectionInfo): Change - using_ssl to use_ssl. - -2006-04-24 Andy Wingo - - * flumotion/component/plugs/Makefile.am (component_PYTHON): Fix - adminaction file name. - - * flumotion/test/test_config.py - (TestConfig.testParseManagerWithPlugs): Update check for new - manager plug type. - - * flumotion/common/config.py (FlumotionConfigXML._parseManager): - Add the lifecycle socket to the list of sockets supported by the - manager. - - * flumotion/component/plugs/plugs.xml: Declare the new plugs and - bundles here. - - * flumotion/component/plugs/lifecycle.py: New file, defines a - socket for plugs that are started and stopped with the manager. - (ManagerLifecyclePrinter): Sample implementation of the - MangerLifecycle socket, printing things to the console. - - * flumotion/component/plugs/Makefile.am (component_PYTHON): - * conf/Makefile.am (EXTRA_DIST): Autotoolage. - - * conf/managers/default/managerlifecycleprinter.xml: - * conf/managers/default/adminactionfilelogger.xml: Add example - configs for the various manager plugs. - - * flumotion/manager/manager.py (Vishnu.connectionInfo): New public - instance variable, contains a dict with the host, port, and - using_ssl of the connection the manager runs on. - (Vishnu.setConnectionInfo): A setter for connectionInfo. - - * flumotion/manager/main.py (_startTCP, _startSSL): Let the Vishnu - instance know info about what connection it's serving on. - -2006-04-20 Andy Wingo - - * common/setup.m4: Convert to use the AC_CONFIG_* infrastructure, - so that we can regenerate the output afterr a make clean. Involves - some exciting eval hackery, but it seems to be par for the course. - -2006-04-11 Andy Wingo - - * flumotion/extern/SQuaLe.py: Remove, it's in squale CVS now. - * flumotion/extern/Makefile.am (flumotion_PYTHON): Fix for SQuaLe - move. - - * env.in (PACKAGES): Add flumotion to the PACKAGES env var. - - * flumotion/component/plugs/base.py (PlugDatabaseMixin): - * flumotion/component/plugs/adminaction.py (DatabaseAdminActionLogger): - * flumotion/component/plugs/loggers.py (DatabaseLogger): Move out - to the fsp module. - - * flumotion/component/plugs/plugs.xml: Update for move. - -2006-04-03 Andy Wingo - - * flumotion/manager/admin.py - (AdminAvatar.perspectiveMessageReceived): New method overriding - the one from pb.Avatar, runs admin action plugs before calling a - perspective_* method. - -2006-04-03 Andy Wingo - - * flumotion/component/plugs/adminaction.py: New file. Defines a - manager plug, AdminAction, that should get run when an admin - performs a remote call on the manager. Defines two implementations - of this plug, one that logs the call to a file, and another that - logs it to a database. - - * flumotion/component/plugs/plugs.xml: Add adminaction bundle and - databaseadminlogger to registry. - - * flumotion/component/plugs/Makefile.am (component_PYTHON): Add - adminactions.py. - -2006-04-03 Andy Wingo - - * flumotion/manager/manager.py (Vishnu.__init__): Keep tabs on the - plugs as self.plugs = socket->list of plugs, like components. - (Vishnu._addPlugs): New function, instantiates plugs for the - manager. - (Vishnu.loadConfiguration): Call _addPlugs. - -2006-04-03 Andy Wingo - - * flumotion/test/test_manager_manager.py - (TestComponentMapper.testOneComponent) - (TestComponentHeaven.testGetComponent) - (TestComponentHeaven.testHasComponent) - (TestComponentHeaven.testCreateAvatar) - (TestVishnu._loginWorker): - * flumotion/test/test_manager_admin.py - (TestAdminAvatar.testHasRemoteReference): - * flumotion/test/test_manager_worker.py (TestHeaven.testAdd) - (TestHeaven.testAttached): Adapt for passing the keycard around - when creating avatars. - - * flumotion/test/test_pb.py (FakeTRealm): Renamed from FakeRealm - to indicate it presents a twisted-style interface. - (FakeFRealm): New fake realm, deriving from FakeTRealm, but taking - a keycard argument as well. For passing to - flumotion.twisted.portal.*Portal. - (FakePortalWrapperPlaintext.__init__) - (FakePortalWrapperCrypt.__init__): Check the twisted-style realm. - (Test_BouncerWrapper.setUp, Test_FPortalRoot.setUp) - (Test_FPBClientFactory.setUp): Check the flumotion-style realm. - - * flumotion/test/test_config.py - (TestConfig.testParseManagerWithBogusPlug) - (TestConfig.testParseManagerWithPlugs): New tests. - (regchunk): Add test manager plug to registry chunk. - - * flumotion/common/config.py (ConfigEntryManager.__init__): Keep - track of plugs defined for the manager. - (ConfigEntryAtmosphere.__len__): New function, so that code can - just do "if conf.atmosphere" to test if the atmosphere has - components. - (FlumotionConfigXML.__init__): All planets have atmospheres now. - (FlumotionConfigXML.parse): Just update the list of components for - the atmosphere instead of replacing it. Loading a config snippet - adds to the existing configuration, it doesn't replace it. - (FlumotionConfigXML._parseAtmosphere): Return a dict of components - in the atmosphere instead of an atmosphere object. - (FlumotionConfigXML._parseManager): Parse plugs in a - section as well. - -2006-04-03 Andy Wingo - - * flumotion/component/plugs/base.py (ManagerPlug): Add base class - for plugs living in the manager. - -2006-04-03 Andy Wingo - - * flumotion/component/plugs/loggers.py (Logger): Descend from - ComponentPlug. - (DatabaseLogger): Use the database mixin. Adds fault tolerance - while reducing code, yay. - - * flumotion/component/plugs/Makefile.am (component_PYTHON): Add - base.py. - - * flumotion/component/plugs/plugs.xml: Add base.py to the - base-plugs bundle. - - * flumotion/component/plugs/base.py: New file, factors out some - base interfaces for plugs. Also includes a mixin for plugs that - access databases. - -2006-04-03 Andy Wingo - - * flumotion/manager/manager.py (Vishnu._makeBouncer) - (Vishnu._updateState, Vishnu._updateFlowDependencies): New - functions, factored out of loadConfiguration. Use reflectcall to - avoid importing flumotion.job. - (Vishnu.loadConfiguration): Simplify, and update for - _workerCreateComponents changes. - (Vishnu._addComponent): Debugging. - (Vishnu.setBouncer): Warn if the manager already has a bouncer, - but set anyway. - (Vishnu.componentCreate, Vishnu.workerAttached): Simplify, and - update for _workerCreateComponents changes. - (Vishnu._workerCreateComponents): Take the workerId as the arg, - not the avatar. Interpret None to mean any worker. - -2006-04-03 Andy Wingo - - * flumotion/job/job.py: createComponent moved to - common.reflectcall, update accordingly. - - * flumotion/common/Makefile.am (flumotion_PYTHON): Add - reflectcall.py. - - * flumotion/common/reflectcall.py: New file. - (reflectCallCatching): New function, factored out of - flumotion.job.job.createComponent. Uses reflect to load a module, - accesses a function in the module, and calls it, making sure all - errors raised are of the same kind. - (createComponent): Moved here from flumotion.job.job. Refactored - to use reflectCallCatching. - -2006-04-03 Andy Wingo - - * flumotion/common/planet.py (ManagerFlowState.__init__): - Interpret kwargs as prop-value pairs to set. - -2006-04-03 Andy Wingo - - * flumotion/twisted/portal.py - (BouncerPortal._authenticateCallback): Add keycard to the - arguments passed to Dispatcher.requestAvatar. - - * flumotion/manager/manager.py (Dispatcher.requestAvatar): Take - keycard argument, passing it along to createAvatarFor... - (Dispatcher.createAvatarFor): Take keycard argument, passing it - along to the heaven's createAvatar... - - * flumotion/manager/base.py (ManagerHeaven.createAvatar): Take - keycard argument, passing it along to the avatar constructor... - (ManagerAvatar.__init__): Take keycard argument, setting it as - self.keycard. Booya. - - * flumotion/manager/component.py (ComponentAvatar.__init__): Don't - interpret constructor arguments, just pass them on. Also logName - is set by the base class. - -2006-04-25 Zaheer Abbas Merali - - * flumotion/component/effects/colorbalance/colorbalance.py: - Port colorbalance to work with 0.10 of GStreamer - * flumotion/component/producers/bttv/bttv.py: - Add colorbalance effect for 0.10 - * flumotion/component/producers/webcam/webcam.py: - Add colorbalance effect for 0.10 - -2006-04-23 Thomas Vander Stichele - - * po/ca.po: - * po/es.po: - * po/fr.po: - * po/nl.po: - * po/no.po: - updates - Translation by: Pablo Lorenzzoni - * po/pt_BR.po: - adding Portuguese/Brazilian translation - -2006-04-20 Andy Wingo - - * common/setup.m4: Convert to use the AC_CONFIG_* infrastructure, - so that we can regenerate the output afterr a make clean. Involves - some exciting eval hackery, but it seems to be par for the course. - -2006-04-18 Andy Wingo - - * flumotion/admin/Makefile.am (component_PYTHON): Add multi.py. - - * flumotion/admin/multi.py: New file, moved here from - flumotion-ground-control (where it was known as houston). Its - purpose is to be middleware(tm) between a client and many manager - connections. - - * flumotion/test/Makefile.am (EXTRA_DIST): Dist the new test - suite. - - * flumotion/test/test_admin_multi.py: New test suite. - (MultiAdminTest.testConstructor): New test, just tries to - instantiate MultiAdminModel. - -2006-04-18 Michael Smith - - * flumotion/worker/worker.py: - Fix bug #359: trigger deferredCreateFailed in ALL failure cases, not - just when catching ComponentCreateFailed - - * flumotion/job/job.py: - Add a hack to make it more likely that the worker will get a chance - to handle ComponentCreateFailed (and thus get a nicer error message - that we can show in the admin) - -2006-04-18 Michael Smith - - * flumotion/admin/gtk/client.py: - Add some basic useful local variables to the debug shell. - Print out a message when starting the shell explaining what's - available. - -2006-04-18 Michael Smith - - * flumotion/admin/gtk/client.py: - flumotion.common.code has been moved to flumotion.extern.code, - import this instead. - -2006-04-14 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/text/view.py: - * flumotion/component/base/admin_gtk.py: - BaseAdminGtk.setUIState() and the admin's ui-state-changed signal - have been unused since 0.1.4 - -2006-04-14 Thomas Vander Stichele - - * common/pychecker.mk: - - use $(thisdir) correctly when we check for _build - - rename FLU_PATH to OUR_PATH, because these macros are shared - with other modules - - if GST_08_SUPPORTED and GST_010_SUPPORTED are not set from - configure, still work without errors - - x10 -> x010 for consistency - -2006-04-13 Thomas Vander Stichele - - * flumotion/worker/worker.py: - create a Message when a job process dies with a signal, so - the admin can see what went wrong. - Also, more signals than SEGV generate core dumps. - * flumotion/manager/worker.py: - add perspective_componentAddMessage() - * flumotion/manager/manager.py: - add componentAddMessage() - make sure sad moods persist until actively stopped. - * flumotion/manager/component.py: - make sure sad moods persist until actively stopped. - * po/POTFILES.in: - mark worker.py for translations - * po/ca.po: - * po/es.po: - * po/fr.po: - * po/nl.po: - * po/no.po: - update - -2006-04-13 Thomas Vander Stichele - - * doc/random/component-initialization-protocol: - update protocol to reflect decisions about do_check - * flumotion/common/errors.py: - add a ComponentSetupError - * flumotion/component/component.py: - - make remote_setup() properly handle failures during component - setup, while still give the medium's setup the chance to failure. - - if do_check() generates an Error message on the state, turn sad - and don't proceed to do_setup() - - addMessage(): turn sad if an ERROR is added - * flumotion/manager/component.py: - properly trap a ComponentSetupError seperately during setup - * flumotion/component/producers/checks.py: - - share translations in messages, and make them uniform - * flumotion/component/producers/looper/looper.py: - - declare bus, avoids tracebacks when setup went wrong - * flumotion/component/producers/looper/looper.xml: - - depend on producer-checks bundle, since it's being used - -2006-04-10 Andy Wingo - - * flumotion/common/fxml.py (Parser.parseAttributes) - (Parser.parseFromTable, Parser.checkAttributes): Doc. - - * flumotion/common/fxml.py (Parser.parseFromTable): Remove - 'disallowed' argument -- callers should be providing the proper - parse tables always. - - * flumotion/common/registry.py (RegistryParser._parseRoot): - Actually do something with the disallowed argument. - - * flumotion/manager/base.py - (ManagerAvatar.perspective_getBundleSums): Fix debugging if no - bundles are found, and error if bundleName is a list. - -2006-04-06 Andy Wingo - - * flumotion/component/producers/checks.py (get_gst_version): Fix - check for older pygst. - -2006-04-06 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - Make sure cursor does not get set to the X dfeault but to the - cursor of the parent window and make eventbox not have a visible - window - -2006-04-06 Zaheer Abbas Merali - - * flumotion/component/producers/firewire/firewire.py: - Check key of array properly - -2006-04-05 Thomas Vander Stichele - - * flumotion/worker/checks/video010.py: - * flumotion/worker/checks/video08.py: - Distinguish between "can't open firewire device" and - "permissions are wrong", if 1394 plugin is new enough. - Fixes #350. - -2006-04-05 Andy Wingo - - * flumotion/component/producers/firewire/firewire.py - (Firewire.do_check): - * flumotion/component/producers/soundcard/soundcard.py - (Soundcard.do_check): Update for check function name changes. - - * flumotion/component/producers/looper/looper.py: Rewrite to do - the first segment seek from blocked pads instead of via an - asynchronous message to the bus. Fixes some race conditions. - Requires new GStreamer core and gst-python. - - * flumotion/component/producers/checks.py - (checkTicket347, checkTicket348): Rename from checkPyGTK and - checkPyGST, because they test for specific bugs. See #347 and - #348. - (checkTicket349): New check, fixes #349 along with updates to - looper. - - * flumotion/component/feedcomponent010.py - (FeedComponent.bus_watch_func): When we get an error message, post - it at the warning level. - - * flumotion/component/component.py - (BaseComponent.adminCallRemote): More debugging. - -2006-04-05 Michael Smith - - * flumotion/component/producers/checks.py: - Check for pygtk 2.8.6 instead of 2.8.5 - -2006-04-04 Andy Wingo - - * flumotion/component/component.py - (BaseComponent.adminCallRemote): Add some docs. Ignore the call if - we don't have a manager -- adminCallRemote calls are only for - notification anyway. - -2006-04-03 Thomas Vander Stichele - - * flumotion/manager/main.py: - * flumotion/worker/worker.py: - fix for #345 - only trigger a create failed if the avatarId still - has a pending create deferred. - -2006-03-27 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - Make mouseovers over stream url link work, also add right click - context menu for stream url link - -2006-03-27 Andy Wingo - - * flumotion/extern/SQuaLe.py (Cursor._set_result): Only get the - result's data if it was an operation that returns a result set. - This fixes non-select calls like INSERT operations. - - * flumotion/component/plugs/loggers.py - (DatabaseLogger.translators): Make the 'database' plug property - map to 'connection_name' for SQuaLe. - - * flumotion/extern/Makefile.am (flumotion_PYTHON): Add SQuaLe to - the makefile. - - * flumotion/extern/SQuaLe.py: New file, implements a PEP-249 - interface for SQuaLe (squale.sourceforge.net). - -2006-03-24 Andy Wingo - - * flumotion/component/component.py (BaseComponent.setup.setup_plugs) - (BaseComponent.start): Properly handle errors when loading and - starting plugs. - - * flumotion/component/plugs/loggers.py (DatabaseLogger.stop): Make - able to be called more than once. - - * flumotion/launch/main.py (start_components): Rework so as not to - be a defer generator; defer generators are not appropriate if an - exception can be thrown immediately. - (main): Rework so as not to run the reactor if there is an error. - (DeferredDelay): Pass through the value in the callback. - (ComponentWrapper.stop): New method, stops the components if there - is an error. Prevents a segfault when exiting due to a startup - error. - -2006-03-23 Michael Smith - - * Makefile.am: - * configure.ac: - * flumotion/Makefile.am: - Add new porter directory Makefile, add to pychecker list - - * flumotion/porter/Makefile.am: - * flumotion/porter/__init__.py: - * flumotion/porter/porterclient.py: - Add porter client: all the code needed to attach to a porter server, - hooking a (specified) factory to incoming FDs, and adding them to - the reactor - - * flumotion/extern/fdpass/Makefile.am: - * flumotion/extern/fdpass/__init__.py - * flumotion/extern/fdpass/fdpass.c: (writefds): - Add package init. - Change return value from fdpass.writefds() - - * flumotion/test/common.py: - Hack from thomas to make distcheck pass due to fdpass being built - but the package init living elsewhere. - - * flumotion/twisted/Makefile.am: - * flumotion/twisted/fdserver.py: - Add fdserver: twisted methods for connecting to unix FDs and - receiving appropriate fd-passing messages. - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - Add optional (untested, since we don't have a porter yet) - configuration to use the httpstreamer as a master (normal) or slave - (slaved to a porter). Defaults to master, which works as before. - -2006-03-23 Andy Wingo - - * flumotion/component/component.py - (BaseComponent.start, BaseComponent.setup.setup_plugs): Handle - errors when making plugs. - - * flumotion/common/registry.py (RegistryEntryComponent.__init__) - (RegistryParser._parseSocket): Make sockets just instances of str, - fixes jellying issue. - - * flumotion/common/config.py (FlumotionConfigXML._parsePlug) - (FlumotionConfigXML._parsePlugs): Correct comments. - - * flumotion/test/test_config.py (TestConfig.testParseNoPlugs) - (TestConfig.testParsePlugs): Add a couple tests for the config - parser wrt plugs. - - * flumotion/wizard/wizard.py (Wizard.on_realize): Get the style - from the eventbox, not the window. Fixes two-tone wizard border in - ubuntu dapper. Doesn't fix the orange color but that is an - upstream bug. This one should probably be fixed in 0.2 as well. - - * flumotion/component/component.py - (BaseComponent.setup.setup_plugs.load_bundles): Only warn if we - are actually going to be loading up plugs. This will still warn if - bouncers have plugs -- will have to look at that later. - - * flumotion/component/plugs/loggers.py (DatabaseLogger): Add - example schema. - (DatabaseLogger.start): Change default table to be named "access". - Parse out feed-name from the properties. - (DatabaseLogger.sql_template) - (DatabaseLogger.event_http_session_completed): Insert the - feed_name as well. - - * flumotion/component/plugs/plugs.xml: Add feed-name property. - -2006-03-23 Michael Smith - - * doc/random/valgrind: - Add a brief note on valgrinding jobs. - * flumotion/worker/worker.py: - Commit patch from #332 to allow valgrinding specified jobs. - -2006-03-23 Andy Wingo - - * flumotion/component/consumers/httpstreamer/resources.py - (HTTPStreamingResource.__init__): Don't start loggers here, the - core does it for us. - - * flumotion/component/plugs/plugs.xml: Declare databaselogger and - its properties. - - * flumotion/component/plugs/loggers.py (DatabaseLogger): New class - to log directly to a database that supports the python database - API version 2.0. - -2006-03-22 Thomas Vander Stichele - - * configure.ac: - bump the minor version number, this is the crazy development - branch - -2006-03-22 Thomas Vander Stichele - - * configure.ac: - * pkgconfig/flumotion-uninstalled.pc.in: - * pkgconfig/flumotion.pc.in: - build the Requires: line for the .pc file and use it - * common/pychecker.mk: - * flumotion/common/boot.py.in: - use _010, not _10, we don't want people to think GStreamer 1.0 is out - -2006-03-22 Andy Wingo - - * flumotion/launch/main.py: Refactor a bit to support adding plugs - to components via "/plugtype,plugprop=val,otherprop=val". Also fix - a couple of bugs caught by pychecker. - - * flumotion/component/plugs/loggers.py (ApacheLogger.start): - Properly drill through the configuration structure. - - * flumotion/component/component.py - (BaseComponent.setup.setup_plugs.load_bundles): Succeed even if we - have no medium, albeit with a warning -- this is the case when - using flumotion-launch, for example. - - * flumotion/launch/main.py (sort_components): Use - dag.topological_sort. - - * flumotion/test/test_dag.py (TestDAG.testSort): Add test for - topological_sort(). - - * flumotion/common/dag.py (topological_sort): New function to - provide functional interface to DAG code. - - * flumotion/component/component.py (BaseComponent.start.start_plugs) - (BaseComponent.stop.stop_plugs): Fix errors caught by pychecker. - - * flumotion/test/test.xml: Add a logger back to the - test_manager_manager test case. - - * flumotion/common/config.py (FlumotionConfigXML._parseComponent) - (FlumotionConfigXML._parsePlug, FlumotionConfigXML._parsePlugs): - Fixes for parsing sections in config XML files. - - * flumotion/component/component.py (BaseComponent.start) - (BaseComponent.stop): Start and stop plugs as appropriate. - - * doc/random/component-initialization-protocol - (BaseComponent.start): start() on a component should start() - plugs. - (BaseComponent.stop): stop() on a component should stop() plugs. - - * flumotion/component/plugs/plugs.xml: Add the adminlogger via the - verbose "requeststringtoadminlogger" moniker. - - * flumotion/component/plugs/loggers.py: - (RequestStringToAdminLogger, ApacheLogger): Actually implement. - (Logger): Make start and stop take the component as an argument. - Allows e.g. the adminlogger to get the medium. - -2006-03-22 Zaheer Abbas Merali - - * flumotion/component/producers/firewire/firewire.py: - No point displaying firewire bus reset message - -2006-03-21 Andy Wingo - - * flumotion/component/plugs/loggers.py (ApacheLogger.start): Valid - syntax, but still not implemented. - - * flumotion/common/registry.py (RegistryParser._parseEntries.addEntry) - (RegistryParser._parsePlug): Raise the right error. - - * flumotion/test/test.xml: - * flumotion/test/test_component.py: - * flumotion/test/test_htpasswdcrypt.py: - * flumotion/test/test_http.py: - * flumotion/test/test_pb.py: No more logfile property in - http-streamer, and the manual config dicts needed updating for - 'plugs'. - -2006-03-21 Andy Wingo - - * flumotion/extern/fdpass/Makefile.am (common_cflags): Compile - with -fPIC. (How many more of this kind of commit will we have?) - - * flumotion/component/consumers/httpstreamer/http.py (HTTPMedium): - Remove code to do admin calls with logging information, that - should be implemented via a logger. - (HTTPMedium.remote_rotateLog): Call rotateLogs, not - rotateLogfile. - (MultifdSinkStreamer): No more log-message signal, or - logfile-related code. - - * flumotion/component/consumers/httpstreamer/resources.py - (HTTPStreamingResource.__init__): Remove all logfile-specific - code, just use the loggers set from the plugs. - (HTTPStreamingResource.rotateLogs): Rename from rotateLogfiles, - will call rotate() on all loggers. - (HTTPStreamingResource.logWrite): Instead of generating a string, - pass a dict with all necessary information to all loggers via - event('http_session_completed'). - - * flumotion/launch/main.py (ComponentWrapper.__init__): Set up - config['plugs'] as the components expect it. - - * flumotion/component/component.py (BaseComponent.setup): Setup - the plugs before running do_check or do_setup. - - * doc/random/component-initialization-protocol - (BaseComponent.setup): Update to note the need to do what is - necessary to load up plugs. - - * flumotion/common/config.py (FlumotionConfigXML): Inherit from - fxml.Parser so we get parseFromTable, and parseAttributes. However - the parser isn't fully converted yet. - (FlumotionConfigXML.__init__): Use fxml.Parser's getRoot. - (FlumotionConfigXML._parseComponent): Call _parsePlugs to set - config['plugs']. - (FlumotionConfigXML._get_dict_value): Removed. - (FlumotionConfigXML._parsePlugs, FlumotionConfigXML._parsePlug): - New exciting parser that parses sections from - blocks. - - * flumotion/component/consumers/httpstreamer/http.xml: Declare - that http-streamer supports the logger socket. - - * flumotion/component/plugs/loggers.py: - * flumotion/component/plugs/__init__.py: - * flumotion/component/plugs/plugs.xml: - * flumotion/component/plugs/Makefile.am: New files, - implementations of loggers. Plugs for the logger socket, if you - will. - - * configure.ac: - * flumotion/component/Makefile.am: Update for new files. - - * flumotion/launch/inspect.py (main): Add support for showing - plugs and sockets. - - * flumotion/common/registry.py (RegistryEntryComponent.__init__): - Add an initarg for a component to declare what sockets it - supports. Tell pychecker that's OK. - (RegistryEntryComponent.getSockets): New accessor. - (RegistryEntryPlug): New class, represents a entry in the - registry. - (RegistryEntrySocket): New class that is really just a string - putting on airs. - (RegistryParser.getPlugs, RegistryParser.getPlug) - (RegistryParser._parseSocket, RegistryParser._parseSockets) - (RegistryParser._parsePlugEntry, RegistryParser._parsePlug) - (RegistryParser._parsePlugs): New parser accessors and parse - routines, parsing standalone sections and sections - within s. - (ComponentRegistry.getPlug, ComponentRegistry.hasPlug) - (ComponentRegistry.getPlugs): New accessors for the registry. - (ComponentRegistry.dump): Write out and sections - as well. - - * flumotion/test/test_registry.py: - (TestRegistry.testDump): Check that entries are correctly - parsed and serialized. - (TestComponentEntry.setUp): Update for all-singing 13-argument - ComponentEntry constructor. - (TestComponentEntry.testThings): Add test for gstSockets() - implementation. - - * flumotion/test/test_config.py (regchunk): Fix registry XML - snippet for more pedantic registry parser. - - * flumotion/test/test_registry.py: Update to look for some things - in fxml instead of in registry. - (TestRegistry.testParseComponents): Components don't have "name" - attributes, and haven't for a long time. Fix XML, and remove tests - relating to the time when they did. - (TestRegistry.testParseComponentProperties): Fix XML. - (TestRegistry.testParseComponentPropertiesErrors): Fix XML. Check - the proper errors. - (TestRegistry.testClean, TestRegistry.testComponentTypeError) - (TestRegistry.testAddXmlParseError): Fix XML, check the right - errors. - - * flumotion/common/registry.py (RegistryParser): - Make the parser descend from fxml.Parser, and - refactor most of the parser to use Parser.parseFromTable and - parseAttributes. Result is that the registry is much more - self-validating now, and the code is a bit cleaner. - - * flumotion/common/fxml.py: New file, pulled out of registry.py. - Common routines for parsing XML files. - - * flumotion/common/Makefile.am (flumotion_PYTHON): Add fxml.py. - - * flumotion/manager/base.py - (ManagerAvatar.perspective_getBundleSums): Change so that any of - the arguments can be lists of strings in addition to simple - strings. Allows the client to get the most bang out of the network - buck. Also cleans up a bit. - - * flumotion/common/bundleclient.py (BundleLoader.getBundles): Note - that the arguments can be scalar strings or lists of strings. - - * common/trial.mk (trial): Run trial without -R argument; seems to - make twisted 2.2 happy. - - * flumotion/component/consumers/httpstreamer/http.xml: Remove - 'gst-property' property from http-streamer; it's not implemented, - and would cause a bug if you set it. Also it's the only property - out there of type 'xml'. - - * flumotion/test/test_config.py (TestConfig.testParseProperties) - (regchunk): No more tests for the XML type. - - * flumotion/common/config.py (FlumotionConfigXML._get_dict_value): - Removed. - (FlumotionConfigXML._parseProperties): No more 'xml' type. - - * flumotion/launch/main.py (topological_sort): New function, - pulled in from Ofer Faigon via - http://www.bitformation.com/art/python_toposort.html. - (resolve_links): Don't print out links, we know that. - (sort_components): Use topological_sort to sort the components so - that we start them in order. - (ComponentWrapper.__init__): Set config['clock-master'] as well. - (ComponentWrapper.instantiate): Also setup() the component. - (ComponentWrapper.provideMasterClock): New method, proxies to the - component. - (ComponentWrapper.start): Just start() here, setup() was done in - instantiate(). - (DeferredDelay): New function, makes a deferred that will fire in - the future. - (start_components): Factored out of main() to be a - defer_generator, because we have to deal with deferreds in the - component protocol. Also takes care of setting up clocking in the - pipelines. Starts components in order. - - * flumotion/worker/checks/video010.py (do_element_check): Doc. - - * flumotion/component/component.py (BaseComponent.start): Assert - that the do_start implementation returns a deferred, because we - just pass along its return value. - (BaseComponent._heartbeat): Make sure we don't get nastiness when - calling heartbeat, but we're not connected. - - * flumotion/common/medium.py (BaseMedium.callRemote): Return a - deferred in all cases. See #159. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.configure_pipeline): Refactoring to do most - things in the configure_pipeline method. Still nasty though. - (MultifdSinkStreamer.link_setup): No longer overridden. - (MultifdSinkStreamer.do_start): Implement do_start instead of - start(). This probably needs more support from the base classes. - Pass along the superclass's do_start return value, or a defer.fail - if the port was unavailable. - - * flumotion/common/config.py (FlumotionConfigXML._parseComponent): - Wrote some notes -- maybe we shouldn't be passing so much to the - component. - (FlumotionConfigXML._parseSources): Doc. - -2006-03-21 Michael Smith - - * flumotion/extern/fdpass/Makefile.am: - Simplify building/running this by not using libtool - -2006-03-21 Michael Smith - - * configure.ac: - * flumotion/extern/Makefile.am: - * flumotion/extern/fdpass/Makefile.am: - * flumotion/extern/fdpass/fdpass.c: - Add extension module for file descriptor passing in python. - -2006-03-17 Zaheer Abbas Merali - - * flumotion/test/test_manager_manager.py: - twisted 2.2.0 TestCase does not have a runReactor method - and according to twisted changeset 15556 it was always - deprecated - -2006-03-17 Zaheer Abbas Merali - - * flumotion/component/producers/firewire/firewire.py: - Fix stupid syntax error and make pychecker happy - -2006-03-17 Zaheer Abbas Merali - - * flumotion/admin/gtk/client.py: - Make removal of messages from gtk admin actually happen! - * flumotion/component/producers/firewire/firewire.py: - Use the new data provided from the firewire component so that - connection and disconnection is detected, fixes #336 - -2006-03-16 Michael Smith - - * flumotion/component/encoders/vorbis/vorbis010.py: - Import utils method we're using. - -2006-03-15 Michael Smith - - * flumotion/component/encoders/vorbis/vorbis010.py: - * flumotion/component/encoders/vorbis/vorbisutils.py: - If the incoming sample rate is outside the range of permissible - rates, pick a sensible 'standard' rate rather than simply clamping. - -2006-03-15 Michael Smith - - * flumotion/component/encoders/vorbis/vorbis010.py: - Rename configure to configure_pipeline, so that it'll get called. - -2006-03-14 Michael Smith - - * flumotion/component/producers/firewire/firewire.py: - Fix a missing import. - -2006-03-14 Michael Smith - - * flumotion/component/producers/checks.py: - Get the pygtk version from gobject, to avoid importing gtk. - -2006-03-14 Michael Smith - - * flumotion/component/producers/Makefile.am: - Add some more magic incantations to the Makefile.am - -2006-03-14 Michael Smith - - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/checks.xml: - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/component/producers/soundcard/soundcard.xml: - Fix bundles for producer checks - -2006-03-14 Michael Smith - - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/checks.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/component/producers/soundcard/Makefile.am: - * flumotion/component/producers/soundcard/checks.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/soundcard/soundcard.xml: - Extend checks for leaks (in level) to firewire. - -2006-03-14 Thomas Vander Stichele - - * flumotion/admin/admin.py: - Make "Refresh" on lost connection work - -2006-03-14 Thomas Vander Stichele - - * flumotion/test/test_dag.py: - add another test to ensure we get a unique offspring list - * flumotion/common/bundle.py: - Use a DAG to get dependencies of a bundle. Has the added bonus - of returning a shorter list of dependencies than before, since - now each item appears only once, yet still in a correct order. - * flumotion/common/registry.py: - add a docstring - -2006-03-10 Michael Smith - - * flumotion/component/producers/soundcard/checks.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/soundcard/soundcard.xml: - Add warnings if people use versions of PyGTK, gst-python that exist. - -2006-03-10 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.glade: - Make stream URL clickable and use default app for mime type with - URL. Fixes #319 Fixes #267 - -2006-03-09 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/http.glade: - Gtk-2.4ify glade file that was committed to add stream URL - to http admin gtk - -2006-03-09 Zaheer Abbas Merali - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.glade: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - Display Stream URL in http admin gtk UI - -2006-03-09 Zaheer Abbas Merali - - * flumotion/component/producers/firewire/firewire.py: - Report message to admin when firewire bus resets, fixes #325 - -2006-03-09 Zaheer Abbas Merali - - * flumotion/admin/gtk/client.py: - Admin not redrawing properly when displaying warnings fixes #333 - -2006-03-08 Zaheer Abbas Merali - - * flumotion/admin/text/view.py: - make components view a scrollable list in text admin - fixes #329 - -2006-03-07 Zaheer Abbas Merali - - * flumotion/common/config.py: - report filename where config has error being parsed fixes #309 - -2006-03-06 Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py: - make disker go sad, when error writing fixes #331 - -2006-03-06 Zaheer Abbas Merali - - * flumotion/worker/checks/video010.py: - * flumotion/worker/checks/video08.py: - set pipeline to NULL after running necessary worker check even - errors freeing necessary resources...fixes #191 - original patch - from Gergely Nagy - -2006-03-06 Thomas Vander Stichele - - * configure.ac: - back to TRUNK - -=== release 0.2.0 === - -2006-03-03 Thomas Vander Stichele - - * configure.ac: - releasing 0.2.0, "San Telmo" - -2006-03-03 Edward Hervey - - * po/fr.po: - Update pour le french translation. - -2006-03-03 Zaheer Abbas Merali - - * flumotion/test/test_worker_worker.py: - * flumotion/worker/worker.py: - make sure that jobs that crash or don't start properly get reported - as ComponentCreateErrors so components go sad rather than the - manager continually thinking component is starting - -2006-03-03 Zaheer Abbas Merali - - * flumotion/worker/checks/encoder.py: - make sure vorbis translatable message actually gets added - -2006-03-02 Thomas Vander Stichele - - * TODO: - updates - * flumotion/component/muxers/Makefile.am: - * flumotion/component/muxers/muxers.xml: - * flumotion/component/muxers/ogg.py: - * flumotion/component/muxers/checks.py: - add a version check for the 0.10.3 version of the Ogg muxer - * flumotion/manager/component.py: - update a string - * flumotion/wizard/steps.py: - use the check - * flumotion/worker/checks/encoder.py: - split the message into multiple translatables to make translation - easier - * po/POTFILES.in: - * po/ca.po: - * po/es.po: - * po/fr.po: - * po/nl.po: - * po/no.po: - updates - -2006-03-01 Michael Smith - - * flumotion/test/test_i18n.py: - Ubuntu sets LANGUAGE (GNU extension) by default, so this test fails - unless we set that as well as LANG. - -2006-03-01 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/test/test_http.py: - add "issuer" property to streamers - can be set to HTTPTokenIssuer or HTTPAuthIssuer - needs nicer abstracting in the future, but will do for now - -2006-03-01 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - create an Issuer base class, plus two subclasses, to create - keycards based on requests - * flumotion/test/test_http.py: - add tests for this - -2006-03-01 Zaheer Abbas Merali - - * flumotion/common/keycards.py: - * flumotion/twisted/credentials.py: - add token keycard and credentials - -2006-02-28 Zaheer Abbas Merali - - * flumotion/component/effects/volume/volume.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/soundcard/soundcard.py: - fix volume effect for 0.10. Fixes #328 - -2006-02-28 Zaheer Abbas Merali - - * flumotion/admin/text/view.py: - fix text admin going over number of rows - -2006-02-28 Thomas Vander Stichele - - * flumotion/launch/main.py: - add an errback for component start - -2006-02-28 Thomas Vander Stichele - - * common/Makefile.am: - * common/setup.m4: - add FLUMOTION_SETUP macro - -2006-02-28 Thomas Vander Stichele - - * Makefile.am: - use an m4/ dir so that autopoint puts its copied macros there - instead of cluttering up common - -2006-02-12 Thomas Vander Stichele - - * flumotion/common/gstreamer.py: - add a quick way of checking if we can set a given value - on a property - * flumotion/test/test_common_gstreamer.py: - add tests - -2006-02-12 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/connections.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/parts.py: - * flumotion/admin/gtk/spyglass.py: - * flumotion/admin/gtk/videotest.py: - * flumotion/admin/gtk/wizard.py: - * flumotion/common/Makefile.am: - * flumotion/common/compat.py: - * flumotion/common/pygobject.py: - * flumotion/component/component.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/preview/preview.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/feedcomponent08.py: - * flumotion/test/test_common_pygobject.py: - * flumotion/tester/httpclient.py: - * flumotion/ui/fgtk.py: - * flumotion/ui/glade.py: - * flumotion/wizard/sidebar.py: - * flumotion/wizard/wizard.py: - * flumotion/wizard/worker.py: - fold flumotion.common.compat into flumotion.common.pygobject - -2006-02-11 Thomas Vander Stichele - - * flumotion/manager/component.py: - instead of taking the master clock's loopback ip, - fix up the master clock host to be "the manager's IP - as seen from the slave". Solves the netclock sync - problem in the case where the clock master is on the - manager host. - FIXME: of course this should require proper fixing. - -2006-02-11 Thomas Vander Stichele - - * flumotion/component/component.py: - * flumotion/manager/base.py: - * flumotion/manager/component.py: - document IP-related methods more so that they're clear - -2006-02-11 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - * flumotion/manager/component.py: - do some more debugging on the master clock master stuff - make the clockMasterWaiters hash take tuples so we can - log which avatarId was waiting - -2006-02-11 Thomas Vander Stichele - - * flumotion/common/pygobject.py: - add a gobject.type_register() that does not register for pygtk 2.8 - better than shutting up deprecation wwrnings - -2006-02-09 Andy Wingo - - * flumotion/component/producers/bttv/bttv.py (arg_filtered) - (call_on_state_change): New helper methods. Arguably not all that - helpful. - (BTTV.configure_pipeline, BTTV.set_channel_and_norm): Arrange to - set the channel and norm for both versions. Don't add the - colorspace effect for 0.10. - -2006-02-09 Thomas Vander Stichele - - * flumotion/common/messages.py: - handle the case where the given locale is not in the translator - * flumotion/component/consumers/httpstreamer/http.py: - cleanup - * flumotion/common/log.py: - allow for finding the part of an exception stack for a given - file, or a given frame - * flumotion/job/job.py: - give a decent ComponentCreateError that can hopefully tell you - exactly where the ImportError happened - -2006-02-08 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - lower priority of generic internal errors, allowing more specific - one from looper through - * flumotion/component/producers/looper/looper.py: - catch RESOURCE_NOT_FOUND and show a nice message - FIXME: need to find a way to not have the default bus func - get a go too. - -2006-02-08 Thomas Vander Stichele - - * flumotion/common/errors.py: - * flumotion/worker/checks/check.py: - * flumotion/worker/checks/video010.py: - * flumotion/worker/checks/video08.py: - add source of error message as first arg to - GStreamerGstError - -2006-02-06 Thomas Vander Stichele - - * flumotion/common/bundleclient.py: - * flumotion/common/package.py: - * flumotion/common/registry.py: - * flumotion/common/setup.py: - * flumotion/common/worker.py: - * flumotion/component/base/__init__.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/admin_text.py: - * flumotion/component/bouncers/__init__.py: - * flumotion/service/service.py: - documentation updates - -2006-02-06 Thomas Vander Stichele - - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/manager/component.py: - make an overdue function name change: - removeKeycard -> removeKeycardId - -2006-02-03 Thomas Vander Stichele - - * flumotion/worker/worker.py: - use a safer way of creating a worker socket. Would be nice - if we could actually give the file to twisted, without needing - to delete. - -2006-02-03 Thomas Vander Stichele - - * flumotion/common/messages.py: - fix doc - * flumotion/manager/manager.py: - privatize a bunch of privately used undocumented methods - -2006-02-03 Thomas Vander Stichele - - * flumotion/common/messages.py: - document - -2006-02-03 Thomas Vander Stichele - - * flumotion/test/test_pb.py: - * flumotion/common/log.py: - document - private getTheFluLogObserver() - -2006-02-03 Thomas Vander Stichele - - * flumotion/common/planet.py: - remove 'message' from the jobstate - * flumotion/component/component.py: - * flumotion/component/feedcomponent08.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/test/test_manager_manager.py: - * po/POTFILES.in: - and convert to 'messages' where appropriate - -2006-02-03 Thomas Vander Stichele - - * flumotion/common/medium.py: - * flumotion/common/planet.py: - document - -2006-02-03 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - * flumotion/common/code.py: - * flumotion/extern/Makefile.am: - move code.py to extern - -2006-02-03 Thomas Vander Stichele - - * flumotion/manager/component.py: - * po/POTFILES.in: - show us a decent message if start fails for any reason - -2006-02-03 Thomas Vander Stichele - - * flumotion/common/code.py: - make code.interact(local=locals()) work - -2006-02-02 Thomas Vander Stichele - - * data/glade/admin.glade: - make sure we use stock items. Fixes #320. - -2006-02-02 Thomas Vander Stichele - - * flumotion/component/overlay.py: - stop -> do_stop() - * flumotion/component/feedcomponent08.py: - stop -> do_stop, move it to interface section - * flumotion/component/producers/looper/looper.py: - use configure_pipeline instead of overriding start - override do_stop; clean up bus - fix a UI bug where on startup the number of iterations - was shown as 5 - -2006-02-02 Thomas Vander Stichele - - * flumotion/common/messages.py: - use FancyEqMixin so we can sensibly compare RemoteCopy objects - of the same original Copyable Messages and Translatable - * flumotion/test/test_common_messages.py: - add tests for these - * flumotion/twisted/flavors.py: - give us a more useful ValueError when state_remove tries to - remove an unexisting object. - Fixes #322 - -2006-02-02 Zaheer Abbas Merali - - * flumotion/admin/main.py: - convert port to an integer value on parsing - fixes #324 - -2006-02-02 Thomas Vander Stichele - - * flumotion/manager/manager.py: - not being able to release ports is a problem, we should - warn about it - -2006-02-02 Thomas Vander Stichele - - * flumotion/component/component.py: - * flumotion/component/feedcomponent010.py: - update for do_stop() changes - properly log when loseConnection is called - Exposed a bug, filed as #323 - -2006-02-02 Thomas Vander Stichele - - * flumotion/admin/text/main.py: - make Messages proxyable. Closes #321. - -2006-02-02 Thomas Vander Stichele - - * doc/random/component-initialization-protocol: - * flumotion/component/component.py: - make do_stop also return a deferred, for possible cases - where we might want to inidicate errors from shutdown before the - connection with the manager is lost. - -2006-02-02 Thomas Vander Stichele - - * flumotion/common/errors.py: - remove unused errors; we can now use Message to deal with them - -2006-02-01 Edward Hervey - - * po/fr.po: - Slight fixes to the french translation. - -2006-01-31 Thomas Vander Stichele - - * flumotion/common/log.py: - make getTheFluLogObserver() a singleton method to delay - creating in - add logTwisted so we can separate importing pb (and thus reactor) - from initing the logging - * flumotion/common/boot.py.in: - * flumotion/test/common.py: - * flumotion/test/test_pb.py: - adapt for this change - -2006-01-31 Thomas Vander Stichele - - * flumotion/admin/command/commands.py: - * flumotion/admin/command/main.py: - add an 'invoke' command - sample use: - bin/flumotion-command invoke "/default/http-audio" rotateLog - * flumotion/component/consumers/httpstreamer/http.py: - add a remote_rotateLog() method - * flumotion/component/consumers/httpstreamer/resources.py: - privatize log file bits - implement rotating the log - -2006-01-31 Thomas Vander Stichele - - * flumotion/component/component.py: - BaseComponent.addMessage(): to add messages to the state - * flumotion/worker/checks/Makefile.am: - * flumotion/worker/checks/package.xml: - * flumotion/worker/checks/encoder.py: - add checks for Theora and Vorbis - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/encoders/theora/theora.xml: - * flumotion/component/encoders/vorbis/vorbis.xml: - * flumotion/component/encoders/vorbis/vorbis010.py: - run theora and vorbis checks in do_check - * flumotion/wizard/steps.py: - use checks for Theora and Vorbis - * flumotion/wizard/wizard.py: - add some debug - make sure the deferred from require is returned - -2006-01-31 Thomas Vander Stichele - - * flumotion/launch/main.py: - update to match the new protocol - -2006-01-31 Thomas Vander Stichele - - * Makefile.am: - blacklist gstreamer.py because we don't want to split out for - 0.8 and 0.10 just for pychecker - * flumotion/worker/checks/video010.py: - add a state= to do_element_check() to compare with the 08 version - -2006-01-31 Thomas Vander Stichele - - * doc/random/component-initialization-protocol: - update protocol, add check method, make do_ methods - * flumotion/component/bouncers/htpasswdcrypt.py: - setup -> do_setup() - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/feedcomponent08.py: - setup -> do_setup() - reorder some methods according to protocol - -2006-01-30 Thomas Vander Stichele - - * flumotion/component/producers/webcam/webcam.py: - put together a string step by step for the caps. Works for - both 0.8 and 0.10 - * flumotion/wizard/steps.py: - we can get RGB, hence no format. handle that case. - * flumotion/worker/checks/video.py: - fix a silly bug that caused the config to have a tuple for format - -2006-01-30 Andy Wingo - - * flumotion/launch/main.py (ComponentWrapper.__init__): Parse - fraction values as well. - (main): Implement a --delay option that will delay starting up the - components by a certain amount of time. Can be useful for testing - synchronization. - -2006-01-30 Thomas Vander Stichele - - * flumotion/manager/component.py: - in 0.8, provideMasterClock returns None, not a tuple. - Handle that case. - -2006-01-30 Thomas Vander Stichele - - * flumotion/component/feedcomponent08.py: - set eaterNames and feederNames on the state so that startup - happens correctly. - -2006-01-30 Edward Hervey - - * po/fr.po: - Now even FromageTV can use flumotion :) - -2006-01-30 Thomas Vander Stichele - - * flumotion/common/gstreamer.py: - fix element_factory_exists() for 0.8 - -2006-01-30 Thomas Vander Stichele - - * flumotion/worker/checks/check.py: - get a traceback as debug info for unhandled failures - * flumotion/worker/checks/video.py: - put in a fix for RGB webcams, and for 0.8 - * flumotion/worker/checks/video010.py: - * flumotion/worker/checks/video08.py: - have our RemoteRunError on a callback give us a nice exception - message - -2006-01-30 Thomas Vander Stichele - - * flumotion/component/feedcomponent010.py: - generate error messages on generic GStreamer problems - * flumotion/component/producers/webcam/webcam.py: - * flumotion/component/producers/webcam/webcam.xml: - add and use mime/format/width/height/framerate - * flumotion/wizard/steps.py: - * flumotion/worker/checks/video.py: - also probe for mime/format/width/height/framerate - and use the values suggested as starting points - This makes both pwc and quickcam webcams work again nicely - Fixes #307 - -2006-01-30 Thomas Vander Stichele - - * flumotion/common/config.py: - fix the error being raised - -2006-01-30 Thomas Vander Stichele - - * common/pychecker.mk: - fix distcheck by finding the correct flumotion pythonpath to use - during distcheck - -2006-01-29 Thomas Vander Stichele - - * flumotion/wizard/wizard.py: - Make next button respond to mouse clicks after switching - sensitivity. Fixes #314 - -2006-01-29 Thomas Vander Stichele - - * data/glade/admin.glade: - make the messages_view a custom widget, with a create function - * flumotion/admin/gtk/parts.py: - show messages in the messages_view per component - * flumotion/admin/gtk/client.py: - add messages_view - get rid of Window.show_all(), so the messages-view can be hidden - at startup - * flumotion/common/planet.py: - add a 'messages' list to componentstates - * flumotion/component/component.py: - * flumotion/component/consumers/httpstreamer/http.py: - show an error message if the TCP port is in use - * flumotion/component/feedcomponent.py: - throw up messages for missing elements or pipeline parse failures - * flumotion/component/producers/audiotest/audiotest.py: - Check for necessary elements to start up - * flumotion/manager/manager.py: - Pass a component error if a component cannot be created - * flumotion/ui/trayicon.py: - let state Append/Remove pass through for now - * po/POTFILES.in: - * po/ca.po: - * po/nl.po: - * po/no.po: - * po/fr.po: - add a French translation and update the dutch one - -2006-01-29 Thomas Vander Stichele - - * flumotion/common/errors.py: - * flumotion/common/gstreamer.py: - add a check and an exception for missing GStreamer elements - -2006-01-29 Thomas Vander Stichele - - * flumotion/worker/checks/check.py: - * flumotion/worker/checks/video.py: - * flumotion/worker/checks/video010.py: - * flumotion/worker/checks/video08.py: - move CheckProcError some more for pychecker - -2006-01-29 Thomas Vander Stichele - - * flumotion/worker/checks/video.py: - * flumotion/worker/checks/video010.py: - * flumotion/worker/checks/video08.py: - move CheckProcError - -2006-01-29 Thomas Vander Stichele - - * flumotion/wizard/step.py: - a RemoteRunError already has a sensible failure.value to show, - so special-case it - * flumotion/wizard/steps.py: - catch and block on RemoteRunFailure for overlay - * flumotion/worker/checks/video08.py: - add a special gst-python 0.8 hack to work around refcounting bugs - * flumotion/worker/worker.py: - give us a decent usable RemoteRunError if there was an exception - while running the remote procedure - -2006-01-29 Thomas Vander Stichele - - * flumotion/worker/checks/check.py: - add an OPEN_READ message - * flumotion/worker/checks/video.py: - * flumotion/worker/checks/video010.py: - * flumotion/worker/checks/video08.py: - move all but the 1394 check into the video.py class - * po/ca.po: - * po/nl.po: - * po/no.po: - update for translations - -2006-01-29 Thomas Vander Stichele - - * data/glade/wizard_soundcard.glade: - add a handler for combobox_channels changed - * flumotion/admin/admin.py: - update docstring, workerRun now returns a Result - * flumotion/admin/gtk/message.py: - document - make the textview wrap on words - add a translator so we can translate Messages - sort the messages viewed first by level, then priority - - * flumotion/wizard/step.py: - remove the info_msg/error_msg calls - show all messages that are part of the Result of workerRun - raise a RemoteRunFailure if the call produced a failed result - raise a RemoteRunError if the call failed and didn't produce - a result - forward on the value of a succesful Result to the caller - * flumotion/wizard/steps.py: - use the new Message for all messages to be shown - add a on_combobox_channels_changed, but needs more integrating - * flumotion/wizard/wizard.py: - remove the info_msg/error_msg calls - add add_msg - use Messages (including plural forms for missing element(s)) - - * flumotion/component/producers/webcam/webcam.py: - Simple workaround for http://bugzilla.gnome.org/show_bug.cgi?id=328940 - * flumotion/worker/checks/Makefile.am: - * flumotion/worker/checks/package.xml: - * flumotion/worker/checks/check.py: - added; contains common functionality usable by checks - * flumotion/worker/checks/video.py: - * flumotion/worker/checks/video010.py: - rework tests to use Message and Result. - Not finding a device is now a succesful but empty result. - Turn on autoprobe-fps again, since it just doesn't work - at all without it atm. - Doing the 08 ones in a second step, because a lot of them can - be factored out together to be gst-independant - * flumotion/worker/worker.py: - verify that workerRun calls end up returning a Result object - * po/POTFILES.in: - * po/ca.po: - * po/nl.po: - * po/no.po: - update translations - -2006-01-28 Thomas Vander Stichele - - * flumotion/manager/admin.py: - make Result and Message objects proxyable through manager - -2006-01-28 Thomas Vander Stichele - - * flumotion/common/errors.py: - add some specific error types - -2006-01-28 Thomas Vander Stichele - - * flumotion/common/messages.py: - fold ngettexter into gettexter method by checking for str format - make constructors of Translatable take *args, making the creation - more natural in the no-or-one arg case - * flumotion/test/test_common_messages.py: - update to match - -2006-01-28 Thomas Vander Stichele - - * flumotion/common/messages.py: - - remove the .install() function, better not to mess with __builtin__ - - add N_ and ngettext functions, used for marking up strings - - add .gettexter(domain) and .ngettexter(domain) methods, which return - methods to create translatables as used by messages. - Typically used as T_(N_(format), args) - and TP_(ngettext(s, p, c), args) - These changes are needed because we were wrongly doing - N_(format, *args) which happened to work by accident but does - not conform to gettext markup - - make TranslatablePlural take a format triple instead - - make Translator do a 'C' translation if no other found - - make Message.add() check that it receives a Translatable - - add a Result class that can hold a list of messages, a failed - status and a resulting value. - * flumotion/test/test_common_messages.py: - - update tests for all of this - * po/ca.po: - * po/nl.po: - * po/no.po: - - updated translations - -2006-01-28 Thomas Vander Stichele - - * flumotion/test/test_pb.py: - various cleanups - flush out errors - * flumotion/twisted/pb.py: - add more debugging - fix logCategory - -2006-01-27 Thomas Vander Stichele - - * flumotion/test/test_component_init.py: - add a test I still had lying around, which tries to create - every component in the flumotion registry - -2006-01-27 Thomas Vander Stichele - - * flumotion/common/messages.py: - - add .install(), which puts N_ and ngettext methods in __builtin__ - to mark messages for translation. See gettext.install() - - add Translatable classes for Singular and Plural forms that store - everything needed to translate a message admin-side - - add a Translator class that can translate translatables and - messages, given localedirs for text domains - - make messages take translatable objects in the constructor - * flumotion/test/test_common_messages.py: - * flumotion/test/test_i18n.py: - tests for all of this, using the nl_NL locale - * po/POTFILES.in: - * po/ca.po: - * po/nl.po: - * po/no.po: - update with test strings - -2006-01-27 Thomas Vander Stichele - - * flumotion/test/Makefile.am: - * flumotion/test/test_i18n.py: - * po/POTFILES.in: - * po/ca.po: - * po/nl.po: - * po/no.po: - add a test for various aspects of gettext and i18n - in preparation for some message support - -2006-01-26 Thomas Vander Stichele - - * data/glade/wizard.glade: - * flumotion/admin/gtk/Makefile.am: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/message.py: - * flumotion/wizard/wizard.py: - moved message.py to flumotion/admin/gtk - -2006-01-26 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - * flumotion/common/messages.py: - add a Message serializable class, extracted from wizard.message - * flumotion/test/Makefile.am: - * flumotion/test/test_common_messages.py: - and a simple test for it - * data/glade/wizard.glade: - * flumotion/wizard/message.py: - * flumotion/wizard/wizard.py: - use the new Message class - rename MessageView to MessagesView, it shows more than one - -2006-01-26 Thomas Vander Stichele - - * flumotion/common/log.py: - don't debug tracebacks from pb.Error, since they specifically - get handled on the other side of a pb connection - -2006-01-25 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/common/medium.py: - * flumotion/worker/worker.py: - rename run_bundled_proc to runFunction and move it to the - worker's medium, since we only ever want workers to do this for us. - -2006-01-25 Thomas Vander Stichele - - * flumotion/common/config.py: - make wrapper functions to read an int and a string, so that - we get a ConfigError if the values in the config are empty - * flumotion/manager/main.py: - if there is a config error, print a nice warning instead of - a traceback - -2006-01-25 Thomas Vander Stichele - - * conf/managers/default/planet.xml: - * flumotion.spec.in: - * flumotion/common/config.py: - * flumotion/manager/main.py: - add a option to the section in config - file formats, and document it in sample config and spec file - Closes #246 - -2006-01-25 Thomas Vander Stichele - - * flumotion/manager/main.py: - on a config parsing error after daemonizing, only log the error - and SystemError, but not exit. Fixes #310 - -2006-01-25 Thomas Vander Stichele - - * flumotion/manager/main.py: - print a nice error when we can't read the first (manager) config - file correctly - if we set the manager name based on path, make sure the path is - under a managers/ dir - -2006-01-25 Zaheer Abbas Merali - - * flumotion/components/encoders/vorbis/vorbis010.py: Fix - regression from gst 0.8 so that it respects the channels parameter - passed from the config. Fixes #316. Reviewed by Andy Wingo. - -2006-01-25 Andy Wingo - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer._checkUpdate): Update the UI state - unconditionally every 10 seconds. - -2006-01-24 Thomas Vander Stichele - - * flumotion/common/errors.py: - * flumotion/job/job.py: - * flumotion/manager/component.py: - * flumotion/manager/worker.py: - * flumotion/worker/worker.py: - rename error.Compoment{Create/Start} to end in Error just like - the rest of them. Some further small cleanups. - I get a nice manager WARN line that tells me exactly what the - problem is when a compoment can't be created because of an - ImportError. - -2006-01-24 Thomas Vander Stichele - - * flumotion/job/job.py: - * flumotion/worker/worker.py: - use errors.ComponentCreate where applicable - forward it through nicely everywhere, instead of rewrapping it - fix more instances of Start->Create - -2006-01-24 Thomas Vander Stichele - - * flumotion/manager/admin.py: - ixnay on the keeping of local patches - this makes components startable from the admin again - -2006-01-23 Thomas Vander Stichele - - * common/gen-locale-xml.py: - * doc/random/header.py: - * flumotion/__init__.py: - * flumotion/admin/__init__.py: - * flumotion/admin/admin.py: - * flumotion/admin/command/__init__.py: - * flumotion/admin/command/commands.py: - * flumotion/admin/command/main.py: - * flumotion/admin/command/utils.py: - * flumotion/admin/connections.py: - * flumotion/admin/gtk/__init__.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/connections.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/main.py: - * flumotion/admin/gtk/parts.py: - * flumotion/admin/gtk/spyglass.py: - * flumotion/admin/gtk/videotest.py: - * flumotion/admin/gtk/wizard.py: - * flumotion/admin/text/admin_text.py: - * flumotion/admin/text/connection.py: - * flumotion/admin/text/greeter.py: - * flumotion/admin/text/main.py: - * flumotion/admin/text/misc_curses.py: - * flumotion/admin/text/view.py: - * flumotion/common/__init__.py: - * flumotion/common/boot.py.in: - * flumotion/common/bundle.py: - * flumotion/common/bundleclient.py: - * flumotion/common/common.py: - * flumotion/common/compat.py: - * flumotion/common/componentui.py: - * flumotion/common/config.py: - * flumotion/common/dag.py: - * flumotion/common/debug.py: - * flumotion/common/enum.py: - * flumotion/common/errors.py: - * flumotion/common/gstreamer.py: - * flumotion/common/interfaces.py: - * flumotion/common/keycards.py: - * flumotion/common/log.py: - * flumotion/common/medium.py: - * flumotion/common/package.py: - * flumotion/common/planet.py: - * flumotion/common/pygobject.py: - * flumotion/common/registry.py: - * flumotion/common/reload.py: - * flumotion/common/setup.py: - * flumotion/common/watched.py: - * flumotion/common/worker.py: - * flumotion/component/__init__.py: - * flumotion/component/base/__init__.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/base/admin_text.py: - * flumotion/component/bouncers/__init__.py: - * flumotion/component/bouncers/admin_gtk.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/component.py: - * flumotion/component/consumers/__init__.py: - * flumotion/component/consumers/disker/__init__.py: - * flumotion/component/consumers/disker/admin_gtk.py: - * flumotion/component/consumers/disker/admin_text.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/__init__.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/consumers/preview/__init__.py: - * flumotion/component/consumers/preview/preview.py: - * flumotion/component/converters/__init__.py: - * flumotion/component/converters/overlay/__init__.py: - * flumotion/component/converters/overlay/genimg.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/converters/pipeline/__init__.py: - * flumotion/component/converters/pipeline/pipeline.py: - * flumotion/component/effects/__init__.py: - * flumotion/component/effects/colorbalance/__init__.py: - * flumotion/component/effects/colorbalance/admin_gtk.py: - * flumotion/component/effects/colorbalance/colorbalance.py: - * flumotion/component/effects/volume/__init__.py: - * flumotion/component/effects/volume/admin_gtk.py: - * flumotion/component/effects/volume/volume.py: - * flumotion/component/encoders/__init__.py: - * flumotion/component/encoders/jpeg/__init__.py: - * flumotion/component/encoders/jpeg/jpeg.py: - * flumotion/component/encoders/mulaw/__init__.py: - * flumotion/component/encoders/mulaw/mulaw.py: - * flumotion/component/encoders/smoke/__init__.py: - * flumotion/component/encoders/smoke/smoke.py: - * flumotion/component/encoders/speex/__init__.py: - * flumotion/component/encoders/speex/speex.py: - * flumotion/component/encoders/theora/__init__.py: - * flumotion/component/encoders/theora/theora.py: - * flumotion/component/encoders/vorbis/__init__.py: - * flumotion/component/encoders/vorbis/vorbis.py: - * flumotion/component/encoders/vorbis/vorbis010.py: - * flumotion/component/encoders/vorbis/vorbis08.py: - * flumotion/component/encoders/vorbis/vorbisutils.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/feedcomponent08.py: - * flumotion/component/muxers/__init__.py: - * flumotion/component/muxers/multipart.py: - * flumotion/component/muxers/ogg.py: - * flumotion/component/producers/__init__.py: - * flumotion/component/producers/audiotest/__init__.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/bttv/__init__.py: - * flumotion/component/producers/bttv/admin_gtk.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/producers/firewire/__init__.py: - * flumotion/component/producers/firewire/admin_gtk.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/jukebox/__init__.py: - * flumotion/component/producers/jukebox/jukebox08.py: - * flumotion/component/producers/looper/__init__.py: - * flumotion/component/producers/looper/admin_gtk.py: - * flumotion/component/producers/looper/looper.py: - * flumotion/component/producers/pipeline/__init__.py: - * flumotion/component/producers/pipeline/pipeline.py: - * flumotion/component/producers/soundcard/__init__.py: - * flumotion/component/producers/soundcard/admin_gtk.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/videotest/__init__.py: - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/component/producers/videotest/admin_text.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/webcam/__init__.py: - * flumotion/component/producers/webcam/admin_gtk.py: - * flumotion/component/producers/webcam/webcam.py: - * flumotion/configure/__init__.py: - * flumotion/configure/configure.py: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - * flumotion/extern/__init__.py: - * flumotion/extern/pytrayicon/__init__.py: - * flumotion/job/__init__.py: - * flumotion/job/job.py: - * flumotion/job/main.py: - * flumotion/launch/__init__.py: - * flumotion/launch/inspect.py: - * flumotion/launch/main.py: - * flumotion/manager/__init__.py: - * flumotion/manager/admin.py: - * flumotion/manager/base.py: - * flumotion/manager/component.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/project/__init__.py: - * flumotion/project/project.py: - * flumotion/service/__init__.py: - * flumotion/test/__init__.py: - * flumotion/test/common.py: - * flumotion/test/gtkunit.py: - * flumotion/test/test_bundle.py: - * flumotion/test/test_checkers.py: - * flumotion/test/test_common.py: - * flumotion/test/test_common_componentui.py: - * flumotion/test/test_common_gstreamer.py: - * flumotion/test/test_common_package.py: - * flumotion/test/test_common_planet.py: - * flumotion/test/test_common_pygobject.py: - * flumotion/test/test_component.py: - * flumotion/test/test_config.py: - * flumotion/test/test_configure.py: - * flumotion/test/test_credentials.py: - * flumotion/test/test_dag.py: - * flumotion/test/test_defer.py: - * flumotion/test/test_dialogs.py: - * flumotion/test/test_enum.py: - * flumotion/test/test_flavors.py: - * flumotion/test/test_greeter.py: - * flumotion/test/test_htpasswdcrypt.py: - * flumotion/test/test_http.py: - * flumotion/test/test_keycards.py: - * flumotion/test/test_log.py: - * flumotion/test/test_manager_admin.py: - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_manager_worker.py: - * flumotion/test/test_parts.py: - * flumotion/test/test_pb.py: - * flumotion/test/test_reflect.py: - * flumotion/test/test_twisted_compat.py: - * flumotion/test/test_ui_fgtk.py: - * flumotion/test/test_wizard.py: - * flumotion/test/test_worker_worker.py: - * flumotion/test/test_workerconfig.py: - * flumotion/test/testclasses.py: - * flumotion/tester/__init__.py: - * flumotion/tester/client.py: - * flumotion/tester/clientfactory.py: - * flumotion/tester/httpclient.py: - * flumotion/twisted/__init__.py: - * flumotion/twisted/checkers.py: - * flumotion/twisted/compat.py: - * flumotion/twisted/credentials.py: - * flumotion/twisted/defer.py: - * flumotion/twisted/flavors.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - * flumotion/twisted/reflect.py: - * flumotion/ui/__init__.py: - * flumotion/ui/fgtk.py: - * flumotion/ui/glade.py: - * flumotion/ui/icons.py: - * flumotion/ui/trayicon.py: - * flumotion/wizard/__init__.py: - * flumotion/wizard/classes.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/message.py: - * flumotion/wizard/save.py: - * flumotion/wizard/sidebar.py: - * flumotion/wizard/step.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - * flumotion/wizard/worker.py: - * flumotion/worker/__init__.py: - * flumotion/worker/checks/__init__.py: - * flumotion/worker/checks/video.py: - * flumotion/worker/checks/video010.py: - * flumotion/worker/checks/video08.py: - * flumotion/worker/config.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - * tests/vorbis.py: - * tools/fixheader.py: - 2006 baby ! Brought to you by the Gratuitous Commit Department - -2006-01-23 Andy Wingo - - * bin/flumotion-command.in (NEEDS_GTK): flumotion-command doesn't - need gtk. - -2006-01-17 Andy Wingo - - * flumotion/test/test_wizard.py (WizardSaveTest): Apparently these - skip attributes need to be strings. - - * flumotion/test/test_manager_manager.py (TestVishnu): Make this - first a log.loggable, then a unittest. Apparently unittest has - picked up a .debug attribute which is a method that takes no - arguments (other than self). Not sure what's going on here, but - this fixes the test suite. - - * flumotion/test/test_common.py (TestObjRepr.testMe): Just test - the repr of self -- works around what appears to be a bug in trial - with twisted 2.1. - - * configure.ac: Check for twisted.web as well. - - * common/Makefile.am (EXTRA_DIST): - * common/twisted-module.m4: New m4, looks for twisted pieces. - - * configure.ac: Check that the user has twisted.names installed. - -2006-01-12 Andy Wingo - - * flumotion/component/encoders/vorbis/vorbis08.py - (Vorbis.create_pipeline): Fix^2. - - * flumotion/component/producers/looper/looper.py (Looper.init): - Move some inits here. - - * flumotion/component/encoders/vorbis/vorbis08.py - (Vorbis.create_pipeline): Fold init stuff here. Fix code to look - for props in the right place. Fix comments. - - * flumotion/component/converters/overlay/overlay.py (Overlay): - * flumotion/component/consumers/disker/disker.py - (Disker): Add comments. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.init): Inits moved here from - configure_pipeline(). - - * flumotion/component/bouncers/htpasswdcrypt.py (HTPasswdCrypt.init): - * flumotion/component/bouncers/bouncer.py (Bouncer.init): - * flumotion/component/feedcomponent08.py (FeedComponent.init): - * flumotion/component/feedcomponent010.py (FeedComponent.init): - Changed from __init__(). - -2006-01-12 Thomas Vander Stichele - - * flumotion/launch/main.py: - fix flumotion-launch, it wasn't using getComponent - * flumotion/common/errors.py: - * flumotion/job/job.py: - * flumotion/manager/base.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/test/test_manager_manager.py: - * flumotion/worker/worker.py: - call methods create instead of start, because that's what it is - now - -2006-01-12 Andy Wingo - - * flumotion/component/component.py (BaseComponent): Mix in the - InitMixin, call it too. - (BaseComponent.init): Init variables in init(), why not. - - * flumotion/common/common.py (call_each_method): Fix a bugaboo. - - * flumotion/test/test_common.py (TestInitMixin): Bling! - - * flumotion/common/common.py (_uniq, _call_each_method): New - helpers. - (call_each_method, call_each_method_reversed): New public - functions to call a method for each implementation in a class - hierarchy. - (InitMixin): New mixin class that will call init() implementations - on an object using call_each_method_reversed. - -2006-01-12 Thomas Vander Stichele - - * common/pychecker.mk: - 09 -> 010 - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/test/test_config.py: - fix some pychecker-y issues - -2006-01-11 Thomas Vander Stichele - - * doc/random/component-initialization-protocol: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/feedcomponent08.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/job/job.py: - * flumotion/manager/manager.py: - * flumotion/test/test_component.py: - * flumotion/test/test_htpasswdcrypt.py: - * flumotion/test/test_pb.py: - remove the config argument from component __init__ - basic scenario still works; time to verify others - * flumotion/component/component.py: - add setup() to medium - * flumotion/manager/component.py: - remove config dict from getComponent - -2006-01-11 Thomas Vander Stichele - - * doc/random/component-initialization-protocol: - * flumotion/test/test_component.py: - * flumotion/test/test_pb.py: - * flumotion/test/test_htpasswdcrypt.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/manager/manager.py: - separate component setup() from __init__() - invoke setup() explicitly after creating components - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/feedcomponent010.py: - * flumotion/component/feedcomponent08.py: - same as above, but also: - move member var initialization back to __init__ - * flumotion/manager/component.py: - add a setup() method to proxy to the job-side component - turn _startComponent in a defer generator that also takes care of - setup() for now - * flumotion/component/component.py: - provide remote_setup to manager's ComponentAvatar - * flumotion/component/feedcomponent.py: - remote_getState is not necessary anymore, since the eaterNames - and feederNames keys are set at the correct place - -2006-01-11 Thomas Vander Stichele - - * flumotion/test/test_manager_manager.py: - add a listener object to turn a state change on a RemoteCache - into a deferred so we can wait inside the unittest on a result - to happen - -2006-01-09 Michael Smith - - * flumotion/manager/component.py: - Add a perspective method to reserve worker ports, needed so that - RTCP servers can be started on demand. - -2006-01-09 Thomas Vander Stichele - - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - remove loadConfiguration in ComponentHeaven, not used anymore - -2006-01-08 Thomas Vander Stichele - - * flumotion/manager/worker.py: - add documentation and warnings for unexpected situations - -2006-01-08 Thomas Vander Stichele - - * flumotion/common/planet.py: - use a module global for keys we want to proxy from job to - component state - only proxy those keys, no others - -2006-01-07 Thomas Vander Stichele - - * flumotion/manager/component.py: - use the name of the mood in an avatar representation - * flumotion/test/test_manager_manager.py: - move the provideMasterClock closer to where we want it by - putting it in the _startComponent method, which now is a defgen - -2006-01-06 Thomas Vander Stichele - - * flumotion/manager/component.py: - privatize a private instance var - collapse an else branch - -2006-01-05 Thomas Vander Stichele - - * doc/random/component: - * doc/random/processes: - add notes about component creation phase and error handling - * flumotion/job/job.py: - * flumotion/manager/admin.py: - make it so components that ran into an error during creation - stop the job process, and the admin can restart those sad - non-running components. - -2006-01-03 Thomas Vander Stichele - - * flumotion/job/job.py: - clean up internal method names - privatize more internal variables - -2005-12-31 Thomas Vander Stichele - - * data/Makefile.am: - * data/upgrade-to-0.2.0.xsl: - add an xsl stylesheet to transform pre-0.2.0 config files - * NEWS: - add notes on how to use it - -2005-12-31 Thomas Vander Stichele - - * flumotion/admin/gtk/parts.py: - make it so that "Worker" column shows in italics the worker - that needs to log in for the component to be able to start - * tests/ComponentsView.py: - * tests/vorbis.py: - update tests - -2005-12-31 Thomas Vander Stichele - - * flumotion/wizard/save.py: - fix syntax error - -2005-12-29 Thomas Vander Stichele - - * NEWS: - update - * flumotion/common/common.py: - * flumotion/test/test_common.py: - add common.compareVersions() method and test - -2005-12-29 Thomas Vander Stichele - - * flumotion/wizard/save.py: - save project and version in xml - -2005-12-28 Thomas Vander Stichele - - * flumotion/component/consumers/disker/disker.py: - move var declaration to class, out of setup - check if self.location is set from size rotation callback - * flumotion/launch/main.py: - support longs - -2005-12-28 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - default to 8800 for port - * flumotion/component/producers/soundcard/soundcard.py: - pick higher-quality defaults - -2005-12-20 Thomas Vander Stichele - - * flumotion/common/common.py: - LANGUAGE and LANG aren't necessarily set - -2005-12-19 Thomas Vander Stichele - - * flumotion/common/boot.py.in: - * flumotion/manager/main.py: - * flumotion/worker/main.py: - log the GStreamer version by sticking it in - flumotion.configure.configure - -2005-12-19 Thomas Vander Stichele - - * NEWS: - add note about new config - * flumotion.spec.in: - update spec for new config - -2005-12-19 Edward Hervey - - * flumotion/component/converters/overlay/overlay.py: - Update overlay do_start() method to new arguments (add clocking) - -2005-12-15 Andy Wingo - - * flumotion/admin/command/commands.py (do_showcomponent): New - command. - -2005-12-15 Thomas Vander Stichele - - * flumotion/component/Makefile.am: - * flumotion/component/component.xml: - * flumotion/component/encoders/Makefile.am: - * flumotion/component/encoders/vorbis/vorbis.py: - * flumotion/component/encoders/vorbis/vorbis.xml: - * flumotion/component/encoders/vorbis/vorbis09.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/feedcomponent09.py: - * flumotion/wizard/steps.py: - * flumotion/worker/checks/Makefile.am: - * flumotion/worker/checks/package.xml: - * flumotion/worker/checks/video.py: - * flumotion/worker/checks/video09.py: - * po/nl.po: - * po/no.po: - rename 09 files to 010 - -2005-12-15 Andy Wingo - - * flumotion/admin/command/commands.py (do_showplanet): New - command. - (do_getmood): New command. - -2005-12-15 Thomas Vander Stichele - - * TODO: - * flumotion/common/registry.py: - use common.pathToModuleName, it doesn't check on-disk for a file, - which breaks when using projects - -2005-12-15 Andy Wingo - - * flumotion/component/consumers/httpstreamer/http.py - (Stats.updateState, MultifdSinkStreamer.configure_pipeline): Add - 'stream-bitrate-raw', 'stream-totalbytes-raw' - 'consumption-bitrate-raw', and 'consumption-totalbytes-raw' - entries in the uiState. - - * flumotion/admin/command/main.py (usage): Less wrong options - string. - - * flumotion/admin/command/Makefile.am (component_PYTHON): - * flumotion/admin/command/commands.py: - * flumotion/admin/command/utils.py: Factored some noise out of - commands.py. Fixed a couple bugs as well. - -2005-12-15 Thomas Vander Stichele - - * flumotion/common/package.py: - add a docstring - * flumotion/common/setup.py: - add a log line - * flumotion/job/main.py: - set up package path - needed to make projects work - -2005-12-15 Andy Wingo - - * flumotion/admin/command/main.py (setup_reactor.refused) - (setup_reactor.failed): Quit the reactor on errors. - (setup_reactor.failed, setup_reactor.refused): Or, stop it. - - * flumotion/admin/command/commands.py (get_component_uistate): Fix - format string. - - * flumotion/admin/command/main.py (setup_reactor.refused) - (setup_reactor.failed): Fix prototypes. - (setup_reactor): Remove default errback. - - * flumotion/admin/command/commands.py (do_getprop): Actually - implemented. - (get_component_uistate): New helper method to get a component's - uistate. - (do_listprops): New operation, lists the properties on a - component. - (avatarId): New parser. - (commands): Update the commands list. - - * flumotion/twisted/flavors.py (StateCacheable.keys): New method - on StateCacheable objects. Should just make these derive from dict - somehow. - (StateRemoteCache.keys): Add the method on the cached objects as - well. - - * flumotion/admin/command/main.py: Load commands from - flumotion.admin.command.commands. - - * flumotion/admin/command/Makefile.am (component_PYTHON): - * flumotion/admin/command/commands.py: New file, split out from - main.py. Here's where all of the commands will get defined. - - * flumotion/admin/command/main.py: Implement a bit more; just need - to implement do_getprop and I'm there. - -2005-12-15 Thomas Vander Stichele - - * flumotion.spec.in: - add -command - fix double includes - -2005-12-15 Thomas Vander Stichele - - * configure.ac: - back down to gst-python 0.10.0 - * flumotion/component/producers/looper/looper.py: - move a regularly recurring debug line to log level 5 - try to import discoverer and fail if not found - -2005-12-15 Thomas Vander Stichele - - * flumotion/common/log.py: - if we only have one arg for an exception and it's a string, - we can consider it an error message that we can show - -2005-12-15 Edward Hervey - - * flumotion/component/producers/looper/Makefile.am: - Forgot to add admin_gtk.py and the glade files to Makefile.am - -2005-12-15 Andy Wingo - - * flumotion/admin/command/main.py: New file, committing - prematurely so as to assuage the buildbots. - - * flumotion/test/test_manager_manager.py - (FakeComponentMind.remote_provideMasterClock): Add a stub - provideMasterClock implementation. - (FakeComponentMind.remote_start): start() takes three args now. - (FakeComponentMind.remote_start): Don't return anything. - -2005-12-14 Edward Hervey - - * flumotion/component/producers/looper/admin_gtk.py: - Remove print - * flumotion/component/producers/looper/flufileinfo.glade: - ellipsize the filename string - -2005-12-14 Andy Wingo - - * flumotion/launch/main.py (ComponentWrapper.start): Call start() - with the right number of args. - -2005-12-14 Thomas Vander Stichele - - * flumotion/common/config.py: - show component and property name in case of an error during - parsing of properties - -2005-12-14 Andy Wingo - - * flumotion/admin/command/main.py: New file, implementing args - parsing. - - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/command/__init__.py: Add new module space for - flumotion-command. - - * bin/flumotion-command.in: New executable. Designed to log in to - the manager, execute a command, wait for a response, and then - exit. - - * configure.ac: - * bin/Makefile.am (bin_SCRIPTS): flumotion-command infrastructure. - * flumotion/admin/Makefile.am (SUBDIRS): - - * flumotion/manager/manager.py (Vishnu.loadConfiguration): Fix DAG - error. - - * flumotion/manager/manager.py (Vishnu.releasePortsOnWorker): - s/warning/debug/, the condition can occur legitimately. Cut out if - the worker is not available. - - * flumotion/manager/component.py - (ComponentHeaven.removeMasterClock): Renamed from - removeMasterClockInfo. Release the port from the worker. - (ComponentHeaven.unregisterComponent): If the component provided a - master clock, remove its clocking info. - -2005-12-14 Edward Hervey - - * configure.ac: - Bump the gst-0.10 requirement to 0.10.0.1 because of the use of - gst.extend.discoverer in the looper element. - - * flumotion/component/producers/looper/looper.py: - * flumotion/component/producers/looper/looper.xml: - * flumotion/component/producers/looper/looper.glade: - * flumotion/component/producers/looper/flufileinfo.glade: - * flumotion/component/producers/looper/admin_gtk.py: - Glade-ified the admin UI. - Rely on gst.extend.discoverer.Discoverer for discovering the file - information, and using the flufileinfo UI to display it. - Show current position in loop. - - * flumotion/component/producers/videotest/admin_gtk.py: - typo fix - -2005-12-14 Andy Wingo - - * flumotion/worker/checks/video09.py (checkWebcam): Do autoprobe - colorspaces. Takes about 2 seconds, but it actually works (unlike - the previous code). - - * flumotion/component/producers/webcam/webcam.py - (Webcam.configure_pipeline): Only add colorspace effect for 0.8, - until it's ported to 0.10. - - * flumotion/component/feedcomponent09.py - (FeedComponent.provide_master_clock): Make sure the pipeline keeps - using the clock we're providing. - -2005-12-13 Andy Wingo - - * flumotion/manager/component.py (ComponentAvatar.start): Change - to call getMasterClockInfo, not getMasterClock. Avoid slaving a - clock to itself. - (ComponentHeaven.registerComponent): Provide a master clock as - appropriate. - (ComponentHeaven.provideMasterClock): Actually implemented. - (ComponentHeaven.getMasterClockInfo): Renamed from getMasterClock, - implemented. - (ComponentHeaven.removeMasterClockInfo): New function. - - * flumotion/manager/manager.py (Vishnu.loadConfiguration): Remove - spurious variable. - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.remote_provideMasterClock): New remote - method, proxies to the component. - - * flumotion/component/producers/audiotest/audiotest.xml: Up the - priority of the clock here so that this clock is deterministically - chosen when testing. - - * flumotion/component/feedcomponent09.py - (FeedComponent.setup_pipeline): Disable automatic management of - stream time. - (FeedComponent.pipeline_stop): Deactivate and dispose of the clock - provider, if any, when going to NULL. - (FeedComponent.set_master_clock): Implement. Yay. - (FeedComponent.provide_master_clock): New method, implemented. - (FeedComponent.link): Activate the clock provider, if any, before - going to PLAYING. - - * flumotion/component/feedcomponent08.py - (FeedComponent.provide_master_clock): Ignore request to provide - master clock on 0.8. - - * flumotion/manager/component.py (ComponentHeaven.getMasterClock): - New method, returns a deferred that will fire whenever the - information is available (possibly immediately). Right now just - returns None. - (ComponentHeaven.provideMasterClock): New method, called when a - component provides a master clock. Not yet implemented... - (ComponentAvatar.start): If we need a master clock, get that info - using getMasterClock. Pass a third argument to start(), the - clocking information, which can be None. - - * flumotion/component/feedcomponent.py - (ParseLaunchComponent.do_start): Take a third argument, clocking, - meant to be information about the master clock. Pass it on to a - new FeedComponent method, set_master_clock. - - * flumotion/component/feedcomponent09.py - (FeedComponent.set_master_clock): Stub set_master_clock - implementation. - - * flumotion/component/feedcomponent08.py - (FeedComponent.set_master_clock): Ignore request to set the master - clock for 0.8, it's not supported. - - * flumotion/component/encoders/vorbis/vorbis08.py (Vorbis.start): - Ignore the clocking arg. - -2005-12-13 Michael Smith - - * flumotion/project/project.py: - Catch syntax errors in exec() so that illegal project/module names are - caught, rather than getting an unhelpful message later. - -2005-12-13 Andy Wingo - - * flumotion/manager/manager.py (Vishnu.loadConfiguration) - (Vishnu._addComponent, Vishnu._workerStartComponentDelayed): Get - avatarId from the config dict, not the component mapper. - - * flumotion/common/config.py (FlumotionConfigXML._parseFlow): - Instead of setting 'clock-master' to True or False, set it to - either None (for no clock master) or an avatar ID of the component - hosting the clock master. - (FlumotionConfigXML._parseComponent): Set config['avatarId'] here. - (FlumotionConfigXML._parseClockMaster): Return True or None. - - * flumotion/test/test_config.py (TestConfig.testParseProperties): - False -> None. - (TestConfig.testClockMasterAutoSelection) - (TestConfig.testClockMasterUserSelection): 'clock-master' = - avatarId of component providing clock. - -2005-12-12 Thomas Vander Stichele - - * flumotion/component/converters/overlay/overlay.py: - move stray self._filename = None from the __init__ days - only use one pipeline template - reorder again so that pngdec part is first in the parse_launch; - don't change this, videomixer relies on the order - fix the ! being in the wrong place - Fixes overlay for 0.8, but not yet for 0.10: see - http://bugzilla.gnome.org/show_bug.cgi?id=323896 - - * flumotion/wizard/save.py: - warn about and do not write properties that are not listed in - the registry - -2005-12-12 Thomas Vander Stichele - - * flumotion/common/registry.py: - change RegistryEntryComponent to take a dict for properties, not - a list of values - add a .hasProperty() - update .getProperties() so interface is the same - * flumotion/component/converters/overlay/genimg.py: - cosmetic fix - * flumotion/job/job.py: - typo fix - -2005-12-12 Thomas Vander Stichele - - * flumotion/common/log.py: - * flumotion/test/test_log.py: - make getExceptionMessage look at the top of the stack - add some unit tests to verify this; I seem to remember having - changed this piece before, so if that turns up again, add more - tests ! - -2005-12-12 Andy Wingo - - * flumotion/component/feedcomponent08.py - (FeedComponent._setup_feeders): Put feed_name definition back in. - - * flumotion/component/encoders/vorbis/vorbis08.py - (Vorbis.__init__): Remove unused locals. - - * flumotion/job/job.py (JobMedium.remote_start): Don't take - feedPorts as an arg, it's not necessary. - (JobMedium._runComponent): No feedPorts. Also no need to - setConfig, BaseComponent.__init__ does that. - - * flumotion/launch/main.py (ComponentWrapper.instantiate): - set_feed_ports is gone. - (main): Start the component with the ports allocated. - - * flumotion/manager/component.py (ComponentAvatar.cleanup): - Release ports when the component is detached. - (ComponentAvatar.getWorkerName): Use the jobState to get the - worker name, because we have it before we have the componentState. - (ComponentAvatar.start): Keep track of which ports we have - reserved for the component. - (ComponentAvatar.perspective_feedReady): Take a boolean instead of - the port number -- we know which port it's on. - (ComponentHeaven._getComponentFeedersData): This is where we - actually allocate the ports. - - * flumotion/manager/manager.py (Vishnu.reservePortsOnWorker) - (Vishnu.releasePortsOnWorker): New vishnu methods. - - * flumotion/manager/worker.py (PortSet): New helper object to keep - track of ports available on a worker. - (WorkerAvatar.attached): Before notifying the heaven or vishnu - about a new worker, call getPorts() to get the configured range of - ports. - (WorkerAvatar.reservePorts, WorkerAvatar.releasePorts): New - methods. - - * flumotion/worker/worker.py (WorkerMedium.cb_processFinished) - (WorkerMedium.cb_processFailed): Removed, were not referenced - anywhere. - (WorkerMedium.remote_getPorts): New remote call, returns the set - of ports this worker was configured to use. - (WorkerMedium.__init__): Take ports as an initarg. - (WorkerBrain.setup): JobHeaven doesn't need the ports. - (Port): Port allocation code moved to manager. - (JobAvatar.attached): Don't allocate ports for the kid, the - manager will do that. - (JobHeaven.__init__): No need to keep the port list around. - - * flumotion/component/feedcomponent08.py: - * flumotion/component/feedcomponent09.py (FeedComponent.setup): - Remove feed_ports instance variable. - (FeedComponent.set_feed_ports): Removed, feed ports are now passed - to FeedComponent.start(). - (FeedComponent._setup_feeders): feedersData tuples now include the - port as well. No need for a return value. - (FeedComponent.link): Don't return anything, adapt to ports in - feedersData. - - * flumotion/test/test_manager_manager.py - (FakeWorkerMind.remote_getPorts): Implement the getPorts remote - call on our fake worker. - - * flumotion/test/test_worker_worker.py - (TestWorkerMedium.testSetRemoteReference): Update for WorkerMedium - initargs change. - - * conf/managers/default/flows/ogg-test-theora.xml: Replace with - standard components instead of pipeline components. The only - videotestsrc pipeline had a fraction framerate. - -2005-12-12 Thomas Vander Stichele - - * flumotion/component/encoders/vorbis/vorbis08.py: - fix __init__ chainup due to recent refactoring - -2005-12-12 Michael Smith - - * flumotion/component/feedcomponent.py: - I was getting annoyed by a misspeld variable name. - -2005-12-07 Andy Wingo - - * conf/managers/default/planet.xml: Update config syntax. - -2005-12-07 Michael Smith - - * flumotion/common/registry.py: - It has been pointed out to me that I can make the previous change - specific to the single class in question rather than file-global. - -2005-12-07 Michael Smith - - * flumotion/common/registry.py: - Tell pychecker to allow the 12-arg constructor in this file. - -2005-12-07 Michael Smith - - * common/pychecker.mk: - Fix pychecker macros to look for gstreamer 0.10 instead of 0.9 so we - actually check the blah09.py files. - -2005-12-07 Michael Smith - - * flumotion/common/config.py: - Fix syntax in log call so that 'make check' passes again. - -2005-12-06 Andy Wingo - - * flumotion/test/test_config.py (TestConfig.testClockMasterAutoSelection) - (TestConfig.testClockMasterUserSelection) - (TestConfig.testClockMasterError): New testes. - - * flumotion/common/config.py (FlumotionConfigXML._parseFlow): - Choose a default master clock if necessary, sorting by the clock - priorities in the registry. - - * flumotion/test/test_config.py (TestConfig.testParseProperties): - Test that clock-master defaults to False. - - * flumotion/common/config.py - (FlumotionConfigXML._parseClockMaster): Parse out - from a config. - - * flumotion/component/encoders/Makefile.am: Don't try to dist - encoders.xml. - - * flumotion/test/test_registry.py (TestRegistry.testDump): Update - dump test for default synchronization writeout. - (TestComponentEntry.setUp): Add a couple tests. - - * flumotion/common/registry.py - (RegistryEntryComponent.__init__) - (RegistryParser._parseSynchronization) - (RegistryParser._parseComponent): Add support for parsing - . - (RegistryEntryComponent.getNeedsSynchronization) - (RegistryEntryComponent.getClockPriority): New accessors. - (ComponentRegistry.dump): Support writing out the synchronization - data. - - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/component/producers/jukebox/jukebox.xml: - * flumotion/component/producers/looper/looper.xml: - * flumotion/component/producers/pipeline/pipeline.xml: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/component/producers/webcam/webcam.xml: Add - synchronization properties, as per the synchronization doc. - -2005-12-06 Thomas Vander Stichele - - * flumotion/worker/worker.py: - put back the segfault handler - try to be helpful by pointing out the core dump file - -2005-12-06 Andy Wingo - - * doc/random/synchronization: New file, describes how - synchronization works in flumotion. - - * flumotion/component/encoders/encoders.xml: Removed, there are - already xml files for all encoders. - - * flumotion/component/muxers/muxers.xml: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/jukebox/jukebox.xml: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/component/encoders/jpeg/jpeg.xml: - * flumotion/component/encoders/mulaw/mulaw.xml: - * flumotion/component/encoders/smoke/smoke.xml: - * flumotion/component/encoders/speex/speex.xml: - * flumotion/component/encoders/theora/theora.xml: - * flumotion/component/encoders/vorbis/vorbis.xml: Remove "feed" - properties. Unnecessary, given the entries in the - registry. - - * conf/managers/default/flows/ogg-test-theora.xml: Update for - config changes. - - * flumotion/test/test.xml: Remove properties. - - * flumotion/wizard/save.py (Component.toXML): Don't write out - entries. - - * flumotion/common/config.py (FlumotionConfigXML._parseFeeds): - Removed. - (FlumotionConfigXML._parseComponent): Take the feeds directly from - the registry. A node in a is an error. Could - add something back when/if we support deactivated feeds. - - * flumotion/launch/inspect.py (main): Print out required/multiple - attributes of eaters. - - * flumotion/launch/main.py (ComponentWrapper.__init__): Update for - eater registry changes, removal of 'source' property. - - * flumotion/component/muxers/muxers.xml: Remove "source" - properties, set multiple=yes on the feeders. - - * flumotion/component/encoders/encoders.xml: - * flumotion/component/encoders/jpeg/jpeg.xml: - * flumotion/component/encoders/mulaw/mulaw.xml: - * flumotion/component/encoders/smoke/smoke.xml: - * flumotion/component/encoders/speex/speex.xml: - * flumotion/component/encoders/theora/theora.xml: - * flumotion/component/encoders/vorbis/vorbis.xml: - * flumotion/component/converters/overlay/overlay.xml: - * flumotion/component/consumers/disker/disker.xml: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/consumers/preview/preview.xml: Remove - "source" properties. - - * flumotion/common/config.py (FlumotionConfigXML._parseSources): - Check multiple/required sources against the registry. Removes the - need to have "source" properties in components. - - * flumotion/common/registry.py (RegistryEntryEater): New class, to - store an node inside a . This is because we - need to know if some eaters can have multiple feeders, and if some - eaters are required. - (RegistryParser._parseEater): Parse the eater as a - RegistryEntryEater. - (ComponentRegistry.dump): Update to write out entries - properly. - - * flumotion/test/test.xml: - * flumotion/test/test_config.py (TestConfig.testParseProperties): - Update for new syntax. - - * flumotion/common/config.py - (FlumotionConfigXML._parseProperties): Parse the new property - format. As a bonus, checks that properties actually exist in the - registry. - (FlumotionConfigXML._parseComponent): Validate that there are only - 'feed', 'source', and 'property' subnodes in nodes. - - * flumotion/wizard/save.py (Component.toXML): Instead of putting - properties in their own nodes ("bar"), put them in - property nodes ("bar"). Separates - the XML namespace properly. - -2005-12-05 Andy Wingo - - * flumotion/component/encoders/encoders.xml: Remove duplicated - registry entry for jpeg-encoder. - - * All components: adapted for new init protocol. - - * flumotion/manager/manager.py (Vishnu.loadConfiguration): Try to - get the bouncer's entry point from the registry. - - * flumotion/component/feedcomponent.py - (ParseLaunchComponent.create_pipeline): Implement the init - protocol via calling get_pipeline_string, then creating a pipeline - from that. - (ParseLaunchComponent.set_pipeline): After chaining to the parent, - call self.configure_pipeline to give subclasses a look at the - pipeline. - (ParseLaunchComponent.get_pipeline_string): New vmethod, to be - implemented by subclasses. - (ParseLaunchComponent.configure_pipeline): New vmethod. - Implementation optional. - - * flumotion/component/component.py (BaseComponent.__init__): - Implement the base of the initialization protocol via calling - setConfig and setup; take a config dict as an arg so this can be - an entry point. - (BaseComponent.setup): Default setup implementation, does nothing. - (BaseComponent.setConfig): Default setConfig implementation, sets - self.config and self.name. - - * flumotion/component/feedcomponent09.py (FeedComponent.setup) - * flumotion/component/feedcomponent08.py (FeedComponent.setup): - Implement the new initialization protocol. Was __init__. - - * flumotion/component/feedcomponent09.py - (FeedComponent.set_pipeline) - * flumotion/component/feedcomponent08.py - (FeedComponent.set_pipeline): Implement set_pipeline, calls - setup_pipeline. - - * flumotion/component/bouncers/htpasswdcrypt.xml: entry = - HTPasswdCrypt. - - * flumotion/component/bouncers/htpasswdcrypt.py - (HTPasswdCrypt.setup): Fold createComponent into here, allow - BaseComponent.__init__ to be the entry point. Adapt to properties - as a subdict of config. - - * flumotion/component/bouncers/bouncer.py (Bouncer.setup): Update - to the new initialization protocol. - - * flumotion/common/config.py (FlumotionConfigXML._parseComponent): - Put properties in config['properties']. The XML representation for - now is the same though. - - * flumotion/launch/main.py (ComponentWrapper.__init__): Put - properties in config['properties'], not config itself. Set - config['feed'] from the registry, and ignore missing - config['properties]['source'] for now, it's in config['source'] -- - components shouldn't have 'source' as a property anyway. - - * flumotion/test/test_config.py (TestConfig.testParseProperties): - Update for properties being in a subdict of config. - - * flumotion/test/test_component.py (PipelineTest): Adapt to new - __init__ args. Override the pipeline creation parts of the init - protocol so that we don't try to gst.parse_launch with made-up - names. - (TestParser.testErrors): Don't skip this one; it passes here. - (pipelineFactory): Update so that PipelineTest gets the right - pipeline. - - * flumotion/test/test_htpasswdcrypt.py - (TestHTPasswdCryptKeycard.setUp) - (TestHTPasswdCryptUACPP.setUp, TestHTPasswdCryptUACPCC.setUp): - * flumotion/test/test_pb.py (Test_FPBClientFactory.setUp) - (Test_BouncerWrapper.setUp): Update for bouncer initialization - changes. - - * flumotion/wizard/steps.py (TestAudioSource.worker_changed): - Check for audiotestsrc when working with 0.10. - -2005-12-02 Michael Smith - - * configure.ac: - * flumotion/common/boot.py.in: - * tests/checks.py: - * tests/debugslider.py: - * tests/vorbis.py: - 0.10 is on the way; update everything to use 0.10 rather than 0.9, - other than file renaming. - -2005-11-29 Edward Hervey - - * flumotion/component/producers/looper/looper.py: - * flumotion/component/producers/looper/looper.xml: - Update fraction behaviour, - Use single-segment identity so the stream really behaves as a live - stream. - -2005-11-29 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - fractions should be saved as %d/%d, not tuple - -2005-11-28 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - fix syntax error - -2005-11-28 Andy Wingo - - * flumotion/component/producers/looper/looper.py - (Looper.__init__): - * flumotion/component/producers/videotest/videotest.py - (VideoTest.__init__): - * flumotion/component/producers/bttv/bttv.py (BTTV.__init__): - * flumotion/component/producers/firewire/firewire.py - (Firewire.__init__): - * flumotion/component/producers/webcam/webcam.py - (Webcam.__init__): Handle fraction framerate properly in 0.8 and - 0.9. - - * flumotion/component/encoders/jpeg/jpeg.xml: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/component/producers/webcam/webcam.xml: Framerate is - now a fraction. - - * flumotion/wizard/steps.py (fraction_from_float): New utility for - making fractions from floats given the denominator. - (TVCard.get_state, FireWire.get_state, Webcam.get_state) - (TestVideoSource.get_state, JPEG.get_state): Fractional - framerates. - - * flumotion/common/config.py - (FlumotionConfigXML._get_fraction_value): New property type - parser. - (FlumotionConfigXML._parseProperties): Add parser for fractions. - - * flumotion/test/test_config.py (TestConfig.testParseProperties): - Add a test for fraction-typed properties. - -2005-11-27 Thomas Vander Stichele - - * flumotion/component/producers/bttv/bttv.xml: - fix bttv depending on colorbalance effect - -2005-11-24 Andy Wingo - - * flumotion/component/encoders/theora/theora.py (Theora.__init__): - Whoops! - - * flumotion/component/producers/videotest/videotest.py - (VideoTest.__init__): Temporary hack for framerate, will fix later. - - * flumotion/component/producers/audiotest/audiotest.py - (AudioTest.__init__): audiotestsrc in 0.9. - - * flumotion/common/log.py (FluLogObserver.emit): Print tracebacks - at WARN now that the defer_generator tracebacks are not spamming - any more. - - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.__init__): entry = MultifdSinkStreamer - - * flumotion/component/consumers/disker/disker.xml: - * flumotion/component/consumers/disker/disker.py - (Disker.__init__): entry = Disker - - * flumotion/component/consumers/preview/preview.xml: - * flumotion/component/consumers/preview/preview.py - (Preview.__init__): entry = Preview - - * flumotion/component/muxers/ogg.py (Ogg.__init__): - * flumotion/component/muxers/multipart.py (Multipart.__init__): - * flumotion/component/muxers/muxers.xml: Add entry for Multipart, - ogg entry = Ogg - - * flumotion/component/encoders/jpeg/jpeg.xml: - * flumotion/component/encoders/jpeg/jpeg.py (JPEG.__init__): Added - entry XML node, entry = JPEG. Doesn't work now if framerate is - specified due to fractions. - - * flumotion/component/encoders/mulaw/mulaw.xml: - * flumotion/component/encoders/mulaw/mulaw.py (Mulaw.__init__): - Added entry XML node, entry = Mulaw - - * flumotion/component/encoders/smoke/smoke.xml: - * flumotion/component/encoders/smoke/smoke.py (Smoke.__init__): - Added entry XML node, entry = Smoke - - * flumotion/component/encoders/smoke/smoke.xml: - - * flumotion/component/encoders/speex/speex.xml: - * flumotion/component/encoders/speex/speex.py (Speex.__init__): - Added entry XML node, entry = Speex - - * flumotion/component/encoders/theora/theora.xml: - * flumotion/component/encoders/theora/theora.py (Theora.__init__): - entry = Theora, beautified - - * flumotion/component/encoders/vorbis/vorbis.xml: - * flumotion/component/encoders/vorbis/vorbis08.py: - * flumotion/component/encoders/vorbis/vorbis09.py: - * flumotion/component/encoders/vorbis/vorbis.py: entry = Vorbis - -2005-11-24 Thomas Vander Stichele - - * flumotion/worker/worker.py: - fix remote_checkElements() because element_factory_make now raises - when plug-ins are missing - -2005-11-24 Andy Wingo - - * flumotion/component/converters/overlay/overlay.xml: - * flumotion/component/converters/overlay/overlay.py - (Overlay.__init__): entry = Overlay - - * flumotion/component/converters/pipeline/pipeline.xml: - * flumotion/component/converters/pipeline/pipeline.py - (Converter.__init__): entry = Converter - -2005-11-18 Andy Wingo - - * flumotion/component/producers/firewire/firewire.py - (Firewire.__init__): - * flumotion/component/producers/soundcard/soundcard.py - (Soundcard.__init__): - * flumotion/component/producers/bttv/bttv.py (BTTV.__init__): - build fixes - - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/audiotest/audiotest.py - (AudioTest.__init__): entry = AudioTest - - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/bttv/bttv.py (BTTV.__init__): - entry = BTTV - - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/component/producers/firewire/firewire.py - (Firewire.__init__): entry = Firewire - - * flumotion/component/producers/looper/looper.xml: - * flumotion/component/producers/looper/looper.py - (Looper.__init__): entry = Looper - - * flumotion/component/producers/pipeline/pipeline.py - (Producer.__init__): entry = Producer - * flumotion/component/producers/pipeline/pipeline.xml: entry = - Producer - - * flumotion/component/producers/soundcard/soundcard.xml: entry = - Soundcard - * flumotion/component/producers/soundcard/soundcard.py - (SoundcardProducer.__init__): entry = Soundcard - - * flumotion/component/producers/webcam/webcam.py - (Webcam.__init__): Refactor so entry = Webcam - * flumotion/component/producers/webcam/webcam.xml: entry = Webcam - - * flumotion/component/producers/videotest/videotest.xml: Set the - class as the component entry point. - - * flumotion/component/producers/videotest/videotest.py - (VideoTest.__init__): Move createComponent code to __init__. This - is probably how all components should be done. - - * flumotion/manager/worker.py (WorkerAvatar.start): Pull the entry - point from the registry. - - * flumotion/component/producers/pipeline/pipeline.py - (Producer.__init__): Fix stupid errors - - * flumotion/common/log.py (theFluLogObserver): Make a singleton - normally. - - * flumotion/common/bundleclient.py (BundleLoader.getBundles): - Fool pychecker -- for some reason it doesn't like os at the - toplevel here. - - * flumotion/component/converters/pipeline/pipeline.py - (Converter.__init__): - * flumotion/component/producers/pipeline/pipeline.py - (Producer.__init__): - * flumotion/component/producers/soundcard/soundcard.py - (SoundcardProducer.__init__): Don't poke config['feed'], this is - not a property. - -2005-11-16 Edward Hervey - - * flumotion/component/producers/looper/looper.py: (createComponent): - Fix looper pipeline. - -2005-11-15 Edward Hervey - - * flumotion/component/producers/looper/looper.py: (Looper._message_cb): - so if we loop 1 000 000 000 times we end up playing one second less.... bad ! - -2005-11-15 Edward Hervey - - * configure.ac: - * flumotion/component/producers/Makefile.am - * flumotion/component/producers/looper/Makefile.am - * flumotion/component/producers/looper/__init__.py - * flumotion/component/producers/looper/looper.xml - * flumotion/component/producers/looper/looper.py: (createComponent): - Added looper element for ogg/vorbis/theora. Loops the entire file. - -2005-11-14 Michael Smith - - * flumotion/launch/main.py: - Make flumotion-launch work again by importing flumotion.configure - before using it. - -2005-11-13 Thomas Vander Stichele - - * flumotion/common/log.py: - make theFluLogObserver a singleton - add ignoreErrors and clearIgnores so we can ignore PB-related - tracebacks from trial - * flumotion/test/test_pb.py: - use these new methods to remove the stray prints - -2005-11-11 Thomas Vander Stichele - - * configure.ac: - * po/nl.po: - * po/no.po: - back to TRUNK - -=== release 0.1.10 === - -2005-11-11 Thomas Vander Stichele - - * configure.ac: releasing 0.1.10, "Rosa Negra" - -2005-11-11 Thomas Vander Stichele - - * flumotion/common/boot.py.in: - Don't offend our dear users - -2005-11-11 Thomas Vander Stichele - - * flumotion/manager/component.py: - remove print - -2005-11-11 Thomas Vander Stichele - - * flumotion/launch/inspect.py: - Fix flumotion-inspect with projects - -2005-11-11 Thomas Vander Stichele - - * flumotion/common/errors.py: - add a NoProjectError - * flumotion/project/project.py: - raise it - * flumotion/common/registry.py: - catch it - * flumotion/launch/main.py: - add some logging about projects - -2005-11-10 Julien MOUTTE - - * flumotion/component/feedcomponent.py: - give a warning when we can't parse pipeline - * flumotion/component/producers/webcam/webcam.py: - remove colorspace, and the double quotes that don't work in 0.8 - -2005-11-10 Thomas Vander Stichele - - * flumotion/component/producers/webcam/webcam.py: - make launch line pasteable - * flumotion/component/producers/webcam/webcam.xml: - fix dependency on colorbalance effect - -2005-11-10 Julien MOUTTE - - * flumotion/component/consumers/httpstreamer/resources.py: - set the broadcast Pragma for ASF streams - -2005-11-10 Julien MOUTTE - - * flumotion/common/log.py: - log the correct end of the stack - * flumotion/component/producers/firewire/firewire.xml: - add the dependency on the volume effect - * flumotion/job/job.py: - add a fixme - -2005-11-10 Michael Smith - - * flumotion/component/producers/videotest/videotest.xml: - Don't have 'wizard' as a dependency, since no such bundle exists. - Prevents a warning when using videotest admin interface. - -2005-11-10 Andy Wingo - - * flumotion/twisted/defer.py - (defer_generator.wrapper.with_saved_callbacks): whoops, call with - the right args - - * flumotion/test/test_defer.py (TestDefer.testExceptionChain): New - test, checks that chained errbacks work. Won't actually error if - the traceback-printing bug is hit, but you will see output. - - * flumotion/twisted/defer.py - (defer_generator.wrapper.with_saved_callbacks): New procedure, - executes its arguments with the deferred's callbacks set to what - they were in the beginning. A bit hacky but the rationale is in - the comments. - (defer_generator.wrapper.default_errback): Add errbacks from - within with_saved_callbacks. - - * flumotion/admin/text/view.py: Revert debugging commit. - -2005-11-10 Michael Smith - - * flumotion/component/feedcomponent09.py: - Return true from buffer probe callback; this avoids dropping crucial - caps buffers on the floor. - -2005-11-10 Thomas Vander Stichele - - * flumotion/common/package.py: - have a logCategory - * flumotion/job/job.py: - * flumotion/worker/worker.py: - add some debug - * flumotion/component/producers/soundcard/soundcard.xml: - fix the volume effect - -2005-11-10 Andy Wingo - - * flumotion/launch/main.py (main): Print feed ports for debugging - porpoises. - -2005-11-10 Thomas Vander Stichele - - * flumotion/worker/worker.py: - Fix logging in jobs by correctly passing the environment - -2005-11-09 Thomas Vander Stichele - - * flumotion/common/bundleclient.py: - Fix loading of glade files and other bundled files - -2005-11-09 Michael Smith - - * bin/Makefile.am: - * configure.ac: - * flumotion/admin/Makefile.am: - * flumotion/admin/text/Makefile.am: - * flumotion/admin/text/admin_text.py: - * flumotion/admin/text/connection.py: - * flumotion/admin/text/greeter.py: - * flumotion/admin/text/main.py: - * flumotion/admin/text/misc_curses.py: - * flumotion/admin/text/view.py: - * flumotion/component/base/Makefile.am: - * flumotion/component/base/base.xml: - * flumotion/component/consumers/disker/Makefile.am: - * flumotion/component/consumers/disker/disker.xml: - * flumotion/component/producers/videotest/Makefile.am: - * flumotion/component/producers/videotest/videotest.xml: - Text Admin! - Thanks a lot to Zaheer for pushing this through. - Still need to clean up deferred error handling for this to be usable - without modifications, though. - -2005-11-09 Andy Wingo - - * flumotion/worker/Makefile.am (flumotion_PYTHON): Remove job.py - - * configure.ac: Add job/Makefile - -2005-11-09 Thomas Vander Wingo - - * flumotion/job/job.py (JobMedium.remote_bootstrap): New remote - method, to be called before remote_start. - - * flumotion/job/Makefile.am: - * flumotion/job/__init__.py: - * flumotion/job/job.py: - * flumotion/job/main.py: New files, yay. job.py is what - flumotion.worker.job.py was. main.py is the code for the - flumotion-job main loop. - - * flumotion/worker/worker.py (WorkerMedium.remote_start): Don't - actually load the modules, just fetch the bundles and their paths. - Fix already-starting error detection. - (Kid.__init__): New field, bundles, the paths that the kid should - register. - (JobProcessProtocol): New class, lets the kindergarten know when a - process exits. - (Kindergarten.play): New option, bundles. Don't actually fork, - just call reactor.spawnProcess on flumotion-job. Fixes lots of - bugs. - (getSocketPath): Moved here from flumotion.worker.job. Should be - removed at some point, whereby workers communicate with jobs over - normal fd's. - (WorkerBrain.__init__): Don't set a sigchild handler, spawnProcess - does everything for us. - (WorkerBrain.keycard): New field; passed to jobs when - bootstrapping. - (JobAvatar.attached): Call 'bootstrap' on the job before calling - 'start'; allows the kid to register the necessary package paths, - and to receive credentials for logging into the manager. - (JobHeaven.getKeycard, JobHeaven.getWorkerName): Nice new methods, - retrieve properties from the worker brain. - - * flumotion/component/consumers/httpstreamer/http.xml: Add - resources.py to the bundle. - - * flumotion/component/base/admin_gtk.py (BaseAdminGtkNode.render): - Catch errors loading the glade file. - - * flumotion/component/converters/overlay/overlay.xml: Bundle up - genimg.py, the png files, and the font. - - * flumotion/common/bundleclient.py (BundleLoader.getBundles): - Change to return a list of (bundleName, bundlePath) tuples instead - of (bundleName, bundleSum). - (BundleLoader.loadModule, BundleLoader.getBundleByName) - (BundleLoader.getFile): - * flumotion/admin/admin.py (AdminModel.getEntry): Adapt to - getBundles change. - - * flumotion/twisted/defer.py - (defer_generator.wrapper.default_errback.print_traceback): Print - out what is printing this message. - - * flumotion/test/test_worker_worker.py (TestKid.testGetPid) - (TestKindergarten.testRemoveKidByPid): Adapt to worker.Kid() - constructor change. - - * Makefile.am (PYCHECKER_WHITELIST): Add flumotion/job to the - pychecker whitelist. - - * conf/workers/default.xml (feederports): Default to 20 free ports - so that by default you can enable all 6 consumers. - - * bin/flumotion-job.in: New executable, run by the worker instead - of having the worker fork. - - * configure.ac (AC_CONFIG_FILES): - * bin/Makefile.am (bin_SCRIPTS): Add flumotion-job. - -2005-11-08 Andy Wingo - - * flumotion/worker/job.py (run): Run reactor recursively. - (JobMedium.shutdown): Instead of cleanly exiting, do os._exit(0). - Temporary hack, partially reverts changeset 2412. - -2005-11-08 Thomas Vander Stichele - - * flumotion/component/feedcomponent09.py: - log first buffer's timestamp on tcpclientsrc to help - in debugging startup time - -2005-11-08 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - Implement restart component - -2005-11-08 Andy Wingo - - * flumotion/common/debug.py (print_stack): New function, prints a - backtrace with local variables. - - * flumotion/worker/job.py (JobClientFactory.login): Refactor a bit - of the login code. - - * flumotion/worker/job.py: Remove unused gobject import. - - * flumotion/component/encoders/vorbis/vorbis08.py - (Vorbis._start_feeders): No more notify-feed-ports. - - * flumotion/component/feedcomponent09.py (FeedComponent) - (FeedComponent.link): - * flumotion/component/feedcomponent08.py (FeedComponent) - (FeedComponent.link): No more notify-feed-ports. - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.__init__.on_component_notify_feed_ports): - Removed. - (FeedComponentMedium.__init__): Don't connect to - notify-feed-ports. - (FeedComponentMedium.__init__.on_feed_ready): Pass the port we - feed on, or None, instead of a boolean. - (ParseLaunchComponent.do_start): Redoc. - - * flumotion/manager/component.py - (ComponentAvatar.perspective_notifyFeedPorts) - (ComponentAvatar.perspective_feedReady): Combine two-stage - "notify-feed-ports then feed-ready" into a one-stage "feed-ready - with port" call. Removes some nice bugs. notifyFeedPorts is no - longer there. - (ComponentAvatar.perspective_log): Remove log method. used to be - used for sending all logging events to the manager, but that was - deemed too expensive months ago. A new logging framework would be - different anyway. - (ComponentAvatar.setFeederReadiness): Roll into - perspective_feedReady. - - * flumotion/component/consumers/disker/disker.py - (Disker.link_setup.feeder_state_change_cb): Fix borken refactor. - -2005-11-08 Thomas Vander Stichele - - * flumotion/common/bundleclient.py: - * flumotion/common/package.py: - * flumotion/worker/worker.py: - Register package paths without rebuilding every possible module; - should both work and be fast enough - -2005-11-07 Andy Wingo - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.pipe_template): Don't sync to timestamps in - 0.9. - - * flumotion/component/encoders/vorbis/vorbis08.py - (Vorbis._start_feeders): Emit notify-feed-ports before going to - playing -- prevents race conditions like the ones that were in - feedcomponent08.py. - - * flumotion/manager/manager.py (Dispatcher.requestAvatar): Better - debugging. - - * flumotion/component/component.py - (ComponentClientFactory.gotDeferredLogin.alreadyLoggedInErrback): - Punt on what the failure actually is... - - * flumotion/component/feedcomponent08.py (FeedComponent.link): Set - to paused, notify ports, then play. Fixes race condition between - component and manager. - - * flumotion/component/consumers/disker/disker.py - (Disker.pipe_template): Use a version-dependent pipeline. - - * flumotion/component/feedcomponent09.py - (FeedComponent.bus_watch_func): Move hacky feeder->feed munge - here... - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.__init__.on_feed_ready): ... from here. Fixes - 0.8 feed-ready notification. - - * flumotion/component/feedcomponent08.py - (FeedComponent.feeder_state_change_cb): Remove out of date - comment. - -2005-11-07 Julien MOUTTE - - * doc/man/flumotion-worker.1: Add example for feederports. - -2005-11-07 Thomas Vander Stichele - - * flumotion/worker/worker.py: - remove loading bundles for component until we fix CPU use - -2005-11-07 Andy Wingo - - * flumotion/component/consumers/disker/disker.py: Make it work - with 0.9. - - * flumotion/common/boot.py.in (init_gst): Fix version check. - (init_gst): Move the pygst_dir up to the front. - - * flumotion/manager/component.py - (ComponentAvatar._mindGetStateCallback): debugging. - (ComponentAvatar.perspective_notifyFeedPorts): Doc the argument - type. Actually implement. - (ComponentAvatar.start): Ignore the return value of calling start - on the component, rather choosing to wait for the notifyfeedports. - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.__init__.on_feed_ready) - (FeedComponentMedium.__init__.on_component_notify_feed_ports): - Hacks to make sure we callRemote with the right feeder names. The - feeder names *really* need to be canonicalized at some point - (feeder:foo:default vs foo:default vs default). - (ParseLaunchComponent.do_start): Document obsolete return value. - - * flumotion/component/component.py - (ComponentClientFactory.__init__): Clean some code that checks for - obsolete conditions. - - * flumotion/component/feedcomponent09.py (FeedComponent.link): - Pause the pipeline, notify the feed ports, and then set the - pipeline to playing. Should avoid race conditions with the ports - being ready. - (FeedComponent.bus_watch_func): Fix some feeder name checks. - - * flumotion/common/gstreamer.py (verbose_deep_notify_cb): Don't do - a g_idle_add so as to avoid bug #320886. - -2005-11-03 Andy Wingo - - * flumotion/component/component.py (BaseComponent): No more 'log' - signal. Nothing was emitting it. - (BaseComponentMedium.__init__): Don't try to connect to - component's log signal. - - * flumotion/worker/job.py (JobMedium._enable_core_dumps): Fix some - log typos. - (JobMedium.threads_init): Removed, obsolete. - (run): Reorganize try/except blocks. - - * flumotion/worker/job.py (run): Add some docs. - - * flumotion/worker/worker.py (JobAvatar.attached): Turned into a - defer generator method. Folded in _cb_afterInitial; no need to - call 'initial' on the job medium, as the options dict has all of - the necessary information. - - * flumotion/worker/job.py (JobMedium.__init__): Set manager host, - port, and transport directly from the options dictionary. - (JobMedium.remote_initial): No need for this any more. - - * flumotion/worker/worker.py (WorkerBrain.deferredStartCreate): - Throw ComponentAlreadyStartingError if appropriate instead of - returning None. - - * flumotion/common/errors.py (ComponentAlreadyStartingError): New - error, thrown when worker told to start a component but it's - already starting. - - * flumotion/worker/worker.py (WorkerBrain._SIGTERMHandler): Don't - set reactor.killed, the old sigterm handler will call - reactor.stop() which will trigger .killed to be set. - - * flumotion/worker/worker.py (WorkerMedium.remote_start): Comment - a bit. - - * flumotion/worker/main.py (main): Don't set reactor.killed, - that's handled by flumotion.twisted.compat.install_reactor(). - -2005-11-03 Thomas Vander Stichele - - * conf/managers/default/flows/ogg-test-theora.xml: - update for component rename - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/videotest/videotest.py: - for 0.8, make sure these GStreamer sources sync to the clock, - so they don't flood the CPU. - -2005-11-02 Andy Wingo - - * flumotion/common/log.py (scrubFilename): Whoops, pychecker - caught a bug. - - * flumotion/worker/worker.py (WorkerMedium.remote_start): Turned - into a defer generator method. Do a callLater right before forking - so that the stack won't have any reads in progress -- because - delayed calls are part of IReactorTime and read/writes are part of - IReactorFDSet, they are guaranteed(tm) not to interact. Fixes lots - of nastiness. - - * flumotion/common/debug.py (trace_start): Add ignore_files_re and - write optional arguments. - - * flumotion/component/component.py - (ComponentClientFactory.gotDeferredLogin.remoteDisconnected): - * flumotion/worker/worker.py - (WorkerClientFactory.gotDeferredLogin.remoteDisconnected): Know - when to hold em, know when to fold em. - - * flumotion/twisted/compat.py (install_reactor): Add an instance - variable, 'killed', that indicates whether a reactor is being - killed or not. Allows reconnecting factories to know when not to - warn. - - * flumotion/worker/job.py (run): Only profile if the FLU_PROFILE - environment variable was set. - - * flumotion/common/log.py (_handle.getFileLine): Don't extract the - whole stack, just work back frame by frame getting the information - we need. - -2005-11-02 Andy Wingo - - * flumotion/test/test_log.py: Update test suite. - - * flumotion/common/Makefile.am (flumotion_PYTHON): - * flumotion/common/debug.py: New module, exports trace_start() and - trace_stop() procedures. - - * flumotion/common/log.py (ERROR, WARN, INFO, DEBUG, LOG): New - integer values exported by the module. - (_levels, getLevel): Removed; levels are ints and not strings. - (getLevelName): New proc. Does type-checking on its input. Should - really have some nice decorators to check types. - (registerCategory): Adapted for the change to levels. - (_canShortcutLogging): New proc, returns True if no logging will - be performed for this category at this level. - (_handle): Make scrubFileName and getFileLine internal. Adapt to - level changes. Don't call getFileLine if not necessary. - (Loggable.error, Loggable.warning, Loggable.info, Loggable.debug) - (Loggable.log): if _canShortcutLogging(), avoid doing expensive - calculations. - (FluLogObserver.emit): Adapt to level changes. - (stderrHandler): Same. - -2005-10-31 Andy Wingo - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.__init__.on_feed_ready): The remote method is - feedReady, not notifyFeedPorts. - - * flumotion/component/feedcomponent09.py - (FeedComponent.bus_watch_func): Set to happy only from the global - pipeline state change message. Log a little less. - - * flumotion/worker/job.py (run): Profile the job if profiling is - available. Don't start another reactor; rely on worker.py - unwinding cleanly. - (JobMedium.shutdown): Don't os._exit(0), allow twisted to clean - itself properly. - - * flumotion/worker/worker.py (WorkerMedium.remote_start): Rework - to receive return values both from the parent and child process. - Now uses defer generators. - (Kindergarten.play): Return the pid or None like os.fork(). - - * flumotion/twisted/compat.py (install_reactor): Don't spawn - threads to resolve names with twisted 2.0. - -2005-10-27 Thomas Vander Stichele - - * flumotion/twisted/gtk2reactor.py: - replace _disconnectSelectable with code from 1.3 - -2005-10-27 Andy Wingo - - * flumotion/launch/main.py (ComponentWrapper.__init__): Work with - the 'source'-is-always-a-list change. - - * flumotion/component/producers/firewire/firewire.py - (createComponent): Throw a leaky queue after dv1394src, so that if - the sink starts blocking the buffers still have somewhere to go. - Otherwise the kernel starts complaining about every dropped iso - packet, overloading the system. - - * flumotion/component/converters/overlay/overlay.py - (Overlay.start): Don't rely on show_text or text being there. - - * flumotion/component/converters/overlay/overlay.xml: feed no - longer a required property. width and height are, for now -- - although really we should just get this info from the incoming - caps. - -2005-10-26 Andy Wingo - - * flumotion/common/config.py (FlumotionConfigXML._parseComponent): - Parse feeds and sources separately, in preparation for making them - not overlap with properties. config['source'] will now always be a - list. - (FlumotionConfigXML._parseFeeds) - (FlumotionConfigXML._parseSources): New functions dude. - - * flumotion/component/consumers/disker/disker.py - (Disker.__init__): - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.__init__): - * flumotion/component/consumers/preview/preview.py - (Preview.__init__): - * flumotion/component/encoders/jpeg/jpeg.py (createComponent): - * flumotion/component/encoders/mulaw/mulaw.py (createComponent): - * flumotion/component/encoders/smoke/smoke.py (createComponent): - * flumotion/component/encoders/speex/speex.py (createComponent): - * flumotion/component/encoders/theora/theora.py (createComponent): - * flumotion/component/encoders/vorbis/vorbis.py (createComponent): - * flumotion/component/converters/overlay/overlay.py - (createComponent): Adapt to work with config['source'] always - being a list. - - * flumotion/component/encoders/vorbis/vorbis08.py - (createComponent): Remove unused function. - - * flumotion/component/producers/webcam/webcam.xml: feed is not a - required property. - -2005-10-25 Andy Wingo - - * flumotion/launch/main.py (main): Remove print. - - * flumotion/twisted/Makefile.am (flumotion_PYTHON): Don't install - gstreactor.py... - - * flumotion/twisted/compat.py (install_reactor): Fix up to work - properly on both twisted 1.3 and 2.0. - - * flumotion/twisted/gstreactor.py: Remove, it's not necessary any - more. - - * flumotion/twisted/gtk2reactor.py: Backport from twisted 2.0. - Works both with and without gtk. - - * flumotion/twisted/gstreactor.py (GstReactor.run) - (GstReactor.crash, GstReactor.__init__): Attempt to make this - thing work with GStreamer 0.8 and 0.9. - - * flumotion/manager/main.py (main): - * flumotion/worker/main.py (main): Allow the environment to - override debugging levels in config files. Remove default=None, as - optparse already sets the default to None. - - * flumotion/component/feedcomponent09.py - (FeedComponent._setup_feeders): Check to see if all feeders have - ports assigned. - - * flumotion/launch/main.py: Rework to assign feeder ports to - feeders that are unconnected, like firewire. - -2005-10-21 Thomas Vander Stichele - - * flumotion.spec.in: - add some more commented-out config to the generated config files - -2005-10-21 Andy Wingo - - * flumotion/component/producers/audiotest/audiotest.xml: Add a - component entry. - -2005-10-20 Andy Wingo - - * flumotion/component/encoders/vorbis/vorbis.xml: Add component - entry. - - * flumotion/component/encoders/encoders.xml: Remove vorbis from - here. - - * flumotion/launch/main.py (main): Setup the package path - properly. - - * flumotion/launch/main.py (ComponentWrapper.__init__): If a - source is not required, don't error if it's not there. - (ComponentWrapper.__init__): Fix name error. - - * flumotion/component/producers/firewire/firewire.py - (createComponent): Fix the default height. - - * flumotion/launch/main.py (main): More cleanups, feeder/eater - verifications (with the goal being to get firewire to work) - - * flumotion/launch/main.py (main.mkfeedername): Verify that the - link is from a valid feeder. If no feeder is spefified, take the - first one in the list instead of 'default' (makes firewire work). - - * flumotion/common/registry.py (ComponentRegistry.dump): Save - eaters and feeders to the registry. Ak. - - * flumotion/manager/Makefile.am: - * flumotion/common/Makefile.am: Enable TAGS. - - * configure.ac: - * flumotion/component/converters/Makefile.am: - * flumotion/component/converters/pipeline/Makefile.am: - * flumotion/component/converters/pipeline/__init__.py: - * flumotion/component/converters/pipeline/pipeline.xml: - * flumotion/component/converters/pipeline/pipeline.py: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/pipeline/Makefile.am: - * flumotion/component/producers/pipeline/__init__.py: - * flumotion/component/producers/pipeline/pipeline.xml: - * flumotion/component/producers/pipeline/pipeline.py: Add somehing - like what was in flumotion.component.base as pipeline-producer and - pipeline-converter. Neat for testing. - - * flumotion/test/test.xml: Update to use the pipeline-producer and - pipeline-converter. - - * flumotion/test/test_manager_manager.py - (TestVishnu.testConfigBeforeWorker): Skip for now. No idea what's - going on, but I know the DAG is unused. - - * flumotion/component/producers/firewire/firewire.xml: Feed is not - a necessary property AFAICT. - - * flumotion/component/producers/bttv/bttv.py: Don't import - producer. - - * flumotion/component/component.xml: Remove converter.py and - producer.py from here too. What is this file up to? - - * flumotion/component/base/base.xml: - * flumotion/component/base/Makefile.am (component_PYTHON): - * flumotion/component/base/producer.py: - * flumotion/component/base/converter.py: Remove converter.py and - producer.py, they were not used anywhere. - - * flumotion/component/producers/firewire/firewire.xml: I don't - think the feed property is necessary. Removing it. - - * flumotion/component/consumers/preview/preview.py: Remove some - unnecessary includes. - - * configure.ac: - * flumotion/component/consumers/Makefile.am - * flumotion/component/consumers/preview/__init__.py: - * flumotion/component/consumers/preview/Makefile.am: - * flumotion/component/consumers/preview/preview.py: - - * flumotion/component/consumers/preview/preview.xml: New - component, allows you to preview what's happening in a stream. - Sortof. Mostly useful for flumotion-launch. - - * flumotion/launch/main.py: Support componentname.feeder/eater - links like gst-launch does. Actually works now, but only with - gstreamer 0.9 (0.8 deadlocks because it expects there to be - different processes, whereas 0.9 has threads). - - * flumotion/common/registry.py (RegistryEntryEntry.getModuleName): - New function. - - * flumotion/component/encoders/theora/theora.xml: Add a component - entry. - - * flumotion/component/encoders/encoders.xml: Don't list theora - here, it has its own xml. This xml file should probably go. - - * flumotion/component/muxers/muxers.xml: Add a component entry for - ogg-muxer. - -2005-10-19 Andy Wingo - - * flumotion/test/test_registry.py (TestComponentEntry.setUp): Fix - test suite. - - * All xml files updated with eaters and feeders. - - * flumotion/launch/inspect.py (main): Print out eaters and - feeders. - - * flumotion/common/registry.py (RegistryEntryComponent.__init__): - No more default args (lists as default args lead to bugs), add - args for eaters and feeders. - (RegistryEntryComponent.getEaters) - (RegistryEntryComponent.getFeeders): New API. - (RegistryParser._parseComponent, RegistryParser._parseEater) - (RegistryParser._parseFeeder): Parse and entries - in the registry. - -2005-10-18 Andy Wingo - - * flumotion/common/Makefile.am (flumotion_PYTHON): Dist boot.py. - - * configure.ac: Make scripts executable from configure time. - - * bin/flumotion-launch.in: - * flumotion/launch/main.py: Something like gst-launch for - components, as yet unfinished. - - * bin/flumotion-inspect.in: - * flumotion/launch/inspect.py: New files implementing something - like gst-inspect for components. - - * flumotion/manager/manager.py (Vishnu.__init__): Use - ComponentRegistry.makeBundlerBasket() instead of rolling it - ourselves. - - * flumotion/common/registry.py - (ComponentRegistry.makeBundlerBasket): New method, takes a - registry and returns a bundler basket populated by the bundles in - the registry. - - * common/gendoc.py: Use flumotion.common.boot to init the right - pygtk and gst-python. - - * flumotion/common/boot.py (init_gst): Better error. - - * flumotion/component/producers/firewire/firewire.py - (createComponent): Conditionally create different pipeline for - 0.9. Re-enable volume effect for 0.8. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.__init__): Pacify the pychecker. - -2005-10-17 Andy Wingo - - * flumotion/component/converters/overlay/overlay.py - (createComponent): Update for 0.9. - -2005-10-13 Michael Smith - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - Use burst_on_connect option from configuration, since we helpfully - allow setting it. - Fix logic for max fds. - -2005-10-12 Andy Wingo - - * flumotion/component/feedcomponent09.py - (FeedComponent.pipeline_stop): Whoops, fix C thinko dinko. - - * flumotion/component/producers/firewire/firewire.py - (createComponent): Don't add volume for now. This is a fixme. - - * flumotion/component/producers/firewire/firewire.xml: Add bundle - for firewire component. - - * flumotion/component/consumers/httpstreamer/resources.py - (HTTPStreamingResource.maxAllowedClients): Fix syntax error. - - * flumotion/component/feedcomponent09.py - (FeedComponent.pipeline_stop, FeedComponent.link): State API - updates. - -2005-10-07 Michael Smith - - * flumotion/component/consumers/httpstreamer/resources.py: - Clamp max clients (if set) to rlimit for open fds minus our - 'reserve_fds' - -2005-10-07 Andy Wingo - - * flumotion/component/encoders/vorbis/vorbis09.py - (Vorbis.__init__.buffer_probe): s/filter-caps/caps/. - -2005-10-05 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - make sure boot.py gets built - -2005-09-30 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - fix on_feed_ready prototype that probably got broken during - the 08/09 merge. weird. - -2005-09-29 Andy Wingo - - * flumotion/worker/checks/video09.py (BusResolution.cleanup) - (do_element_check): Updates for bus API. - - * flumotion/component/producers/soundcard/soundcard.py - (createComponent): Less needless fixation for the 0.9 code. - - * flumotion/component/feedcomponent09.py - (FeedComponent.setup_pipeline, FeedComponent.cleanup): Updates for - bus API. - (FeedComponent.bus_watch_func): Don't emit nonexistent signal. - -2005-09-28 Michael Smith - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - Treat ConnectionFailed differently depending on whether we've ever - been connected before. This allows us sensible behaviour when - initially logging in, but restores auto-reconnect behaviour that I - broke. - -2005-09-28 Andy Wingo - - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/videotest/videotest.py - (createComponent): Add is-live to the pipeline when using gst 0.9. - -2005-09-27 Thomas Vander Stichele - - * flumotion/component/encoders/Makefile.am: - fix disting - * po/nl.po: - * po/no.po: - update line numbers - -2005-09-27 Andy Wingo - - * flumotion/worker/checks/video09.py (do_element_check): Update - for api changes. - - * flumotion/component/producers/soundcard/soundcard.py - (createComponent): Beginnings of 0.9 compat.. - - * flumotion/component/producers/soundcard/soundcard.xml: Cleanups. - - * flumotion/component/feedcomponent09.py - (FeedComponent.FEEDER_TMPL): tcpserversink sync=false, because the - sources already sync to clocks. - - * flumotion/component/producers/audiotest/audiotest.py - (createComponent): s/sync/is-live/. - -2005-09-24 Thomas Vander Stichele - - * flumotion/ui/fgtk.py: - further cleanup, get tick marks perfect - -2005-09-23 Thomas Vander Stichele - - * flumotion/component/producers/soundcard/soundcard.xml: - bundle up soundcard component - * flumotion/ui/fgtk.py: - remove a bunch of code by using a table and loop - -2005-09-22 Thomas Vander Stichele - - * flumotion/common/errors.py: - * flumotion/wizard/steps.py: - * flumotion/worker/checks/video08.py: - * flumotion/worker/checks/video09.py: - have GStreamerError be a generic, string-taking error, - while GstError is an exception wrapper around gst.Error - -2005-09-22 Thomas Vander Stichele - - * flumotion/twisted/defer.py: - * flumotion/worker/checks/video08.py: - * flumotion/worker/checks/video09.py: - factor out a Resolution class and use it in the - checks - -2005-09-22 Thomas Vander Stichele - - * flumotion/common/errors.py: - add a state change gst error - * flumotion/common/log.py: - log warnings that don't have a traceback - -2005-09-22 Andy Wingo - - * tests/vorbis.py (buffer_probe): Use the right format, poll for - the right thingy. Vorbis encoding works! - - * flumotion/component/encoders/vorbis/vorbis09.py - (Vorbis.__init__.buffer_probe): Use the right format. - -2005-09-21 Andy Wingo - - * flumotion/test/test_common_gstreamer.py (DeepNotify): Fix up for - 0.9. - - * flumotion/test/test_common_gstreamer.py (BinFindSink) - * flumotion/common/gstreamer.py (bin_find_sinks): Removed, it - wasn't used, and also isn't yet supported in 0.9. - - * flumotion/component/producers/jukebox/Makefile.am - (component_PYTHON): - * flumotion/component/encoders/Makefile.am (vorbis_PYTHON): Fix up - makefiles. - - * flumotion/component/producers/jukebox/jukebox08.py: Moved here - from jukebox.py, so that it only gets checked for gstreamer 0.8. - - * flumotion/component/producers/jukebox/jukebox.xml: Updated to - use new entry point; hopefully works. - - * flumotion/wizard/steps.py (Vorbis.worker_changed): Check the - right element. - - * flumotion/admin/gtk/client.py - (Window.admin_connection_failed_later): Use correct parent - argument. - - * flumotion/component/encoders/vorbis/vorbis.xml: Add files. - - * flumotion/component/encoders/vorbis/vorbis09.py: New file, - simple and nonfunctional. - - * flumotion/component/encoders/vorbis/vorbis.py: Selectively - import the 0.8 or 0.9 versions of the Vorbis class. - - * tests/vorbis.py: New test case, not part of the test suite. But - fails nonetheless. - - * flumotion/component/encoders/vorbis/vorbis08.py: The guts of the - 0.8 vorbis encoder are here. - - * flumotion/component/encoders/vorbis/vorbisutils.py - (get_max_sample_rate): Pulled out into its own file. - - * flumotion/component/feedcomponent09.py - (FeedComponent.setup_pipeline): Fix for new bus API. - -2005-09-19 Thomas Vander Stichele - - * flumotion/twisted/gtk2reactor.py: - work with twisted 1.3 and 2.0 - -2005-09-19 Andy Wingo - - * flumotion/component/feedcomponent09.py (FeedComponent.stop): - Don't cleanup without a pipeline. - - * flumotion/common/compat.py (type_register): Attempt the fourth - at getting this working properly. - - * flumotion/component/feedcomponent09.py (FeedComponent): Port to - GStreamer 0.9. Mostly copied over from the branch. - - * flumotion/component/component.xml: Add the versioned - feedcomponent files. - - * flumotion/component/consumers/httpstreamer/http.py - (MultifdSinkStreamer.link_setup.sink_state_change_cb): Only wait - for the state change in 0.8. - - * flumotion/component/muxers/multipart.py (createComponent): - * flumotion/component/muxers/ogg.py (createComponent): No {} - threads in 0.9. - - * flumotion/component/component.py (BaseComponent.updateMood): - Removed, unnecessary as a base class method. Subclasses should - just use setMood, which can't change a component out of sad - anyway. - - * flumotion/component/feedcomponent09.py (FeedComponent.__init__): - * flumotion/component/feedcomponent08.py (FeedComponent.__init__): - State has no 'eaterNames' key anymore. - - * flumotion/common/compat.py (type_register): Indentation and - style fixes. Also, it works now. - - * flumotion/component/feedcomponent09.py (FeedComponent): New - file, FeedComponent ported over from the 0.9 branch. Not - completely ported yet. - - * flumotion/component/Makefile.am (component_PYTHON): Add new - files. - - * flumotion/component/feedcomponent.py: Import the appropriate - version of FeedComponent. - - * flumotion/component/feedcomponent08.py (FeedComponent): Moved - here from feedcomponent.py. - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.__init__): Inline the handlers listening to - signals from the component. Don't futz the component's mood or - state, assume that the component handles that. - (FeedComponent._pipeline_error_cb): Set mood to sad, add message - to component state. - -2005-09-16 Andy Wingo - - * Changelog updated. Heh heh heh heh heh heh. - - * flumotion/common/gstreamer.py (get_plugin_version): Ignore - module attribute references in this file. Requires latest - pychecker CVS plus a patch in their tracker. Make check passes! - - * flumotion/common/boot.py.in (boot): Commit the non-generated - file, doh.... - - * misc/pycheckerhelp.py: Use boot.py. - - * Makefile.am (PYCHECKER_BLACKLIST): Ignore spyglass.py, until - it's ported at least. - - * flumotion/common/gstreamer.py (get_plugin_version): Work in - either gst version. - - * common/pychecker.mk: Fix up to separate gst-independent tests, - gst 0.8 tests, and gst 0.9 tests. - - * flumotion/common/boot.py (init_gst, init_gobject): Make public. - - * flumotion/worker/checks/video.py: Um.... - - * flumotion/worker/checks/video09.py: No need to import re - - * misc/pycheckerrc: Emacs friendly - - * common/pychecker.mk: Cleanup, preparation for some haxoring. - -2005-09-16 Michael Smith - - * flumotion/common/compat.py: - Get pygtk version from gobject, not gtk, to avoid importing gtk - (which could fail if there's no X server). Thanks to Zaheer for the - fix. - -2005-09-15 Thomas Vander Stichele - - * flumotion/common/log.py: - add another helper. relegate twisted logging to level 5 by - default, I got tired of the spew. But error tracebacks are - still at level 4 - * pkgconfig/flumotion-uninstalled.pc.in: - * pkgconfig/flumotion.pc.in: - fix for now to use an existing symbol, but hm. needs work. - -2005-09-15 Thomas Vander Stichele - - * flumotion/common/log.py: - add some nice helper methods to log failures. Add a cool - simple errback handler to objects, I feel fuzzy now. - -2005-09-12 Michael Smith - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/connections.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/parts.py: - * flumotion/admin/gtk/spyglass.py: - * flumotion/admin/gtk/videotest.py: - * flumotion/admin/gtk/wizard.py: - * flumotion/common/compat.py: - * flumotion/component/component.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/feedcomponent.py: - * flumotion/test/test_common_pygobject.py: - * flumotion/tester/httpclient.py: - * flumotion/ui/fgtk.py: - * flumotion/ui/glade.py: - * flumotion/wizard/sidebar.py: - * flumotion/wizard/wizard.py: - * flumotion/wizard/worker.py: - Another attempt to get rid of loud gobject deprecation warnings by - adding a compat package and checking pygtk version in there. - Call through this for everything that does gobject.type_register(). - Doesn't work properly, since our __gsignals__ attribute is strangely - missing. - -2005-09-13 Andy Wingo - - * flumotion/wizard/steps.py (Overlay.get_state): Tell the saver - whether or not we can overlay. - (Overlay.worker_changed_08): Moved from worker_changed. - (Overlay.worker_changed_09): Copied over from the 0.9 branch. - Doesn't actually require the elements, which is nice considering - pngdec and videomixer are not ported. - (Overlay.worker_changed): Voodoo. - - * flumotion/wizard/save.py (WizardSaver.handleVideo): Only - configure an overlay if the checks passed. - - * flumotion/worker/checks/video.py: Voodoo to include the right - version of the worker checks. - - * flumotion/worker/checks/video09.py: Copied from the gstreamer - 0.9 branch. - * flumotion/worker/checks/video08.py: Copied from the old - video.py. - - * flumotion/worker/checks/package.xml: - * flumotion/worker/checks/Makefile.am (flumotion_PYTHON): Add new - files. - - * bin/flumotion-admin.in: Convert to the new boot code. - - * flumotion/common/boot.py.in (_init_gst): Add some helpful - debugging. - - * flumotion/common/gstreamer.py (verbose_deep_notify_cb): Marshal - all logging to the main thread. - - * configure.ac: Don't try to import gtk.glade if DISPLAY is unset. - -2005-09-12 Andy Wingo - - * flumotion/twisted/compat.py (install_reactor): Take an optional - argument gtk, which if True will try to load the gtk2reactor - instead of the normal glib/gst ones. - - * configure.ac: s/REQ_0X/0X_REQ/, subst variables properly. - - * flumotion/common/boot.py.in: New file, factors out the - initialization code that was in the manager and worker scripts. - Enhanced to choose pygst version at runtime based on the - FLU_GST_VERSION environment variable. - - * bin/flumotion-worker.in: - * bin/flumotion-manager.in: Use flumotion.common.boot. - - * flumotion/common/Makefile.am (nodist_flumotion_PYTHON) - (EXTRA_DIST): Makefile rules so as to install boot.py but ship - only boot.py.in. - - * configure.ac: Some logic fixes and robusticization for checking - for the different versions of gst-python. - - * common/as-python.m4: Print more useful messages if importing the - module or the checks cause a random assertion to be raised. - - * configure.ac: Use AS_LIBTOOL_TAGS to avoid notices about - fortran. - - * common/Makefile.am (EXTRA_DIST): - * common/as-libtool-tags.m4: Slurp from GStreamer. - -2005-09-09 Thomas Vander Stichele - - * flumotion.spec.in: - add some commented out config params for reference - * flumotion/common/common.py: - * flumotion/common/medium.py: - * flumotion/test/Makefile.am: - * flumotion/test/common.py: - * flumotion/test/testclasses.py: - * flumotion/test/test_common_componentui.py: - * flumotion/test/test_flavors.py: - * flumotion/test/test_keycards.py: - break out our test classes to a separate module - so we can avoid having to import reactor this early - -2005-09-08 Andy Wingo - - * bin/flumotion.in: - * bin/flumotion-worker.in: - * bin/flumotion-manager.in: Hard-code to use the 0.8 values - detected in the configure script. - - * configure.ac: Check for both 0.8 and 0.9 versions of GStreamer - and gst-python. Bling. - - * flumotion/component/feedcomponent.py - (FeedComponent::feed-ready): Changed from feed-state-changed, now - just emits a boolean as to whether the feed is ready or not. - (FeedComponent.feeder_state_change_cb): Emit feed-ready as - appropriate. Don't set the component mood, it already did that - itself. - - * flumotion/manager/component.py: Don't import gstreamer. Woot! - (ComponentAvatar): Gone are _gstState, _gstOldState, dogs. - (ComponentAvatar.setFeederReadiness): Renamed from - checkFeederReadiness to ACT. Active functions. No more passivity. - (ComponentAvatar.start.startCallback): Api update. - (ComponentAvatar.perspective_feedReady): Changed from - feedStateChange. Api update. - - * flumotion/component/feedcomponent.py - (ParseLaunchComponent.do_start): Changed from start, don't chain - up. - - * flumotion/component/component.py (BaseComponent.start): Made not - a vmethod. Subclasses should override do_start. - (BaseComponent.do_start): Default implementation. - (BaseComponent.setMood): Fix typos. - - * flumotion/component/component.py (BaseComponent.setMood): Don't - let setMood work if we're in sad -- you have to restart to get out - of sad. - - * tests/checks.py: - * tests/debugslider.py: New files, ported over from the 0.9 - branch. Check the checker check check check. Is this thing on? - - * flumotion/component/feedcomponent.py - (FeedComponentMedium.remote_getState): Don't set - state['elementNames'], it's not necessary. - (FeedComponent.get_element_names): Removed, not used. - (FeedComponentMedium.remote_play) - (FeedComponentMedium.remote_pause): Removed, not used. - - * flumotion/component/producers/webcam/webcam.py - (createComponent): Add a colorspace to make ppc happy for rgb - formats. - - * flumotion/wizard/steps.py: Callers of check_elements updated. - - * flumotion/wizard/wizard.py (Wizard.check_elements): Changed to - just return a deferred with the missing elements, not to post - errors. - (Wizard.require_elements): This is what old callers of - check_elements want to call. - - * flumotion/test/test_common_package.py (TestPackagePath.setUp): - Initialize _assertions properly. - - * common/as-python.m4 (AS_PYTHON_IMPORT): Take an optional fourth - argument, PREAMBLE, to do e.g. pygst.require(). Take an optional - fifth argument, POSTAMBLE, to run code after the import. - -2005-09-08 Andy Wingo - - * Makefile.am (AUTOMAKE_OPTIONS): Reorder options so as to give - the user a nicer error. - -2005-09-07 Michael Smith - - * flumotion/admin/gtk/client.py: - Make admin_connection_failed_cb take the correct number of - arguments. Fixes some remaining parts of bug 273. - -2005-09-07 Michael Smith - - * flumotion/admin/admin.py: - Handle ConnectionRefusedError when attempting admin login, - fixes bug 266. - -2005-09-06 Michael Smith - - * flumotion/worker/worker.py: - When dumping a core, print out os.getcwd(), so we can tell users - where to find core dumps when they send us logs. - -2005-08-29 Michael Smith - - * flumotion/common/common.py: - Look for LANGUAGE env var before checking LANG, makes translations - work on my ubuntu system. - -2005-08-26 Thomas Vander Stichele - - * flumotion/common/package.py: - reverse order of fixing up so we go from submodules to parent - packages - -2005-08-26 Thomas Vander Stichele - - * common/epydoc.mk: - don't need PYGTK in there - it messes up our path and throws in - gst from installed packages - -2005-08-17 Thomas Vander Stichele - - * common/trial.mk: - use PIPESTATUS so we can run, output to terminal, output to file, - and get exitstatus all at once ! I love the internet. - * common/Makefile.am: - * common/epydoc.mk: - * common/gendoc.py: - extract doc generation stuff into something we can use from projects - * doc/reference/Makefile.am: - use it - -2005-08-11 Thomas Vander Stichele - - * tests/ComponentsView.py: - make test work again - -2005-08-11 Thomas Vander Stichele - - * flumotion/component/base/base.xml: - * flumotion/component/component.xml: - put converter and producer base compnents in bundles - -2005-08-10 Thomas Vander Stichele - - * flumotion/component/encoders/vorbis/vorbis.py: - style fixes - * configure.ac: - * flumotion/component/component.py: - * flumotion/component/feedcomponent.py: - * flumotion/manager/component.py: - some debugging fixes - make component be sleeping when it logs out - * flumotion/component/producers/jukebox/Makefile.am: - * flumotion/component/producers/jukebox/__init__.py: - * flumotion/component/producers/jukebox/jukebox.py: - * flumotion/component/producers/jukebox/jukebox.xml: - a new audio jukebox component, using gst-python > 0.8.2 - and the extend module - -2005-08-10 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - push FEEDER and EATER templates down to FeedComponent - * flumotion/component/encoders/vorbis/vorbis.py: - use FeedComponent's templates, don't create tcp stuff on our own - * flumotion/test/test_component.py: - fix tests for new way of handling templates - * flumotion/manager/manager.py: - make a component SAD if it didn't start up correctly - -2005-08-08 Thomas Vander Stichele - - * flumotion/test/test_component.py: - remove accidental commit of part of [2281] - -2005-08-08 Thomas Vander Stichele - - * flumotion/test/Makefile.am: - dist parts of the test dir so other projects can build on it - -2005-08-03 Michael Smith - - * flumotion/component/converters/overlay/genimg.py: - Don't import PIL at top-level, instead defer this until we actually - run the generate_overlay() function. Avoids crash in theoraenc due - to clashing symbols, since with this we never dlopen() the clashing - libraries in the same process. - -2005-08-01 Michael Smith - - * flumotion/component/base/admin_gtk.py: - Use errors.NoBundleError rather than BundleError. This means we - catch the exception here, so it's non-fatal. - -2005-07-31 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - * flumotion/wizard/message.py: - translate more - * flumotion/worker/checks/video.py: - mark for translation without translating - * po/POTFILES.in: - * po/nl.po: - * po/no.po: - translation updates - -2005-07-31 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - set up translations for BaseAdminGtk in setup() - -2005-07-30 Thomas Vander Stichele - - * flumotion/common/bundleclient.py: - add some more logging, there's one corner case where - __path__ seems to be cleared and it's not clear to me if it's a bug - reverse order of registering package path from lowest dep to - highest - * flumotion/common/common.py: - add a gettexter method that returns a _ callable for a domain - * flumotion/admin/admin.py: - * flumotion/common/package.py: - * flumotion/component/base/admin_gtk.py: - load glade file automatically if glade_file is set - add a haveWidgetTree method to be subclassed - have render() load the gladefile on its own - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - remove render, implement haveWidgetTree - -2005-07-30 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - go back to using a dict since twisted.python.util.OrderedDict - exists - * flumotion/component/base/admin_gtk.py: - make nodes a public member, getNodes an accessor, and use - OrderedDict - * flumotion/component/producers/videotest/admin_gtk.py: - give title and use .nodes - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * po/POTFILES.in: - * po/nl.po: - * po/no.po: - translate some more - -2005-07-30 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - * flumotion/component/base/admin_gtk.py: - change getNodes to need to return a list instead of a dict - so the order is defined by the component, and not chance - add an on-the-fly conversion from dict to list so stuff - keeps working until things get fixed up - -2005-07-30 Thomas Vander Stichele - - * flumotion/admin/admin.py: - use bundleclient instead of unbundler - * flumotion/admin/gtk/client.py: - add a debug to show that the admin really is handling NoBundleError - * flumotion/common/bundleclient.py: - make getBundle also registerPackagePath - add getFile method - * flumotion/component/base/admin_gtk.py: - use bundleLoader - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - now that we use deferreds to get glade files, stats can arrive - before the widget tree is loaded; so save them temporarily - * flumotion/worker/worker.py: - remove bundleloader - -2005-07-30 Thomas Vander Stichele - - * flumotion/common/bundleclient.py: - * flumotion/common/medium.py: - * flumotion/worker/worker.py: - clean up bundleclient code further - -2005-07-29 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - localize display of clients peak time - -2005-07-29 Thomas Vander Stichele - - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/component/producers/videotest/videotest.xml: - fix video test by putting wizard enums in a bundle - * flumotion/wizard/enums.py: - * po/POTFILES.in: - * po/nl.po: - * po/no.po: - add more translation - -2005-07-29 Thomas Vander Stichele - - * flumotion/admin/gtk/parts.py: - * po/POTFILES.in: - * po/nl.po: - more translation - -2005-07-29 Thomas Vander Stichele - - * common/gen-locale-xml.py: - * common/locale.mk: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - * flumotion/admin/gtk/main.py: - change so that we use localedatadir instead of localedir - * flumotion/common/bundleclient.py: - import os again, it's really needed - * flumotion/common/registry.py: - add "under" keyword for bundle to choose a dir to be found under - change getProjectBase to getBaseDir - * flumotion/component/converters/overlay/overlay.xml: - create a bundle for the overlay - * flumotion/manager/manager.py: - use getBaseDir - also try to fix registry if a file is missing from disk - -2005-07-29 Thomas Vander Stichele - - * Makefile.am: - * common/Makefile.am: - * common/common.mk: - * data/glade/Makefile.am: - * flumotion.spec.in: - * po/POTFILES.in: - * po/nl.po: - various distcheck and spec fixes - -2005-07-29 Thomas Vander Stichele - - * common/gen-locale-xml.py: - script to generate locale registry files - * common/locale.mk: - Makefile rules for i18n - * autogen.sh: - add autopoint - * configure.ac: - add gettext - * Makefile.am: - add po directory - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - add localedir - * flumotion/common/common.py: - add getLL() - * flumotion/common/bundleclient.py: - create a getBundles() generator method, we still need to convert - parts to use bundleclient.py though - * flumotion/admin/admin.py: - fix for new getBundleSums call - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/client.py: - mark strings for translation - * flumotion/admin/gtk/main.py: - set up translation domains - * flumotion/component/base/admin_gtk.py: - add a domain property to load gload files under - * flumotion/component/consumers/httpstreamer/http.glade: - fix for translation - * flumotion/project/Makefile.am: - add project files - * flumotion/manager/base.py: - make arguments consistent for perspective_getBundleSums - * flumotion/manager/manager.py: - make sure we only try rebuilding registry once on errors - * po/Makevars: - * po/LINGUAS: - * po/POTFILES.in: - * po/nl.po: - add translation files and a dutch translation - -2005-07-29 Thomas Vander Stichele - - * data/glade/open-connection.glade: - * data/glade/videotest.glade: - * data/glade/wizard.glade: - * data/glade/wizard_audiotest.glade: - * data/glade/wizard_disk.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_http.glade: - * data/glade/wizard_jpeg.glade: - * data/glade/wizard_license.glade: - * data/glade/wizard_overlay.glade: - * data/glade/wizard_overview.glade: - * data/glade/wizard_smoke.glade: - * data/glade/wizard_soundcard.glade: - * data/glade/wizard_testsource.glade: - * data/glade/wizard_tvcard.glade: - * data/glade/wizard_webcam.glade: - preparations for translation - -2005-07-27 Thomas Vander Stichele - - * Makefile.am: - * common/common.mk: - rearrange coverage stuff so we can use it in other parts - * flumotion/component/base/admin_gtk.py: - * flumotion/test/gtkunit.py: - add a class to subclass from for gtk unit tests - -2005-07-27 Thomas Vander Stichele - - * common/Makefile.am: - * common/trial.mk: - * flumotion/test/Makefile.am: - extract the trial stuff in an .mk file so we can share it - -2005-07-27 Thomas Vander Stichele - - * flumotion/common/bundleclient.py: - * flumotion/common/registry.py: - * flumotion/component/encoders/Makefile.am: - * flumotion/component/encoders/jpeg/jpeg.xml: - * flumotion/component/encoders/mulaw/mulaw.xml: - * flumotion/component/encoders/smoke/smoke.xml: - * flumotion/component/encoders/speex/speex.xml: - * flumotion/component/encoders/theora/theora.xml: - * flumotion/component/encoders/vorbis/vorbis.xml: - * flumotion/component/muxers/muxers.xml: - * flumotion/manager/manager.py: - * flumotion/worker/worker.py: - and now all components are run from bundles ! - which turned up the fact that we didn't bundle all our components. - So if some components don't work, let me know so I can bundle them. - -2005-07-26 Thomas Vander Stichele - - * flumotion/component/encoders/Makefile.am: - * flumotion/component/encoders/encoders.xml: - * flumotion/component/encoders/jpeg.py: - * flumotion/component/encoders/mulaw.py: - * flumotion/component/encoders/smoke.py: - * flumotion/component/encoders/speex.py: - * flumotion/component/encoders/theora.py: - * flumotion/component/encoders/vorbis.py: - move encoders to their own subdir before we add admin_gtk's - -2005-07-26 Thomas Vander Stichele - - * flumotion/manager/worker.py: - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_worker_worker.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - el workero no necesita un registro, oye ! - fixes #129 - -2005-07-26 Thomas Vander Stichele - - * flumotion/manager/manager.py: - * flumotion/worker/job.py: - work towards not needing the registry in the worker by moving - up the registry necessity in the API callchain - -2005-07-26 Thomas Vander Stichele - - * flumotion/common/registry.py: - * flumotion/common/setup.py: - s/FLU_REGISTRY_PATH/FLU_PROJECT_PATH/g - -2005-07-26 Thomas Vander Stichele - - * configure.ac: - * flumotion/project/Makefile.am: - * flumotion/project/__init__.py: - * flumotion/project/project.py: - * flumotion/Makefile.am: - adding a flumotion.project where add-on projects will put their - project files - * flumotion/common/package.py: - * flumotion/test/test_common_package.py: - create a new module for the packager and package registration - * flumotion/test/test_common.py: - * flumotion/common/common.py: - move code for package registering to new module - give UNIXAddress a localhost as host - * flumotion/common/setup.py: - add a setupPackagePath method that parses the env var for - additional projects - * flumotion/common/bundleclient.py: - use the new packager to register package paths - * flumotion/common/config.py: - doc fixes - * flumotion/common/registry.py: - add "project" attribute to entries; add API for it - add "prefix" argument to API for directories - fixes to make sure registry only gets rebuilt when needed - add some whitespace to registry output - * flumotion/admin/admin.py: - use new packager - * flumotion/component/base/admin_gtk.py: - add getWidget(), and set widget tree on loading glade file - * flumotion/manager/main.py: - give a list of projects loaded into flumotion in debug log - * flumotion/manager/manager.py: - get bundles from correct project base - * flumotion/test/test_registry.py: - add 'project' tags to test - -2005-07-26 Thomas Vander Stichele - - * bin/flumotion-admin.in: - don't remove __path__ because it won't play nice with our - new package stuff - * flumotion/common/medium.py: - rearrange a piece of code - * flumotion/worker/job.py: - comment out a piece of code that doesn't seem to be used in - preparation of all workers executing jobs from bundles - -2005-07-26 Thomas Vander Stichele - - * configure.ac: - back to trunk - -=== release 0.1.9 === - -2005-07-25 Thomas Vander Stichele - - * configure.ac: - releasing 0.1.9, "Zahara" - -2005-07-25 Thomas Vander Stichele - - * data/glade/authenticate.glade: - fix an assertion for grab_focus because the window was not - visible. I'm pretty sure though that having grab_focus on the - auth combo box isn't actually useful; it's done when a) the widget - is not yet in a window and b) later on the focus is set to the - username. But, like, whatever. - -2005-07-25 Thomas Vander Stichele - - * data/glade/admin.glade: - change label for help_about back to gtk-about; - while it doesn't work with old GTK, it does the - right thing with recent GTK's - -2005-07-23 Thomas Vander Stichele - - * flumotion/test/test_common.py: - refactor tests a little - -2005-07-22 Thomas Vander Stichele - - * flumotion/test/Makefile.am: - don't use tee, since then a failing trial gets lost - * flumotion/test/test_config.py: - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_registry.py: - fix up for new getRegistry()/parse() behaviour - * flumotion/test/test_parts.py: - get rid of a gtk warning - -2005-07-22 Thomas Vander Stichele - - * bin/flumotion-manager.in: - * bin/flumotion-worker.in: - * flumotion/common/config.py: - * flumotion/common/registry.py: - * flumotion/manager/admin.py: - * flumotion/manager/manager.py: - * flumotion/worker/config.py: - * flumotion/worker/job.py: - rework registry code so that - - internal API is marked as such - - for manager config files, initially only parts of the - .manager object are filled in that don't require the registry - This allows for registry parsing to be loggable and debuggable - since it now happens after setting the appropriate debug level. - I may be on crack. - -2005-07-22 Thomas Vander Stichele - - * flumotion/manager/manager.py: - error out when we couldn't find a file to add to a bundle - -2005-07-22 Thomas Vander Stichele - - Patch by: Gergely Nagy - - * flumotion/admin/gtk/client.py: - fix #236: prompt when possibly overwriting exported config - -2005-07-22 Thomas Vander Stichele - - * data/glade/wizard_disk.glade: - make disker ui show up again. Fixes #264. - -2005-07-21 Thomas Vander Stichele - - Patch by: Gergely Nagy - - * data/glade/wizard_http.glade: - * flumotion/wizard/steps.py: - fix issue #241: block forward when no mount point specified - -2005-07-21 Thomas Vander Stichele - - Patch by: Gergely Nagy - - * data/glade/wizard_consumption.glade: - * flumotion/wizard/steps.py: - fix issue #240: sensitivity of forward button on consumption page - -2005-07-21 Thomas Vander Stichele - - * flumotion/worker/job.py: - do the least amount necessary to have working worker shutdown - for both twisted 2.0 and twisted 1.3 - needs cleanup by refactoring components and cleanup properly - -2005-07-20 Thomas Vander Stichele - - * bin/flumotion-manager.in: - install correct manager here too - * flumotion/configure/configure.py: - increase timeouts a little - -2005-07-20 Thomas Vander Stichele - - * bin/flumotion-worker.in: - use twisted.compat to install the reactor - * flumotion/twisted/compat.py: - use the glib2reactor in twisted 2.0 - * flumotion/worker/worker.py: - don't ignore SIGINT, the reactor handles it nicely. - another step on the way to twisted 2.0 compat - -2005-07-19 Thomas Vander Stichele - - * common/python.mk: - disable our custom python install program for testing on FC4 - * flumotion/wizard/Makefile.am: - * flumotion/wizard/types.py: - * flumotion/wizard/wizard.py: - rename types to classes so it doesn't conflict with the standard - types module and break make install - -2005-07-15 Michael Smith - - * data/glade/admin.glade: - Change the 'gtk-about' menu item into a slightly more user-friendly - 'About' - * doc/man/flumotion-admin.1: - * doc/man/flumotion-manager.1: - * doc/man/flumotion-worker.1: - * flumotion/manager/main.py: - Manpage updates, explain multiple config files in flumotion-manager, - and fix the flumotion-manager usage message. - -2005-07-14 Thomas Vander Stichele - - * flumotion/admin/gtk/videotest.py: - * flumotion/manager/base.py: - * flumotion/manager/manager.py: - * flumotion/test/common.py: - * flumotion/test/test_common_componentui.py: - * flumotion/test/test_flavors.py: - * flumotion/test/test_http.py: - * flumotion/test/test_keycards.py: - * flumotion/test/test_pb.py: - * flumotion/test/test_twisted_compat.py: - * flumotion/test/test_worker_worker.py: - * flumotion/worker/worker.py: - fix test suite so that it completes with Twisted 2.0 - still need to look at some deprecation warnings though. - -2005-07-14 Thomas Vander Stichele - - * flumotion/test/common.py: - remove a sys.path hackery from jdahlin that escaped my autisticity - for far too long - * flumotion/test/test_flavors.py: - remove main call - -2005-07-14 Thomas Vander Stichele - - * flumotion/ui/glade.py: - use log.getExceptionMessage - -2005-07-14 Thomas Vander Stichele - - * flumotion/common/log.py: - * flumotion/worker/job.py: - factor out a log.getExceptionMessage so we can clean up - all cases where we try and give some useful info about exceptions - -2005-07-14 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - clean up broken admin client because of moved code - -2005-07-13 Thomas Vander Stichele - - * flumotion/test/Makefile.am: - make make check error out if it notices an import error - * flumotion/test/test_wizard.py: - * flumotion/wizard/worker.py: - skip some tests that now fail until Andy can look at them - -2005-07-13 Michael Smith - - * doc/man/flumotion-admin.1: - * doc/man/flumotion-manager.1: - * doc/man/flumotion-worker.1: - Add sections to all manpages on how to enable debugging, explaining - syntax, etc. - -2005-07-13 Michael Smith - - * doc/man/Makefile.am: - * doc/man/flumotion-admin.1: - * doc/man/flumotion-manager.1: - * doc/man/flumotion-worker.1: - Add more manpages, fix some typos in the manager page. - -2005-07-13 Thomas Vander Stichele - - * configure.ac: - * doc/Makefile.am: - * flumotion.spec.in: - install, dist and package the man page - -2005-07-13 Michael Smith - - * doc/man/flumotion-manager.1: Add a basic, incomplete manpage. - -2005-07-13 Thomas Vander Stichele - - * flumotion/common/log.py: - refactored logging a little, and fix #255 nicely by warning the user - at level 2 that there is a python traceback waiting for her at debug - level 4 if she's running below level 4 - -2005-07-13 Michael Smith - - * flumotion/manager/main.py: Process options that don't require a - planet configuration file before requiring one. - -2005-07-07 Andy Wingo - - * Makefile.am (PYCHECKER_BLACKLIST): Ignore gtk2reactor.py, it's - only for twisted 1.3 -- don't want it checking if we have 2.0. - - * flumotion/component/consumers/httpstreamer/resources.py: Try - twisted.web.interfaces first, seems twisted.protocols.interface is - deprecated. - -2005-07-07 Andy Wingo - - patch by: Zaheer Abbas Merali - - * flumotion/admin/Makefile.am: Dist new file. - - * flumotion/admin/connections.py: New file. - (get_recent_connections): Moved from - flumotion.admin.gtk.connections. - -2005-06-14 Andy Wingo - - * flumotion/component/component.py (BaseComponent._heartbeat): - Remove cpu logging message. - -2005-06-13 Andy Wingo - - * flumotion/component/effects/volume/volume.py - (Volume._level_changed_cb): Deal gracefully with inf's coming from - C. - - * flumotion/component/effects/volume/admin_gtk.py - (VolumeAdminGtkNode.volumeChanged): Clamp the property values to - the proper range to avoid nasty messages. - - * flumotion/admin/gtk/main.py (_runInterface): We're not yet in - the reactor if the greeter is killed, so we can't stop it just - yet. Use callLater(reactor.stop) instead. - - * flumotion/admin/admin.py (AdminClientFactory.gotDeferredLogin): - Get ConnectionFailedError and ConnectionRefusedError from the - right module. - - * flumotion/wizard/wizard.py (Wizard): No longer implements - IStateListener -- WorkerListModel does this. Change to not rebuild - the worker list all the time, instead just notifying when the page - changes. Fixes dynamic updating of the worker box as workers come - and go. Make an error message when no worker is available. - - * flumotion/wizard/worker.py (WorkerListStore): Take a - WorkerHeavenState instead of a list of workers, and listen to it - for changes. Add a ::changed signal for when workers are added or - removed. - (WorkerList.set_worker_heaven_state): Select a default worker, and - listen to changes on the model to keep a worker always selected. - Emit ::worker-selected(None) when all workers go away. - (WorkerList.select_worker): Only warn if we're not asking for a - default worker. - (WorkerList.notify_selected): New method, emits 'worker-selected' - for the current worker. - - * flumotion/admin/gtk/parts.py - (ComponentsView._add_columns.type_pid_datafunc) - (ComponentsView._add_columns.type_cpu_datafunc): Set cell renderer - property values instead of model values. Prevents 100% CPU - feedback. - - * flumotion/wizard/steps.py (FireWire.run_checks): Display an info - message while detecting the firewire device. - -2005-06-13 Thomas Vander Stichele - - * flumotion/ui/trayicon.py: - work when the .so file cannot be found as well - -2005-06-11 Thomas Vander Stichele - - * flumotion/common/common.py: - check also for UNIXAddress - * flumotion/common/errors.py: - * flumotion/common/config.py: - move ConfigError, still needs cleanup - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - catch unwritable log file error - * flumotion/worker/job.py: - pass through nice configerrors - * flumotion/manager/main.py: - make ERROR stand out some more - -2005-06-11 Thomas Vander Stichele - - * flumotion/component/bouncers/htpasswdcrypt.py: - raise ConfigError on IOError while reading htpasswd file - * flumotion/worker/job.py: - pass through config.ConfigError's - -2005-06-11 Thomas Vander Stichele - - * flumotion/common/medium.py: - * flumotion/twisted/defer.py: - * flumotion/worker/job.py: - final cleanups, createComponent now will tell us what is wrong - -2005-06-11 Thomas Vander Stichele - - * flumotion/twisted/defer.py: - * flumotion/common/medium.py: - * flumotion/manager/main.py: - move "import traceback" to top, so it doesn't mess up stack - * flumotion/component/bouncers/htpasswdcrypt.py: - do a proper raise when a keyword is missing - * flumotion/worker/job.py: - move "import traceback" to top, so it doesn't mess up stack - change source to moduleName since that's what it is - extract the exception traceback instead of the current stack - so we can log the cause of the problem - -2005-06-11 Thomas Vander Stichele - - * doc/random/exceptions: - add some notes on exceptions and handling them - * flumotion/common/log.py: - factor out a scrubFilename() function - -2005-06-11 Thomas Vander Stichele - - * flumotion/wizard/message.py: - use a longer name for cb - make them private attributes, because they are - * flumotion/wizard/worker.py: - pychecker happiness - -2005-06-11 Thomas Vander Stichele - - * flumotion/admin/admin.py: - another actual bug pychecker caught in three different ways. - flumotion/admin/admin.py:162: - Invalid arguments to (_makeFactory), got 2, expected 1 - flumotion/admin/admin.py:175: - self is not first method argument - flumotion/admin/admin.py:176: - No global (self) found - I don't want to hear any more "useless pychecker" whining. - Solutions, not problems. - - * flumotion/wizard/worker.py: - -2005-06-11 Thomas Vander Stichele - - * flumotion/manager/main.py: - make sure we catch all raises from _initialLoadConfig correctly, - and print a traceback for those we don't explicitly handle - -2005-06-10 Andy Wingo - - * flumotion/wizard/message.py (MessageView.__init__): Back off on - the padding of the message. - - * flumotion/wizard/worker.py: New file, implements a list of - workers. Fires 'worker-selected' when the selected worker changes. - - * flumotion/wizard/message.py: New file, implements a message - area, showing 0 to N messages. It hides itself when there are no - messages to show. Messages have id's. They can be cleared by id, - and no two messages of the same id will be visible at a time. The - UI needs some work. - - * flumotion/wizard/wizard.py (Wizard.info_msg, Wizard.error_msg) - (Wizard.clear_msg): New methods to show and clear messages in the - message area. No more modal dialogs. - (Wizard.set_step): Updates to get the worker list, message area, - and next button states right. Fire worker_changed on the step when - we switch to it. - - * flumotion/wizard/steps.py: All remote calls turned into - defer_generator_methods for clearer code and default errbacks. - Error and info dialogs turned into messages via info_msg() and - error_msg(). before_show() checks moved to worker_changed(). - - * flumotion/wizard/step.py (WizardStep.info_msg) - (WizardStep.error_msg, WizardStep.clear_msg): New methods, proxy - to the wizard. - - * data/glade/.hidden: Nautilus pacification file. - - * tools/gtk-2.4-ify-glade-files: focus_on_click was in gtk 2.4. - - * data/glade/wizard_webcam.glade: - * data/glade/wizard_audio_encoder.glade: - * data/glade/wizard_source.glade: - * data/glade/wizard_audiotest.glade: - * data/glade/wizard_vorbis.glade: - * data/glade/wizard_firewire.glade: - * data/glade/wizard_consumption.glade: - * data/glade/wizard_license.glade: - * data/glade/wizard_soundcard.glade: - * data/glade/wizard_jpeg.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_disk.glade: - * data/glade/wizard_welcome.glade: - * data/glade/wizard_summary.glade: - * data/glade/wizard_testsource.glade: - * data/glade/wizard_smoke.glade: - * data/glade/wizard_overlay.glade: - * data/glade/wizard_theora.glade: - * data/glade/wizard_tvcard.glade: - * data/glade/wizard_http.glade: No border, the border comes from - the wizard itself. - - * data/glade/wizard_firewire.glade: Text status area replaced by - message area from wizard. - - * data/glade/wizard_welcome.glade: Use a textview instead of a - label to allow for text reflowing. - - * data/glade/wizard.glade: Make gargantuan in size, no more center - on parent. Fix up borders in the main area to 12px all around. No - more frame border. Add a line above buttons. Add message area and - worker list. - -2005-06-09 Thomas Vander Stichele - - * bin/flumotion.in: - Remove unused PREFIX template var. Fix the @libdir@ vs - @LIBDIR@ confusion, @libdir@ is the not-expanded version - and should not be used ! - -2005-06-05 Thomas Vander Stichele - - * bin/flumotion-admin.in: - * bin/flumotion-manager.in: - * bin/flumotion-tester.in: - * bin/flumotion-worker.in: - Remove unused PREFIX template var. Fix the @libdir@ vs - @LIBDIR@ confusion, @libdir@ is the not-expanded version - and should not be used ! - -2005-06-03 Andy Wingo - - * flumotion/component/base/admin_gtk.py (BaseAdminGtk.state): - Pacification. - -2005-06-01 Thomas Vander Stichele - - * flumotion/admin/gtk/parts.py: - use a datafunc for pid and cpu use - * flumotion/extern/pytrayicon/eggtrayicon.c: (egg_tray_icon_init), - (egg_tray_icon_get_orientation): - * flumotion/extern/pytrayicon/eggtrayicon.h: - * flumotion/extern/pytrayicon/pytrayicon.defs: - * flumotion/admin/gtk/client.py: - * flumotion/ui/trayicon.py: - add tooltip to tray icon - * flumotion/manager/manager.py: - reset CPU use when component stops - * flumotion/component/component.py: - debug -> log on cpu stuff - * flumotion/admin/admin.py: - add another Str method for tooltips to use - -2005-05-31 Thomas Vander Stichele - - Patch by: Gergely Nagy - - * data/glade/wizard_soundcard.glade: - * flumotion/wizard/steps.py: - Fix for #135, adding human-readable names to the soundcard - -2005-05-26 Andy Wingo - - * flumotion/component/consumers/httpstreamer/admin_gtk.py - (HTTPStreamerAdminGtk.uiStateChanged): Implement vmethod, update - the statistics. - (StatisticsAdminGtkNode._loadGladeFileCallback): Don't get the - uistate ourselves. - - * flumotion/component/consumers/httpstreamer/resources.py - (HTTPStreamingResource.logWrite): Output time in GMT. - - * flumotion/component/base/admin_gtk.py (BaseAdminGtk.stateSet) - (BaseAdminGtk.stateAppend, BaseAdminGtk.stateRemove) - (BaseAdminGtk.__implements__): You be a listener. - (BaseAdminGtk.__init__): Get the uistate when any admin-gtk view - is created, and listen to it. - (BaseAdminGtk.uiStateChanged): vmethod, called when the ui state - changes. It is possible to override stateSet, etc individually - though. - - * flumotion/admin/gtk/client.py (Window._setAdminModel): Connect - to the right signal. - -2005-05-25 Thomas Vander Stichele - - * data/glade/wizard_http.glade: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/wizard/steps.py: - implement burst-on-connect. Currently this is only sensible - for video, since audio frames are all keyframes, so it doesn't - give you a burst to sync to previous keyframe. - -2005-05-25 Thomas Vander Stichele - - * flumotion/admin/gtk/parts.py: - * flumotion/common/planet.py: - * flumotion/component/component.py: - * flumotion/test/test_manager_manager.py: - implement CPU usage monitoring. Components will set CPU use - percentage since last heartbeat on the state, and the UI will - show it. Needs factoring of the cpu code into an object - (when something else would start using it) and needs a celldata - func to be slightly nicer in the UI code. - -2005-05-25 Andy Wingo - - * flumotion/wizard/sidebar.py (WizardSidebar.pop): Return True if - the pop succeeded, False if there was nothing left. - (WizardSidebar.set_sections): Reset the stack position when - resetting the set of sections. - -2005-05-24 Andy Wingo - - * flumotion/admin/gtk/main.py (main): Run main loop in main - function. - (_runInterface): Stop the reactor instead of doing a sys.exit. - - * flumotion/admin/gtk/wizard.py (Wizard): Use our own main loop, - not the GTK one. Disconnect from the finished handler after one - fire. - - * flumotion/admin/admin.py (AdminModel._defaultErrback): Not all - failures have .type. - -2005-05-24 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/main.py: - * flumotion/common/errors.py: - * flumotion/twisted/pb.py: - add ConnectionFailedError and handle name lookup errors everywhere - -2005-05-24 Thomas Vander Stichele - - * doc/random/tags: - add GTK 2.4 tag - * flumotion/admin/gtk/dialogs.py: - provide a format_secondary_text "backport" function for pychecker's - happiness - -2005-05-24 Andy Wingo - - * flumotion/admin/gtk/main.py (_runInterface): - * flumotion/admin/gtk/client.py (Window.on_open_connection): Use - the deferred from connectToHost and the new error dialog. - - * flumotion/admin/gtk/dialogs.py - (connection_refused_modal_message): New proc, pops up a modal - message that the connection to a manager was refused. - (ErrorDialog.__init__): Add a secondary_text kwarg. Attempt to - make it work on PyGTK 2.4. - - * flumotion/common/errors.py (ConnectedRefusedError): New error, - raised by AdminModel.connectToHost's deferred. - - * flumotion/admin/admin.py (AdminModel.connectToHost): Return a - deferred instead of requiring callers to connect to the - ::connected and ::connection-refused signals. - -2005-05-23 Thomas Vander Stichele - - * flumotion/common/medium.py: - * flumotion/manager/base.py: - * flumotion/worker/worker.py: - make avatars (PB server) and mediums (PB client) figure out - addresses on both sides of their connection as seen by them. - Will be useful to figure out network topology and firewalls. - -2005-05-23 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/service/service.py: - factor out getPidPath() and use it - change waitPidFile to actually wait for the pid file to arrive, - instead of the fancy and brittle mtime on the run dir. - -2005-05-20 Thomas Vander Stichele - - * flumotion/common/log.py: - integrate twisted's logging with ours. This might help us - debug some problems, no ? I think this is spiffy anyway. - -2005-05-20 Thomas Vander Stichele - - * configure.ac: - back to TRUNK - -=== release 0.1.8 === - -2005-05-20 Thomas Vander Stichele - - * configure.ac: - releasing 0.1.8, "Baja Beach" - -2005-05-19 Thomas Vander Stichele - - * flumotion.spec.in: - * flumotion/extern/Makefile.am: - * flumotion/ui/trayicon.py: - * flumotion/wizard/Makefile.am: - various fixes to make spec file and trayicon work - -2005-05-19 Thomas Vander Stichele - - * doc/Makefile.am: - * doc/redhat/make-dummy-cert: - * flumotion.spec.in: - use an included make-dummy-cert because it was removed - from openssl rpm for FC4 - -2005-05-19 Thomas Vander Stichele - - * flumotion/component/encoders/encoders.xml: - * flumotion/component/encoders/theora.py: - apply patch for theora advanced settings. Closes #201. - -2005-05-19 Thomas Vander Stichele - - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/audiotest/audiotest.xml: - make audiotest component respect sample rate setting - fixes #210 - -2005-05-19 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.py: - check user_limit since that's what it's called now - * flumotion/component/consumers/httpstreamer/http.xml: - add user_limit and bandwidth_limit - * flumotion/component/consumers/httpstreamer/resources.py: - rename setMaxClients to setUserLimit - -2005-05-19 Thomas Vander Stichele - - * flumotion/component/encoders/encoders.xml: - * flumotion/wizard/steps.py: - treat vorbis encoding quality as a float (0.0 - 1.0) - Fixes #212 - -2005-05-19 Thomas Vander Stichele - - patch by: Zaheer Abbas Merali - - * configure.ac: - * flumotion/admin/gtk/client.py: - * flumotion/extern/Makefile.am: - * flumotion/extern/pytrayicon/__init__.py: - * flumotion/ui/Makefile.am: - * flumotion/ui/trayicon.py: - add the tray icon. Make sure it still works if the trayicon - is not compiled. Closes #231. - -2005-05-19 Thomas Vander Stichele - - * flumotion/test/test_common.py: - remove double test that causes spurious problems - -2005-05-18 Thomas Vander Stichele - - patch by: Zaheer Abbas Merali - - * configure.ac: - * flumotion/Makefile.am: - * flumotion/extern/Makefile.am: - * flumotion/extern/__init__.py: - * flumotion/extern/pytrayicon/Makefile.am: - * flumotion/extern/pytrayicon/__init__.py: - * flumotion/extern/pytrayicon/eggtrayicon.c: - * flumotion/extern/pytrayicon/eggtrayicon.h: - * flumotion/extern/pytrayicon/ltihooks.py: - * flumotion/extern/pytrayicon/pytrayicon.defs: - * flumotion/extern/pytrayicon/pytrayicon.override: - * flumotion/extern/pytrayicon/pytrayiconmodule.c: - first part of adding a trayicon to Flumotion. - This builds the python module, so you can do - import flumotion.extern.pytrayicon - trayicon = pytrayicon.TrayIcon - -2005-05-18 Thomas Vander Stichele - - * flumotion/manager/main.py: - catch errors on access of the pem file. Fixes #202. - -2005-05-18 Thomas Vander Stichele - - patch by: Zaheer Abbas Merali - - * flumotion/component/consumers/disker/disker.py: - add more file extensions. Closes #206. - -2005-05-18 Thomas Vander Stichele - - * flumotion/component/encoders/vorbis.py: - Partial fix for #197 for OSS - * flumotion/component/feedcomponent.py: - fix bug in updateMood so sad stays sad - -2005-05-18 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - don't try to manage idle's - they get removed when iterate - returns FALSE, so the previous patch is not a really good idea - -2005-05-18 Thomas Vander Stichele - - * flumotion/component/encoders/vorbis.py: - check if we start up correctly - * flumotion/component/feedcomponent.py: - save the idle iterator id so we only have one running - -2005-04-28 Thomas Vander Stichele - - * bin/flumotion-admin.in: - * bin/flumotion-manager.in: - * bin/flumotion-tester.in: - * bin/flumotion-worker.in: - * bin/flumotion.in: - "64 bit" fixes - -2005-04-26 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - get the stats again, instead of using None. - DANGER WILL: if there are GIL problems, this is the first - thing to check ! - -2005-04-25 Thomas Vander Stichele - - * flumotion/wizard/sidebar.py: - declare the classvars - -2005-04-25 Andy Wingo - - * flumotion/wizard/steps.py: No more placeholders, no more - Consumption2. - - * flumotion/wizard/step.py (WizardStep): s/step_name/name/. All - accessors changed. - - * flumotion/wizard/sidebar.py (SidebarSection.__init__): Allow - sidebar entries to have different titles than their names. Thus a - Production button can have a Source title. Crack. - (WizardSidebar.push, WizardSidebar.pop): Push and pop from the top - of the stack, not the active section. - - * data/wizard/wizard_summary.glade: Fix visibility problem. - - * flumotion/wizard/sidebar.py (WizardSidebar.__init__): Fix size - request. - (SidebarButton.__init__): Fix padding. - - * flumotion/wizard/wizard.py (Scenario.show_next): Fix variable - ref. - - * flumotion/wizard/wizard.py (Scenario.show_next): - * flumotion/wizard/types.py (WalkableStack.push): Remove some - prints. - - * flumotion/wizard/steps.py: Don't register the steps, that kruft - is gone thankfully. Add pages for sections. Return None for - get_next at the end of sections. Unfortunately have to change the - name of the consumption page -- will be working on this. - - * flumotion/wizard/wizard.py (Scenario): Initial attempt at - tearing the stack logic out of the wizard. - (BasicScenario): Basic scenario with six sections and steps - autoloaded from steps.py. - (Wizard): Is a gladewindow now. - - * flumotion/wizard/sidebar.py: New file. - (WizardSidebar): Widget for the sidebar. Has four operations: - set_sections, show_step, push, and pop. - - * data/glade/wizard_overview.glade: Placeholder for forthcoming - summary pages. - - * flumotion/wizard/types.py: New file. - (WalkableStack): A stack that you can walk down. Pushing an item - on the stack can fail if you're not at the head and the next item - is different from the one you're pushing. - (KeyedList): An ordered list of objects that can be accessed by - non-numeric keys as well. Perhaps a crack idea. - - * flumotion/wizard/save.py (WizardSaver.handleConsumers): - Temporary fix for Consumption2 page name. - - * flumotion/common/watched.py: New file, implements data types - that notify listeners when it changes. - (WatchedList): Bling. - - * flumotion/ui/glade.py (GladeWindow.destroy): Delete the window - reference after destroying it. - -2005-04-22 Thomas Vander Stichele - - * flumotion/test/test_common_gstreamer.py: - * flumotion/common/gstreamer.py: - add bin_find_sinks() and test - -2005-04-22 Thomas Vander Stichele - - * flumotion/test/test_wizard.py: - * flumotion/wizard/step.py: - fix Patrick Build Breakage - -2005-04-21 Thomas Vander Stichele - - * configure.ac: - * data/Makefile.am: - * data/flu-admin.desktop.in: - * data/flumotion-admin.desktop.in: - rename to flumotion-admin.desktop.in and fix up to FE packaging - -2005-04-21 Andy Wingo - - * flumotion/wizard/step.py: New file. - (WizardStep): Split out from wizard.py. - - * flumotion/wizard/steps.py: - * flumotion/test/test_wizard.py (WizardStepTest.testLoadSteps): - step.WizardStep. - - * flumotion/ui/glade.py (GladeWidget.__init__): Try to fix a - python 2.3/pygtk 2.4 error? - - * flumotion/wizard/wizard.py (WizardStep): Change to be a - GladeWidget. Set glade_typedict to the fgtk.WidgetMapping(). - (WizardStep.section, WizardStep.section_name): Add default class - vars, set to None by default. - (WizardStep._load_glade): Removed, implemented by GladeWidget. - (WizardStep.iterate_widgets): New generator. - (WizardStep.get_main_widget): Removed, WizardStep is a widget. - (WizardStep.get_name): Use gtk.Widget implementation. - (WizardStep.get_sidebar_name): Unused, removed. - (WizardStep.get_section): Removed, just access WizardStep.section. - (Wizard): Updated for WizardStep changes. - - * flumotion/test/test_wizard.py (WizardStepTest.testLoadSteps): - Remove tests obsoleted by the use of gladewidget, step_name and - step.get_name() are equal but not identical. - (WizardStepTest.testStepWidgets): Use iterate_widgets() instead of - self.widgets. - - * flumotion/ui/glade.py (GladeWindow.glade_typedict) - (GladeWidget.glade_typedict): Added typedict class variables, and - used them in the initializers. - -2005-04-20 Andy Wingo - - * flumotion/manager/manager.py (find, first, any, fint): Move - utils out to the toplevel. - (Vishnu._configToComponentState): New method, converts a config - dict to a managercomponentstate. This is really hacky though, - there shouldn't be two ways to set up component states. Need to - merge with loadconfiguration at some point. - (Vishnu.componentAttached): Get the config and make the state if - the avatar is unknown (i.e., if the manager quit and the component - is logging back in again.) - (Vishnu.registerComponent): Remove commented-out code. - -2005-04-19 Thomas Vander Stichele - - * flumotion/admin/admin.py: - make sure we register cached paths first before registering - newly unbundled stuff. If we just started up the admin, - the cached paths are not yet registered while we're trying to - stack our unbundled one on top of it. Fixes #216. - -2005-04-19 Thomas Vander Stichele - - * data/glade/wizard_summary.glade: - change Quit to Apply, noted by jbn-o in #fluendo - -2005-04-19 Andy Wingo - - * conf/managers/default/planet.xml: Add a default name for the - manager. Call it 'planet'. - - * flumotion/manager/manager.py (Vishnu.deleteFlow): New routine, - deletes just a single flow. - - * flumotion/manager/admin.py (AdminAvatar.perspective_deleteFlow): - New method. - - * flumotion/wizard/wizard.py (Wizard): Set flowName to 'default'. - - * flumotion/wizard/save.py (WizardSaver.getXML): Take the flow - name from the wizard. - - * data/glade/houston.glade: Default action fixes. - - * flumotion/admin/admin.py (AdminModel.managerInfoStr): New - method, returns a nice string to identify the manager. - -2005-04-15 Andy Wingo - - * flumotion/common/planet.py (ManagerPlanetState.__init__): Make - sure the atmosphere state has the planet state as a parent. - - * flumotion/component/consumers/httpstreamer/admin_gtk.py - (StatisticsAdminGtkNode.updateLabels): Fix to work with uiState. - - * flumotion/common/bundleclient.py (BundleLoader.load_module): - Don't assume that bundle names are module names. Fixing this - assumption leads to lots of cleanups. - - * flumotion/twisted/defer.py - (defer_generator.wrapper.default_errback): Add an - errback-of-last-resort that will print a traceback if nothing - catches an error. - - * flumotion/component/consumers/httpstreamer/http.py - (Stats.updateState): Renamed from getState. Takes a setter proc to - set the args instead of returning a new dict. - (HTTPMedium.remote_notifyState): Removed, instead use getUIState. - (MultifdSinkStreamer.__init__): Add keys to the uiState. - (MultifdSinkStreamer.update_ui_state.set): Call Stats.updateState - with a setter for our uiState. - - * flumotion/component/bouncers/admin_gtk.py - (KeycardsNode._loadGladeFileCallback): call getUIState instead of - getBouncerState. - * flumotion/component/bouncers/bouncer.py (Bouncer.__init__): Use - uiState instead of _bouncerState. - (BouncerMedium.remote_getBouncerState): Removed, use getUIState - instead. - - * flumotion/component/component.py - (BaseComponentMedium.remote_getUIState): New method, returns the - UI state of the component. - (BaseComponent.__init__): Initialize self.uiState to a new - WorkerCompoenentUIState. - -2005-04-15 Thomas Vander Stichele - - * flumotion/worker/main.py: - error out nicely on config errors - -2005-04-15 Thomas Vander Stichele - - * flumotion/test/test_workerconfig.py: - * flumotion/worker/config.py: - do not use 'default' as a default worker name for config. - If nothing is specified, we should be using sockety stuff to - get a name. - -2005-04-15 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/worker/checks/video.py: - server-side fixes for making 16:9 and 4:3 work - -2005-04-14 Andy Wingo - - * flumotion/test/test_defer.py - (TestDefer.testException.divide_later.divide): Tighten up the - class of the error we check for. - - * flumotion/component/base/admin_gtk.py - (BaseAdminGtkNode.status_pop, BaseAdminGtkNode.status_push): New - methods for dealing with status bars. Hackily checks if the view - set a 'statusbar' attribute on the node. Hey hey hey it's fat - albert. - - * flumotion/component/consumers/httpstreamer/admin_gtk.py - (DiskerAdminGtk.setup): - * flumotion/component/consumers/disker/admin_gtk.py - (DiskerAdminGtk.setup): - * flumotion/component/producers/firewire/admin_gtk.py - (FirewireAdminGtk.setup): - * flumotion/component/producers/videotest/admin_gtk.py - (VideoTestAdminGtk.setup): - * flumotion/component/producers/soundcard/admin_gtk.py - (SoundcardAdminGtk.setup): - * flumotion/component/producers/bttv/admin_gtk.py - (BTTVAdminGtk.setup): - * flumotion/component/bouncers/admin_gtk.py - (HTPasswdCryptAdminGtk.setup): Don't pass around view as an - argument. - - * flumotion/admin/gtk/client.py (Window.show_component): Don't - pass self to BaseAdminGtk*.__init__. Set node.statusbar instead. - - * flumotion/component/base/admin_gtk.py - (BaseAdminGtk.loadGladeFile): Unused, removed. - (EffectAdminGtkNode.__init__): - (BaseAdminGtkNode.__init__) - (BaseAdminGtk.__init__): Remove last argument (normally a - flumotion.admin.gtk.client.AdminClient instance), as it's unused. - - * flumotion/twisted/defer.py - (defer_generator.wrapper.errback.raise_error): If the exception - comes from a remote PB, failure.type will be a string. Try to use - the exception class that corresponds to that string. - -2005-04-14 Thomas Vander Stichele - - * flumotion/common/common.py: - warn but don't fail on failed reflects during registerPackagePath - * flumotion/test/test_common.py: - add a test for registerPackagePath simulating an - uninstalled project sharing an import namespace with another - -2005-04-14 Thomas Vander Stichele - - * data/glade/wizard_firewire.glade: - * flumotion/wizard/steps.py: - admin-side fixes for widescreenity of firewire - -2005-04-14 Thomas Vander Stichele - - * common/common.mk: - * common/pychecker.mk: - * common/show-coverage.py: - updates to common/ for shared stuff - -2005-04-12 Thomas Vander Stichele - - * doc/random/firewire: - some notes about firewire - * flumotion/common/gstreamer.py: - add a function to get plugin version; only works with new gst-python - * flumotion/wizard/steps.py: - use one way to calculate all widths being used, so what's shown - is what's done - make overlay component check if we can use ffmpegcolorspace over - alpha - * flumotion/component/converters/overlay/overlay.py: - check for AYUV-ffmpegcolorspace - * flumotion/component/producers/firewire/firewire.py: - cleanups - * flumotion/wizard/wizard.py: - allow showing info dialogs - * flumotion/worker/checks/video.py: - add a check for ffmpegcolorspace having AYUV - -2005-04-12 Andy Wingo - - * flumotion/worker/worker.py (WorkerMedium.remote_runProc): Proxy - BaseMedium.run_bundled_proc. - - * flumotion/common/medium.py (BaseMedium.load_module): New method, - proxy from the bundleLoader. - (BaseMedium.run_bundled_proc): New method, runs a procedure in a - module, first fetching the bundles that support the module. - - * flumotion/common/bundleclient.py (BundleLoader.load_module): - Renamed from .load. Don't assume the bundle has the same name as a - module. Implement with a defer generator. - (BundleLoader._fetchAndRegisterBundles): Now a defer generator. - - * flumotion/manager/base.py - (ManagerAvatar.perspective_getBundleSums): Now also gets bundle - sums for a file or module as well. - (ManagerAvatar.perspective_getBundleSumsByFile): Removed. - - * flumotion/admin/admin.py (AdminModel.reload_async): New method, - takes a port as an argument for output. - -2005-04-11 Andy Wingo - - * flumotion/twisted/defer.py: Remove hacks, pychecker seems happy - enough without them. - - * flumotion/common/planet.py (moods.can_start, moods.can_stop): - New static methods. - - * flumotion/component/component.py (BaseComponent.stop): Set the - component mood to sleeping before we stop. "One last heartbeat." - Allows the manager to immediately start a component after stopping - it. - - * flumotion/manager/admin.py - (AdminAvatar.perspective_componentRestart): Fixed restart. - -2005-04-11 Thomas Vander Stichele - - * Makefile.am: - * common/Makefile.am: - * common/pychecker.mk: - * tools/pycheckerhelp.py: - more unification - -2005-04-11 Thomas Vander Stichele - - * Makefile.am: - * autogen.sh: - * common/Makefile.am: - * common/common.mk: - * common/pychecker.mk: - * common/python.mk: - * configure.ac: - * doc/random/styleguide: - * flumotion/Makefile.am: - * flumotion/admin/Makefile.am: - * flumotion/admin/gtk/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/component/Makefile.am: - * flumotion/component/base/Makefile.am: - * flumotion/component/bouncers/Makefile.am: - * flumotion/component/consumers/Makefile.am: - * flumotion/component/consumers/disker/Makefile.am: - * flumotion/component/consumers/httpstreamer/Makefile.am: - * flumotion/component/converters/Makefile.am: - * flumotion/component/converters/overlay/Makefile.am: - * flumotion/component/effects/Makefile.am: - * flumotion/component/effects/colorbalance/Makefile.am: - * flumotion/component/effects/volume/Makefile.am: - * flumotion/component/encoders/Makefile.am: - * flumotion/component/muxers/Makefile.am: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/audiotest/Makefile.am: - * flumotion/component/producers/bttv/Makefile.am: - * flumotion/component/producers/firewire/Makefile.am: - * flumotion/component/producers/soundcard/Makefile.am: - * flumotion/component/producers/videotest/Makefile.am: - * flumotion/component/producers/webcam/Makefile.am: - * flumotion/configure/Makefile.am: - * flumotion/manager/Makefile.am: - * flumotion/service/Makefile.am: - * flumotion/test/Makefile.am: - * flumotion/tester/Makefile.am: - * flumotion/twisted/Makefile.am: - * flumotion/ui/Makefile.am: - * flumotion/wizard/Makefile.am: - * flumotion/worker/Makefile.am: - * flumotion/worker/checks/Makefile.am: - * m4/as-ac-expand.m4: - * m4/as-python.m4: - * m4/as-version.m4: - * py-compile-destdir: - * python.mk: - rework build setup so we can make all flumotion projects uniform - -2005-04-11 Andy Wingo - - * flumotion/admin/gtk/client.py (Window._component_do): Use - new start/stop methods. - - * flumotion/manager/admin.py (AdminAvatar.perspective_componentStop) - (AdminAvatar.perspective_componentRestart): New methods. The first - will call componentCallRemote. The second will wait on a stop - before a restart. - (AdminAvatar.perspective_componentCallRemote): Deprecate use of - componentCallRemote to start components. - - * flumotion/admin/admin.py: - s/c_defer_generator/defer_generator_method/ - - * flumotion/twisted/defer.py (defer_generator_method): Renamed - from c_defer_generator, return a curried function. - -2005-04-09 Thomas Vander Stichele - - * Makefile.am: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - * misc/pycheckerrc: - make wizard be checked as well - -2005-04-09 Thomas Vander Stichele - - * Makefile.am: - remove stuff from blacklist after fixing - * flumotion/component/converters/overlay/overlay.py: - rework so we can use a safe function - * flumotion/component/effects/volume/admin_gtk.py: - remove an import - -2005-04-09 Thomas Vander Stichele - - * Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/common/medium.py: - * flumotion/configure/uninstalled.py.in: - * tools/pycheckerhelp.py: - fix make distcheck again - -2005-04-09 Thomas Vander Stichele - - * Makefile.am: - add pycheckersplit target for maximum CPU usage - * TODO: - some notes - * flumotion/component/consumers/httpstreamer/resources.py: - don't reuse var - * misc/pycheckerrc: - add a comment - -2005-04-09 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/twisted/defer.py: - make a c_defer_generator to be used for instance methods - -2005-04-05 Andy Wingo - - * flumotion/admin/admin.py (AdminModel.setRemoteReference): Molest - the planet. - - * flumotion/admin/admin.py (AdminClientFactory.gotDeferredLogin): - Refactor to use defer_generator. - - * flumotion/admin/gtk/client.py: Adapt to admin.py api change. - - * flumotion/twisted/defer.py: Feeble attempt to appease pychecker. - If infants can code it, pychecker can verify it! Non-infant use - not recommended. - - * flumotion/admin/admin.py (AdminModel.setRemoteReference): Rework - to use defer_generator. - (AdminModel.planet): Renamed from _planetState, public for - readonly access. All accessors changed. - (AdminModel.__init__): Move private instance variable - initialization here. - (AdminModel.getPlanetState): Removed, just get AdminModel.planet. - - * flumotion/test/defer.py: Fix test suite name. - - * flumotion/test/Makefile.am (flumotion_PYTHON): - * flumotion/test/test_defer.py: Test suite for - flumotion.twisted.defer. - - * flumotion/twisted/Makefile.am (flumotion_PYTHON): - * flumotion/twisted/defer.py: New file, integrating twisted - deferreds with python generators. I'm not using deferredGenerator - because it's too verbose. - -2005-04-04 Andy Wingo - - * data/image/16x16/about.png: - * data/image/24x24/about.png: New files, from the hicolor gnome - theme. LGPL. - - * flumotion/admin/gtk/client.py (Window._create_ui): Use stock - icons. - - * flumotion/ui/Makefile.am: - * flumotion/ui/icons.py: New file, instantiates stock icons for - flumotion doohickeys. - - * flumotion/manager/component.py - (ComponentHeaven.registerComponent): Add some brackets, make - python 2.3 happy - - * flumotion/admin/gtk/client.py - (Window._append_recent_connections): Adapt to recieve a list of - dicts instead of tuples. - - * flumotion/admin/gtk/connections.py (get_recent_connections): - Refactored out of Connections. Now returns a list of dicts instead - of a list of tuples. - (Connections._populate_liststore): Use get_recent_connections. - - * flumotion/test/test_worker_worker.py - (TestWorkerMedium.testSetRemoteReference): Fix so the remote - reference behaves more like a remote reference. - - * flumotion/common/medium.py (BaseMedium): New file, implements a - base class for mediums. - (BaseMedium.setRemoteReference, BaseMedium.hasRemoteReference) - (BaseMedium.callRemote): Implement these interface methods in the - BaseMedium. callRemote traps PBConnectionLost. - (BaseMedium.remote, BaseMedium.bundleLoader): Instance vars, set - to None. - - * flumotion/common/interfaces.py: Add a note pointing to the - medium implementation in flumotion.medium. - - * flumotion/component/component.py (BaseComponentMedium): - * flumotion/worker/worker.py (WorkerMedium): - * flumotion/worker/job.py (JobMedium): - * flumotion/admin/admin.py (AdminModel): Descend from BaseMedium, - removing unneeded code. - - * flumotion/admin/admin.py (AdminClientFactory): - AdminModel-specific client factory, encapsulating all of the login - krap. - (AdminModel::connection-refused): Don't pass connection parameters - in the args, rather provide... - (AdminModel.connectionInfoStr): New function, returns a - human-presentable string for the connection parameters. - (AdminModel.setRemoteReference): Extends the BaseMedium method, - encapsulating all of the operations that happens when a model gets - connected to a remote reference. - - * flumotion/admin/gtk/client.py - (Window.admin_connection_refused_later) - (Window.admin_connection_refused_cb): Adapt to connection-refused - signal change, call connectionInfoStr(). - - * flumotion/worker/worker.py (WorkerMedium.remote_start): Doc fix. - (WorkerClientFactory.gotDeferredLogin): Refactor callbacks as - closures rather than methods. Kleaner. - - * flumotion/worker/job.py (JobMedium.remote_start): Rename - configDict arg to config. - (JobMedium._runComponent): Set the config dict on the component, - so it knows how it was instantiated. Adapt to reconnecting - component factory api. - (JobMedium.hasPerspective): Removed, it's the same as - hasRemoteReference implemented in BaseMedium. - - * flumotion/manager/component.py (ComponentAvatar.cleanup): Fix - extra quote in doc. - (ComponentAvatar._mindGetStateCallback): Doc type of state - argument. - (ComponentHeaven.registerComponent): Beginnings of componentState - reconstruction code. - - * flumotion/component/component.py - (BaseComponent.__remote_interfaces__): Removed. What on earth was - this, anyway? It's not referenced at all in flumotion or twisted. - (ComponentClientFactory): Now a reconnecting factory. This means - that if the manager goes away, components will try to reconnect to - it later. Methods refactored to use the - startLogin/gotDeferredLogin interface. - (BaseComponentMedium.remote_getConfig): New remote method, will - return the component's configuration dict. - (BaseComponent.__init__): Chain up properly, add .dict instance - var. - (BaseComponent.setConfig): New method, sets the configuration dict - on a component. - -2005-04-06 Thomas Vander Stichele - - * configure.ac: - back to trunk - -=== release 0.1.7 === - -2005-04-06 Thomas Vander Stichele - - * configure.ac: - releasing 0.1.7, "La Chacha" - -2005-04-06 Thomas Vander Stichele - - * flumotion/component/producers/webcam/webcam.py: - make sure we use the device from the config - * flumotion/component/producers/webcam/webcam.xml: - make device required - * flumotion/wizard/steps.py: - implement WebCam get_state instead of relying on base class - - Fixes issue #110 and #134. - -2005-04-05 Thomas Vander Stichele - - * flumotion/component/producers/firewire/admin_gtk.py: - make sure volume increase changes get shown - * flumotion/manager/component.py: - fix a very stupid bug related to indentation and for loops. - Fixes issue #198 - -2005-04-05 Andy Wingo - - * flumotion/component/converters/overlay/genimg.py - (generate_overlay): If not text, don't draw.text. - - * flumotion/component/converters/overlay/overlay.xml: Add - show_text prop. - - * flumotion/component/converters/overlay/overlay.py - (createComponent): Follow config['show_text']. - -2005-04-05 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/resources.py: - debugging cleanups for better feedback - -2005-04-04 Thomas Vander Stichele - - * data/glade/wizard_audio_encoder.glade: - * data/glade/wizard_audiotest.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_http.glade: - * data/glade/wizard_jpeg.glade: - * data/glade/wizard_license.glade: - * data/glade/wizard_overlay.glade: - * data/glade/wizard_smoke.glade: - * data/glade/wizard_soundcard.glade: - * data/glade/wizard_theora.glade: - * data/glade/wizard_tvcard.glade: - * data/glade/wizard_vorbis.glade: - * data/glade/wizard_webcam.glade: - UI cleanups: - - align labels on the left - - add/fix accessors - - various tweaks - -2005-04-02 Thomas Vander Stichele - - patch by: Zaheer Abbas Merali - - * flumotion/component/encoders/encoders.xml: - * flumotion/component/encoders/vorbis.py: - downsample audio based on chosen bitrate - fixes issue #183 - -2005-04-02 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - clarify other error condition - * flumotion/component/effects/volume/volume.glade: - change UI a little to fit in panes and implement "distort" checkbox - use custom widget for level indicator with create function - * flumotion/component/effects/volume/admin_gtk.py: - implement handling of the new ui - * flumotion/component/effects/volume/volume.py: - use float multiplier values, not percentages - * flumotion/component/producers/soundcard/admin_gtk.py: - make sure soundcard gets volumeSet for view node - * flumotion/component/producers/firewire/firewire.py: - change value to be a multiplier - * flumotion/component/producers/soundcard/soundcard.py: - make it clear we still need to implement setVolume - -2005-04-02 Thomas Vander Stichele - - * flumotion/common/common.py: - add _listPyFileRecursively - add _findEndModuleCandidates - use it in registerPackagePath to also rebuild all non-package - modules under the packagePath. This solves #192 - * flumotion/test/test_common.py: - add test for new functions - * flumotion/component/effects/volume/admin_gtk.py: - * flumotion/component/producers/soundcard/admin_gtk.py: - clean up now that it works - -2005-04-02 Thomas Vander Stichele - - * flumotion/test/test_common.py: - * flumotion/common/common.py: - add pathToModuleName + test - document registerPackagePath - fix several subtle problems in registerPackagePath: - - warn on non-existing paths - - remove previously registered packagePaths for the same bundle - (which is a flumotion-specific hack, so needs fixing better) - - make sure the new packagePath is at the top everywhere, - because reload/rebuild.rebuild take the first valid one - - * flumotion/admin/admin.py: - check correctly for locally cached paths (bundle name was missing), - so it again only downloads missing bundles - - * flumotion/admin/gtk/client.py: - change show_component to not use a tempmod module, so rebuilding - works nicely everywhere - clear self.current_component so it can be used to check if - something's shown yet - check if it's set when doing outside ui change notifications - - * flumotion/component/effects/volume/admin_gtk.py: - * flumotion/component/producers/soundcard/admin_gtk.py: - use as test bed for registerPackagePath fixing - -2005-04-01 Thomas Vander Stichele - - patch by: Zaheer Abbas Merali - - * flumotion/component/effects/volume/admin_gtk.py: - * flumotion/component/effects/volume/volume.glade: - * flumotion/component/effects/volume/volume.py: - * flumotion/component/producers/firewire/Makefile.am: - * flumotion/component/producers/firewire/admin_gtk.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/component/producers/soundcard/soundcard.py: - Add way to change volume for the volume effect - Give the firewire a UI component using this - Closes issue #184 - -2005-04-01 Thomas Vander Stichele - - * flumotion/admin/admin.py: - change debug message - * flumotion/wizard/steps.py: - remove 'General error' from dialog - * flumotion/worker/checks/video.py: - reorder some error handling - -2005-04-01 Thomas Vander Stichele - - * flumotion/common/registry.py: - raise a useful error message when parsing of registry xml files - fails - -2005-04-01 Thomas Vander Stichele - - * flumotion/common/componentui.py: - remove all of the commented-out code - * flumotion/test/test_common_componentui.py: - * flumotion/test/test_flavors.py: - use common's pb fake stuff - -2005-04-01 Thomas Vander Stichele - - * flumotion/manager/manager.py: - warn on failure of removing jobState, but continue anyway - -2005-04-01 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/test/test_common.py: - add objRepr method and test - -2005-03-31 Thomas Vander Stichele - - * flumotion/common/pygobject.py: - * flumotion/test/test_common_pygobject.py: - * flumotion/test/Makefile.am: - add tests for flumotion.common.pygobject - -2005-03-31 Thomas Vander Stichele - - * flumotion/component/bouncers/bouncer.py: - implement remote_expireKeycardId for the admin ui to use - do some refactoring - * flumotion/component/bouncers/bouncer.glade: - * flumotion/component/bouncers/admin_gtk.py: - add a UI to bouncers allowing you to expire keycards - * flumotion/component/bouncers/htpasswdcrypt.xml: - add admin GTK view - * flumotion/component/consumers/httpstreamer/resources.py: - allow setting the requesterName and use it - * flumotion/component/consumers/httpstreamer/http.py: - set the avatarId as the requesterName; - avatarId is passed through config dict, which needs fixing - * flumotion/worker/job.py: - shoehorn the avatarId in the config dict when doing getComponent - as a temporary measure for getting the requesters' full avatarId - on the keycard - * flumotion/manager/admin.py: - make componentuistates proxyable - * flumotion/manager/component.py: - *Component -> *Avatar - - This commit fixes #186. - -2005-03-31 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - * flumotion/common/componentui.py: - added objects for serializing ui state from component to view in admin - * flumotion/test/Makefile.am: - * flumotion/test/test_common_componentui.py: - and a test - * flumotion/twisted/flavors.py: - fixed a nasty bug in the case where it subclasses from both - Cacheable and RemoteCache, and the dict of that type got stuff - appended and removed *twice* - -2005-03-31 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - call a .cleanup() on the old AdminGtk objects if they implement it - when showing a new component - -2005-03-31 Thomas Vander Stichele - - * flumotion/test/common.py: - add infrastructure to start test worker/admin/manager - * flumotion/common/keycards.py: - add .getData() giving you a dict of admin ui-displayable info - * flumotion/test/test_keycards.py: - test sending and receiving of keycards - -2005-03-30 Thomas Vander Stichele - - * conf/minimal.xml: - fix config to have flow name - * flumotion/manager/component.py: - solve KeyError bugs for non-feed components - * flumotion/manager/main.py: - fix debug for when no manager section is present - -2005-03-30 Andy Wingo - - * bin/flumotion-admin.in: Only use twisted's gtk2reactor if we - have version 2. - - * flumotion/common/config.py - (FlumotionConfigXML.get_string_value): libxml always gives us - unicode, even when we encode values as strings. Try to make - normal strings again, unless that isn't possible. Fixes #18. - -2005-03-30 Thomas Vander Stichele - - * flumotion/common/bundle.py: - raise proper error - * flumotion/wizard/save.py: - shorten the name - * flumotion/wizard/wizard.py: - placeholder for future code - -2005-03-29 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - move setup to _start() method so a blocked port can be - recovered from - -2005-03-28 Thomas Vander Stichele - - * TODO: - some more things to work on - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - clean up, document, reorder - -2005-03-28 Thomas Vander Stichele - - * flumotion/component/converters/overlay/overlay.py: - Clean up temporary image file. Fixes #188. - -2005-03-26 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/resources.py: - handle clients that have gone away before headers (fd == -1) - rearrange code more logically - -2005-03-26 Thomas Vander Stichele - - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - improve logging - -2005-03-26 Thomas Vander Stichele - - * flumotion/test/gtkunit.py: - * flumotion/test/test_greeter.py: - clicked buttons flash - entries get typed in - -2005-03-25 Andy Wingo - - * flumotion/test/gtkunit.py: New file, implements some functions - for testing guis. - - * flumotion/test/test_greeter.py (WizardTest.testMakeGreeter): Use - gtkunit.py. - -2005-03-25 Thomas Vander Stichele - - * flumotion/test/Makefile.am: - * flumotion/test/test_twisted_compat.py: - * flumotion/twisted/Makefile.am: - * flumotion/twisted/compat.py: - add a twisted.compat to help alleviate 1.3/2.0 transition issues - add unit tests for it working on both 1.3 and 2.0 - - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/twisted/flavors.py: - use the warning filter - -2005-03-24 Thomas Vander Stichele - - * bin/flumotion-admin.in: - * flumotion/twisted/gstreactor.py: - add in some try/except stuff and various tweaks to make Flumotion - also work with Twisted 2.0 - -2005-03-24 Thomas Vander Stichele - - * flumotion/common/errors.py: - * flumotion/wizard/steps.py: - * flumotion/worker/checks/video.py: - Make firewire wizard step react on changed workers - Add additional check for whether the device node is actually present - -2005-03-24 Thomas Vander Stichele - - * flumotion/manager/main.py: - log versions we are and are using - -2005-03-24 Thomas Vander Stichele - - * bin/flumotion-admin.in: - * bin/flumotion-manager.in: - * bin/flumotion-worker.in: - don't insert paths that are already there - allowing me to - test against a Twisted somewhere else than /usr - -2005-03-23 Andy Wingo - - * flumotion/test/test_greeter.py (WizardTest.testMakeGreeter): - Update for changes. - - * flumotion/admin/gtk/greeter.py (Greeter): Derive from Wizard. - - * flumotion/admin/gtk/wizard.py: Add docs. - (Wizard): Derive from GladeWindow. Take the name and list of steps - as class variables. - - * tools/pycheckerhelp.py: Pacify pychecker?!? - - * data/glade/Makefile.am (glade_DATA): Added authenticate.glade - and open-connection.glade. Thanks to Zaheer Merali for the tip. - -2005-03-21 Thomas Vander Stichele - - * Makefile.am: - * doc/reference/Makefile.am: - * tools/pycheckerhelp.py: - update for checks.video - * flumotion/wizard/steps.py: - * flumotion/worker/checks/video.py: - cleanup and document - -2005-03-21 Thomas Vander Stichele - - * flumotion/worker/checks/video.py: - * flumotion/worker/worker.py: - Fix the TV card __call__ error - -2005-03-21 Andy Wingo - - * data/glade/wizard.glade: - * data/glade/connection-dialog.glade: Center on parent. - - * flumotion/admin/gtk/client.py - (Window._append_recent_connections): Show all recent connections, - including the current one. Use the human-readable string supplied - by get_recent_connections(). Limit the number of recent - connections to 4. - (Window.admin_connected_cb): Hackily repeat the new human-readable - code here. - - * flumotion/admin/gtk/connections.py - (Connections.get_recent_connections): Return the human-readable - strings as well. - (Connections._populate_liststore.human_readable): New - string representation for connections. - - * flumotion/ui/fgtk.py (FComboBox._init_enum_model): Avoid - deprecated gtk.TRUE. - -2005-03-14 Thomas Vander Stichele - - * flumotion/common/config.py: - * flumotion/common/planet.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - Fix bouncers - -2005-03-11 Andy Wingo - - * data/glade/greeter-authenticate.glade: - * flumotion/admin/gtk/greeter.py (Authenticate.setup): - * flumotion/admin/gtk/connections.py - (Authenticate.auth_method_combo): Fire and handle signals - appropriately. - - * flumotion/test/test_greeter.py (WizardTest.testMakeGreeter): Fix - for changes in the auth widget. - - * flumotion/ui/glade.py (flumotion_glade_custom_handler): Make - sure the module is loaded. Add some more informative errors. - (GladeWidget.__init__): More informative errors. - (GladeWindow.__init__): More informative errors. - - * flumotion/wizard/wizard.py (WizardStep.glade_dir): New class - var, like GladeWindow. - (Wizard.__init__): s/parent_widget/parent_window/ - (register_step): If there's already a step of the given name, - replace it. Add initial arg, if true the page will be prepended to - the list instead of appended. - - * flumotion/admin/gtk/client.py (Window.debug_start_shell_cb): - Only use the spiffy console if we have python 2.4. - - * data/image/wizard/consumption.png: New image, from the artwork - repository. - * data/image/wizard/flow.png: Moved here from consumption.png. - -2005-03-10 Thomas Vander Stichele - - * flumotion/test/Makefile.am: - * flumotion/test/test_common_gstreamer.py: - add a gstreamer test - -2005-03-10 Thomas Vander Stichele - - * doc/random/vumeter: - * flumotion/test/test_ui_fgtk.py: - * flumotion/ui/fgtk.py: - fix the vu meter in the low range; increase coverage - -2005-03-10 Thomas Vander Stichele - - * flumotion/service/service.py: - have the worker start with the debug specified in the config instead - -2005-03-10 Thomas Vander Stichele - - * flumotion/admin/gtk/connections.py: - sacrifice animals to the god of python checking - -2005-03-09 Thomas Vander Stichele - - * data/glade/admin-wizard.glade: - * data/glade/authenticate.glade: - * data/glade/connection-dialog.glade: - * data/glade/connections.glade: - * data/glade/greeter-initial.glade: - * data/glade/open-connection.glade: - * data/glade/wizard.glade: - * data/glade/wizard_consumption.glade: - * data/glade/wizard_disk.glade: - * data/glade/wizard_firewire.glade: - * data/glade/wizard_license.glade: - * data/glade/wizard_overlay.glade: - * data/glade/wizard_source.glade: - * data/glade/wizard_theora.glade: - * data/glade/wizard_vorbis.glade: - * tools/gtk-2.4-ify-glade-files: - remove focus_on_click and add_tearoffs - -2005-03-09 Thomas Vander Stichele - - * data/glade/authenticate.glade: - * data/glade/connection-dialog.glade: - * data/glade/greeter-authenticate.glade: - * data/glade/greeter-connect_to_existing.glade: - * data/glade/greeter-initial.glade: - * data/glade/greeter-load_connection.glade: - 2.4-ify - * flumotion/admin/gtk/client.py: - fix an AP - * flumotion/common/code.py: - remove some unused imports - -2005-03-09 Thomas Vander Stichele - - * flumotion/test/test_checkers.py: - * flumotion/twisted/checkers.py: - * flumotion/twisted/credentials.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - increase coverage for checkers to 100%. Fix obvious security - problem. Rename Anonymous to Passwordless since that's what it is. - -2005-03-09 Andy Wingo - - * flumotion/admin/gtk/client.py (Window.debug_start_shell_cb): Use - flumotion.common.code instead of code. - - * flumotion/common/code.py: New file, makes the debugging shell - run in parallel with the GTK main loop, and makes tab completion - work. Whoop! - -2005-03-08 Thomas Vander Stichele - - * flumotion/common/keycards.py: - allow setting a domain on a keycard - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/consumers/httpstreamer/resources.py: - allow a "domain" keyword in config - set it on keycards - use it in HTTP auth challenge - * flumotion/test/test_http.py: - finally fix the test marked skip for unauthorized - -2005-03-08 Andy Wingo - - * flumotion/admin/gtk/wizard.py (Wizard.set_page): Remove the - requirement that there be a widget named 'page' in a wizard step. - - * data/glade/authenticate.glade: - * flumotion/admin/gtk/connections.py (Authenticate): New widget, - factored out of the greeter. - - * data/glade/greeter-authenticate.glade: - * flumotion/admin/gtk/greeter.py (Authenticate): Change to use new - connections.Authenticate widget. - - * flumotion/ui/glade.py (flumotion_glade_custom_handler): New - custom glade handler, set when the module is loaded. - - * flumotion/admin/gtk/wizard.py (WizardStep.next_pages): Derive - from GladeWidget, ditch our own glade-like code. Same behaviour - tho. - (Wizard.__init__): Show pages when creating them. - (Wizard.set_page): `page' itself is a widget now. - - * flumotion/admin/gtk/connections.py (ConnectionsDialog.glade_file): - * flumotion/admin/gtk/greeter.py - (ConnectToExisting.open_connection) - (LoadConnection.title): No need for custom glade handlers, thus no - need for __init__. - - * data/glade/greeter-load-connection.glade: - * data/glade/connection-dialog.glade: - * data/glade/greeter-connect_to_existing.glade: Construct custom - widgets with fully qualified module names. - -2005-03-08 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/test/test_common.py: - * flumotion/worker/main.py: - increase coverage, rename waitForKill to be more clear - * flumotion/common/pygobject.py: - * flumotion/manager/admin.py: - doc fixes - -2005-03-08 Thomas Vander Stichele - - * data/glade/open-connection.glade: - work with gtk 2.4 - * flumotion/admin/gtk/parts.py: - work with py 2.3 - -2005-03-07 Andy Wingo - - * flumotion/common/pygobject.py (with_construct_properties): New - decorator, takes care of G_PARAM_CONSTRUCT properties. Make it - work with gproperty(). Fix a bug whereby all instance of the same - class share the same gproperty dict, exposing the construct bug. - - * flumotion/admin/gtk/parts.py (ComponentsView): Use - with_construct_properties. - - * flumotion/test/test_pygobject: Test the - with_construct_properties decorator. - - * flumotion/test/test_greeter.py (WizardTest.testMakeGreeter): - Update to work with refactored connections widget, "fix" the - hanging-window problem. - - * data/glade/greeter-connect_to_existing.glade: - * data/glade/open-connection.glade: - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/connections.py: "Connect to existing" - factored out into a GladeWidget. - - * tests/construct-properties-do-not-work.py: New file, - demonstrates that construct properties don't work in pygtk. - -2005-03-07 Thomas Vander Stichele - - * flumotion/common/bundleclient.py: - * flumotion/worker/worker.py: - doc and debug changes - -2005-03-02 Andy Wingo - - * flumotion/ui/glade.py (GladeWindow.__init__): Make the parent - argument optional, so toplevel windows can descend from this - class. - - * flumotion/admin/gtk/client.py (Window.file_export_configuration_cb) - (Window.on_export_response, Window.getConfiguration_cb) - (Window.file_import_configuration_cb, Window.on_import_response): - Implement import/export of configurations. - - * data/glade/admin.glade: Add menu items to import and export - configurations. - - * flumotion/admin/admin.py (AdminModel.getConfiguration): New - method, foo. - - * flumotion/manager/admin.py - (AdminAvatar.perspective_getConfiguration): New method, bla bla. - So many levels of encapsulation, eh. - - * flumotion/manager/manager.py (Vishnu.getConfiguration): New - method, gets the configuration of the manager as an XML string. - - * flumotion/common/config.py (FlumotionConfigXML.export): Added - method, exports the configuration as a pretty-printed xml string. - - * configure.ac: - * Makefile.am (EXTRA_DIST): - * env.in: New script, sets up a dev environment for - flumotion. - -2005-02-20 Thomas Vander Stichele - - * flumotion/component/consumers/disker/admin_gtk.py: - make UI visisble again - -2005-02-16 Andy Wingo - - * flumotion/manager/manager.py (Vishnu._startErrback): Add an - errback if the component could not be started. - (Vishnu._workerStartComponentDelayed): Connect to the errback. - - * flumotion/worker/worker.py (WorkerMedium.remote_start): If - deferredStartCreate returns None, then there's already a start in - progress. Handle that. - (WorkerBrain.deferredStartFailed): New handler, removes the - deferred start from the list if the start failed, calling the - deferred's errback. - (JobAvatar._startErrback): Call deferredStartFailed. - - * flumotion/admin/gtk/client.py (Window.runWizard): Pass our - window as the parent. - (Window.admin_connected_cb): Make sure the parent window is - realized before setting it as the transient parent, avoids some - gtk criticals. - - * flumotion/wizard/wizard.py (Wizard.__init__): Add new initarg, - parent_widget. Really should be parent_window, but anyway it is - used in set-transient-for. - -2005-02-16 Thomas Vander Stichele - - * configure.ac: - back to trunk - -=== release 0.1.6 === - -2005-02-16 Thomas Vander Stichele - - * conf/managers/default/planet.xml: - remove debug - * data/glade/admin.glade: - fixify glade stuff for 2.4 - * flumotion/component/muxers/ogg.py: - add a huge improvement for stream muxing stability by setting - max delay and max page delay to 0.5 secs instead of 5 secs - -2005-02-16 Thomas Vander Stichele - - * flumotion/test/test_registry.py: - partial registry files should not have root entries - -2005-02-16 Thomas Vander Stichele - - * flumotion/configure/uninstalled.py.in: - Do not create _build by making sure we check correctly for - presence of _build - -2005-02-16 Thomas Vander Stichele - - * flumotion/common/registry.py: - make sure the registry doesn't get rebuilt all the time. - Really, *all* the time. - -2005-02-15 Andy Wingo - - * flumotion/admin/gtk/client.py (Window.admin_connected_cb): - Actually run the wizard, yo. - -2005-02-15 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/parts.py: - some debug - * flumotion/common/planet.py: - return a deferred list for empty() of state - * flumotion/manager/manager.py: - order emptying correctly - * flumotion/twisted/flavors.py: - return a deferred list for all observer updates on state - make a copy of list when removing - -2005-02-15 Andy Wingo - - * data/glade/greeter-initial.glade: Reword some things. - - * flumotion/admin/gtk/greeter.py (LoadConnection.title): Change to - "Recent connections". - - * flumotion/component/producers/webcam/admin_gtk.py - (WebcamAdminGtk.setup): Pass the state as the first arg, not the - name. - - * flumotion/admin/gtk/client.py (Window.start_stop_notify_cb): - Move clear_all updating here from - _set_stop_start_component_sensitive. - -2005-02-15 Thomas Vander Stichele - - * flumotion/manager/manager.py: - * flumotion/test/test_manager_manager.py: - create a graph of component dependencies - -2005-02-15 Thomas Vander Stichele - - * flumotion/manager/manager.py: - * flumotion/test/test_manager_manager.py: - revert change to emptyPlanet until we refactor manager code - -2005-02-15 Andy Wingo - - * flumotion/manager/manager.py (Vishnu.emptyPlanet): Simplify - because we require that all of the components be sleeping already. - - * flumotion/admin/gtk/client.py (Window.manage_start_all_cb): New - callback. - (Window.manage_stop_all_cb): Implement via a simple "for x in - l..." idiom instead of emptyPlanet(). - (Window.manage_clear_all_cb): New callback, uses - cleanComponents->emptyPlanet. - - * data/glade/admin.glade: Add a clear-all menu button. - - * flumotion/admin/gtk/client.py (Window.current_component_state): - New instance var, either None or the current AdminComponentState - being shown. - (Window._create_ui): Set the start/stop component ui widgets' - sensitivity when the ui is made. Hook into the can-start-any and - can-stop-any notifications to keep the sensitivity state current. - (Window.stateSet): Also handle notifications of 'mood'. - (Window.start_stop_notify_cb): New cb, sets sensitivity of - stop-all/start all. - (Window._set_stop_start_component_sensitive): New routine, sets - sensitivity according to current_component_state. - (Window._components_view_has_selection_cb): Set - current_component_state. - - * flumotion/admin/gtk/parts.py (ComponentsView): Landed the - can-start-any and can-stop-any properties. - (ComponentsView.update_start_stop_props): New proc, scans the - treemodel to see if we need to update the can-start-any or - can-stop-any properties. - (ComponentsView.update, ComponentsView._set_mood_value): Hook into - update_start_stop_props(). - - * flumotion/admin/admin.py (AdminModel): Moved can-start-any and - can-stop-any properties to ComponentsView. - -2005-02-14 Andy Wingo - - * m4/as-python.m4 (AS_PATH_PYTHON): Use textual comparison for - version parts, as some pythons have non-numeric micros (2.4.1a0 - for example). - - * flumotion/test/test_pygobject.py: Add a test for gsignal and - gproperty. - - * flumotion/admin/admin.py (AdminModel): Add can-start-any and - can-stop-any properties using gproperty(). - - * flumotion/common/pygobject.py (gproperty): New function, adds a - property to the calling class. Will install - do_get_property/do_set_property implementations if they are not - already present. - -2005-02-14 Christian Schaller - - * Add desktop file with icon for admin tool - -2005-02-14 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - notify both old and new state - * flumotion/manager/admin.py: - add componentStart perspective method - * flumotion/manager/component.py: - manage feeder's readiness correctly - * flumotion/manager/manager.py: - implement componentStart for one component - -2005-02-14 Thomas Vander Stichele - - * flumotion/common/errors.py: - add some errors - * flumotion/common/log.py: - change logging some more - -2005-02-14 Andy Wingo - - * data/glade/admin.glade: Remove "Stop all" toolbar button. It - doesn't work right now. - - * flumotion/common/bundle.py (BundlerBasket.getDependencies): - Rework to check if the argument is a valid bundle, and raise an - exception otherwise. - - * flumotion/worker/checks/video.py (check1394): Go to PLAYING, not - READY. Bug introduced on 02-08. - (check1394.iterate): Whoops, actually return if the bin failed to - iterate. - - * flumotion/test/test_parts.py (TestComponentsView.testSelected): - Connect to the right signal. - - * flumotion/admin/gtk/parts.py (ComponentsView::has-selection): - Renamed from ::selected to indicate that we are fired when the - selection is None. Emitters adapted. - - * flumotion/admin/gtk/client.py (Window._create_ui): Connect to - has-selection rather than selected on the components view, and - call _set_component_ops_sensitive() to set initial sensitivity - state. - (Window._set_component_ops_sensitive): New method, sets the - sensitivity of the start/stop toolbar and menu items. - (Window._components_view_has_selection_cb): Adapt to has-selection - signal, and call _set_component_ops_sensitive(). Renamed from - ...selected_cb. - - * flumotion/admin/gtk/Makefile.am (component_PYTHON): Add - connections.py to the list. Thanks to Christian Frederick Kalager - Schaller for the tip. - -2005-02-09 Andy Wingo - - * flumotion/admin/gtk/client.py (Window.componentCallRemote): Fix - a bug in the arglist to ...Status. - (Window.componentCallRemoteStatus): Renamed the callbacks and - errbacks. - - * flumotion/admin/gtk/connections.py - (ConnectionsDialog.on_cancel): Hooked up! - (ConnectionsDialog.on_has_selection): Use self.widgets[], not - attrs to get the widget. Word. - - * flumotion/admin/gtk/client.py (Window._component_do): Finish - duplicating componentCallRemoteStatus. Gee, code duplication is - great. Wonder why I'm writing these changelogs. - - * flumotion/wizard/save.py (WizardSaver.getVideoOverlay): Add CC - only if the license is set. - - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: Make sure the cache, - registry, and log dirs are available. - - * flumotion/admin/gtk/greeter.py (Initial.next_pages): Fix the - order so that load_connection is first by default. - - * flumotion/admin/gtk/wizard.py (Wizard.set_page): Disable the - back button as appropriate. - - * flumotion/admin/gtk/wizard.py (WizardStep.next_pages): New class - member. - (WizardStep.__init__): Go ahead and load up the glade file here - instead of in Wizard.set_page. - (WizardStep.is_available): New method. By default just returns - True. - (WizardStep.setup): Provide default implementation so we don't - have to hasattr(foo,'setup'). - (WizardStep.__init__): Take an extra arg, glade_prefix, the prefix - when looking for glade files. - (Wizard.__init__): Pass a glade_prefix to the pages. - (Wizard.set_page): Glade init moved to the pages. Compute - available pages to pass to WizardStep.setup(). - - * flumotion/admin/gtk/greeter.py (Initial, ConnectToExisting) - (Authenticate, LoadConnection): Add next_pages, indicating the set - of possible next steps. Change setup() to take an extra argument, - available_pages, the subset of next_pages that are actually - available. - (Initial.setup): New method, will desensitize unavailable next - steps. - (LoadConnection.is_available): New method, returns True only if - there are connections available to choose. - -2005-02-08 Thomas Vander Stichele - - * flumotion/component/component.py: - * flumotion/component/feedcomponent.py: - fix some error handling - fix heartbeat callback cleanup - -2005-02-08 Thomas Vander Stichele - - * flumotion/component/base/admin_gtk.py: - * flumotion/component/component.py: - * flumotion/component/feedcomponent.py: - * flumotion/manager/admin.py: - move _start/_stop functions around - -2005-02-08 Andy Wingo - - * flumotion/wizard/wizard.py (Wizard.present): New proxy method. - - * flumotion/admin/gtk/connections.py (Connections): Use fake uris - instead of multiple columns. - (Connections.on_grab_focus): Implement a handler that bypasses the - scrollwindow, instead focusing the treeview directly - (Connections.on_row_activated): Emit ::connection-activated. - (Connections::connection-activated): New signal. - - * flumotion/admin/gtk/client.py (Window.runWizard): Take care of - the one-and-only-one wizard logic all in this function. - - * flumotion/admin/gtk/greeter.py - (LoadConnection.on_connection_activated): Hooked up, yo! - (LoadConnection.setup): Grab focus on the Connections. - - * flumotion/admin/admin.py (AdminModel._writeConnection): Write - the manager, too. - - * data/glade/greeter-initial.glade: Make "load a previous - connection" be the first and default option. - - * data/glade/connections.glade: Headers not visible any more, we - use pseudo-uris. Not sure if this is best. - - * data/glade/connection-dialog.glade: Play with the padding, add a - label. Makes it look less bad. Connect to ::connection-activated. - - * data/glade/greeter-load_connection.glade: Connect the - connection-activated signal. - - * tools/gtk-2.4-ify-glade-files: New script, filters out gtk 2.6 - properties from glade files. Ugly, but hey. - -2005-02-08 Thomas Vander Stichele - - * data/glade/admin.glade: - * flumotion/admin/gtk/connections.py: - fixes for gtk 2.4 and python 2.3 - -2005-02-08 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - provide both stop and start - -2005-02-08 Thomas Vander Stichele - - * flumotion/common/dag.py: - * flumotion/test/test_dag.py: - some more DAG fun - -2005-02-08 Andy Wingo - - * flumotion/admin/gtk/client.py (Window.manage_stop_component_cb) - (Window.manage_start_component_cb): New callbacks, connected to - the menus and toolbars. - (Window._component_start, Window._component_stop): Reworked to use - componentCallRemoteStatus. - (Window.componentCallRemote): New routine, calls - componentCallRemoteStatus with no status. - (Window.componentCallRemoteStatus): New routine, calls a method on - a component, displaying information in the status bar as - appropriate. - - * data/glade/admin.glade: Remove "New" items from menu and - toolbar. - - * flumotion/worker/checks/video.py - (do_element_check.state_changed_cb): Yikes, fixed some bugs. When - the check_proc does not return a deferred, callback on the - deferred that we were given. Don't bother returning a value from a - state-changed cb. - (do_element_check): Only set the pipeline to the requested state, - READY by default. Avoids spurious errors when PLAYING is not - necessary. - -2005-02-07 Andy Wingo - - * flumotion/admin/gtk/client.py: - * glumotion/admin/gtk/connections.py (ConnectionsDialog): New - object, a dialog to open a recent connection. Caused general - refactoring in client.py. - - * data/glade/connection-dialog.glade: New file, shown as - File/Open. - - * data/glade/Makefile.am (glade_DATA): Add connections.glade and - connection-dialog.glade to the dist. - - * flumotion/ui/glade.py: New file, implements some base classes - for glade-backed widgets and windows. - - * flumotion/admin/gtk/main.py (_runInterface): Don't write the - connection, admin.py does it for us. - - * flumotion/admin/gtk/client.py - (Window._append_recent_connections): Clean the list of recent - connections before adding anything. - (Window.__init__): Don't cache the Connections object. - - * flumotion/admin/admin.py (AdminModel.user, AdminModel.passwd): - Changed from username and passwd so as to reflect the fields in - the greeter state structure and the connections xml file. - (AdminModel._writeConnection): New method, taken out from main.py. - Writes a xml representation of the connection to a file at every - connect. As a side effect, this allows us to keep time ordering - for the connections regardless of how they were opened. - - * flumotion/wizard/wizard.py (Wizard.destroy): New method, will - proxy the destroy to the gtk-window and also free some resources. - (::destroy): New signal, fired if the wizard gets destroyed - (i.e., the window gets destroyed somehow). - - * flumotion/admin/gtk/connections.py: Remove some printf's. - (Connections.get_recent_connections): New method, returns a list - of recent connections. - - * flumotion/admin/gtk/client.py (Window.open_connected_cb) - (Window.open_refused_cb, Window.on_open_recent) - (Window._append_recent_connections): New methods, implementing the - recent connections menu items. - (Window._setAdminModel): Allow re-setting the model. If - re-setting, make sure the wizard gets destroyed. - - * data/glade/admin.glade: Name the connections menu. - - * flumotion/admin/gtk/greeter.py: Moved connections code out to - connections.py. - - * flumotion/test/test_greeter.py (WizardTest.testMakeGreeter): - Fixed so that (1) assertions actually cause the test to fail, and - (2) that the tests actually pass. - - * flumotion/admin/gtk/connections.py: Code for the connections - widget. - - * data/glade/connections.glade: New file, glade interface for the - connections manager widget. - - * data/glade/greeter-load_connection.glade: Embed a custom widget - connections.Connections(). - -2005-02-04 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - * flumotion/common/dag.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_dag.py: - adding code for direct acyclic graphs - -2005-02-03 Thomas Vander Stichele - - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - doc fixes - * flumotion/manager/component.py: - make one feederset per flow and handle them correctly - clear up avatarId - getName() confusion - * flumotion/manager/manager.py: - use path for avatarId of components now - add Vishnu.componentDetached and make everything symmetrical - * flumotion/manager/worker.py: - * flumotion/test/test_manager_manager.py: - * flumotion/test/test_worker_worker.py: - various fixes - -2005-02-03 Andy Wingo - - * data/glade/Makefile.am: - * data/glade/greeter-load_connection.glade: Glade file for new - page. - - * flumotion/admin/gtk/main.py (_runInterface): When getting back - from the greeter, save the connection to disk. - - * flumotion/admin/gtk/wizard.py (Wizard.set_page): Set Next to - sensitive when going to a new page. (::setup should override it if - necessary.) - - * flumotion/admin/gtk/greeter.py (parse_connection): New function, - parses a saved connection file into a hash. - (_populate_liststore): Load up the list of previous connections - from files in the registry dir. - (_clear_iter): Remove a row and the corresponding connection file. - (LoadConnection.title): New page, will load up a saved connection. - (Greeter): Add the LoadConnection page. - -2005-02-03 Thomas Vander Stichele - - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/test/test_manager_manager.py: - give the manager the right name - -2005-02-03 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/manager/admin.py: - change more functions to act on state instead of name - remove deprecated functions - -2005-02-02 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - rework more functions to work on componentState instead of name - -2005-02-02 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/producers/bttv/admin_gtk.py: - * flumotion/component/producers/soundcard/admin_gtk.py: - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/manager/admin.py: - * flumotion/manager/manager.py: - move a bunch of functions to use component state instead of component - name - -2005-02-02 Andy Wingo - - * flumotion/admin/gtk/wizard.py: Set the bg/base on the whole - content area for INSENSITIVE so it doesn't look like krap. - (set_step): Make the sidebar text smaller. - - * flumotion/admin/gtk/client.py (Window._create_ui): Set PLAY and - PAUSED images from our own store instead of from stock, as they - are from GTK+ 2.6. - - * data/glade/wizard.glade: Fool around with dimensions some more. - - * data/glade/admin.glade: No handled toolbar -- that's a user - decision. - - * data/glade/admin-wizard.glade: Fiddle with eventboxes so that - colors aren't nasty when setting INSENSITIVE. - - * data/images/Makefile.am: - * data/images/16x16/Makefile.am: - * data/images/24x24/Makefile.am: - * data/images/16x16/play.png: - * data/images/24x24/play.png: - * data/images/16x16/pause.png - * data/images/24x24/pause.png: New images from GTK+ 2.6. - - * flumotion/wizard/wizard.py: Try to grab focus when run. Doesn't - work yet. - - * data/glade/wizard.glade: Fiddle with the default dimensions. - - * data/glade/admin.glade: Focus the treeview first. - - * flumotion/admin/gtk/client.py (Window.widgets): New instance - attribute, a dict of widgets from glade. - (Window._create_ui): Populate Window.widgets. Set custom icons for - the Run Wizard toolbar and menu items. - (Window.file_new_cb, Window.file_open_cb): Raise NotImplemented - errors instead of doing shite. - (Window.file_save_cb): Removed, it didn't do anything anyway. - (Window.manage_stop_all_cb): Used to be the clean toolbar button, - now labeled as "stop all". - (Window.manage_run_wizard_cb): New cb from menu and toolbar. - (Window.help_about_cb): No emails. Vainly add emails to list. - - * data/glade/admin.glade: Reworked quite a bit. - s/File/Connection/, added a Manage menu, menu items to stop and - start components individually or as a group, a wizard button, - removed the exit button, etc. - - * data/images/16x16/wizard.png: - * data/images/24x24/wizard.png: New images from David Vignoni. - - * data/images/Makefile.am - * data/images/16x16/Makefile.am - * data/images/24x24/Makefile.am - * configure.ac: Add data/images/{16x16,24x24} dirs. - -2005-02-02 Thomas Vander Stichele - - * flumotion/admin/admin.py: - make the view register listeners on states itself - add callViews - remove remote_componentAdded/Removed - * flumotion/admin/gtk/client.py: - listen to stuff in default flow - -2005-02-02 Thomas Vander Stichele - - * flumotion/manager/manager.py: - * flumotion/test/test_manager_manager.py: - test emptyPlanet() - -2005-02-02 Thomas Vander Stichele - - * flumotion/admin/admin.py: - use crap string for connected state, sigh - * flumotion/admin/gtk/client.py: - _createUI() now returns a window - * flumotion/manager/manager.py: - start components when a config gets loaded and workers are logged - in - * flumotion/test/test_manager_manager.py: - refactor test to use common functions - add test for config loaded after workers log in - -2005-02-02 Andy Wingo - - * flumotion/admin/gtk/client.py (Window.__init__): Set the model - after setting up the gui. - (Window.admin_connected_cb): Fix title. - - * flumotion/admin/admin.py (AdminModel._connectedCallback): Set - the state properly. - -2005-02-02 Thomas Vander Stichele - - * conf/managers/default/flows/ogg-test-theora.xml: - change flow to default - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/manager/admin.py: - remove remote_initial, and make admin request state of - workerheaven and planet - -2005-02-02 Andy Wingo - - * flumotion/admin/gtk/main.py: Prune of dead code. Re-present the - greeter if the model connection fails. Wait for model connection - to make the main window. - - * flumotion/admin/gtk/wizard.py (Wizard.destroy) - (Wizard.set_sensitive): New methods. - (Wizard.run): Don't destroy the window when finished, in case we - need to run it again. - - * flumotion/admin/gtk/client.py (Window._setAdminModel): Call the - connected cb ourselves if model.isConnected(). - (Window.admin_connected_cb): Run the wizard if the model has no - components. - (Window.update_components): Return the component list. - - * flumotion/admin/gtk/greeter.py (Greeter.destroy, Greeter.hide) - (Greeter.show, Greeter.set_sensitive): New methods, proxy for the - Wizard object. - - * flumotion/admin/admin.py: - (AdminModel.state): New instance variable, either 'connected' or - 'disconnected'. Accessed by AdminModel.isConnected(). - - * flumotion/manager/manager.py: - * flumotion/admin/gtk/parts.py: - * flumotion/common/planet.py: - * flumotion/admin/admin.py: - * flumotion/twisted/flavors.py: s/is None/== None/, - s/is not None/!= None/ to avoid pychecker warnings with python - 2.4. - -2005-02-02 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - * flumotion/common/component.py: - remove this file, everything merged in planet.py - * flumotion/twisted/flavors.py: - * flumotion/worker/worker.py: - fix some doc errors - -2005-02-02 Thomas Vander Stichele - - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/test/test_manager_manager.py: - more cleanup and tests - -2005-02-02 Thomas Vander Stichele - - * flumotion/manager/component.py: - cleanup heartbeat when logging out - * flumotion/manager/manager.py: - * flumotion/test/test_manager_manager.py: - decide on and map avatarId before starting; add tests - -2005-02-02 Thomas Vander Stichele - - * flumotion/test/test_manager.py: - add test for component mappers - add tests with fake components and workers logging in - * flumotion/common/planet.py: - move moods here - add JobStates - add parent keys - add emtpy() functions to atmosphere and flow - * flumotion/admin/admin.py: - add some mood checking to initial - * flumotion/admin/gtk/parts.py: - check values of state before setting them - make the treeview a state listener - * flumotion/admin/gtk/client.py: - add check for sleeping components on getting the UI - * flumotion/component/component.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/feedcomponent.py: - change location of moods - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - * flumotion/manager/worker.py: - use avatarId instead of name everywhere - use avatarId assigned by manager to log in to workerbrain and - manager - * flumotion/manager/admin.py: - add perspective_getState() - * flumotion/manager/manager.py: - add ComponentMapper - create planetstate from config - move functionality to Vishnu - add emptyPlanet() - * flumotion/manager/base.py: - add some checking - * flumotion/manager/component.py: - separate between componentstate and jobstate - * flumotion/test/test_worker_heaven.py: - * flumotion/test/test_worker_worker.py: - test fixing - -2005-02-01 Andy Wingo - - * flumotion/wizard/wizard.py: Fix the ugly colors of the sidebar. - - * flumotion/wizard/steps.py: Set the insensitive base color after - realizing for Firewire. Same trick for Summary. - - * flumotion/admin/gtk/wizard.py: Set the insensitive base, not the - normal base. - - * data/glade/wizard_summary.py: Use a GtkTextView instead of a - label for the summary text -- allows the text to reflow according - to the window size. - - * data/glade/wizard_firewire.py: Set to insensitive so as to - disallow selection. - -2005-02-01 Thomas Vander Stichele - - * flumotion/twisted/flavors.py: - add default values for get when a key is None - add removeListener() - -2005-02-01 Thomas Vander Stichele - - * flumotion/common/errors.py: - add some errors for future use - * flumotion/common/log.py: - change logging format again - -2005-02-01 Andy Wingo - - * flumotion/test/test_wizard.py: Make sure Firewire is ready to be - tested, and avoid the fgtk tests with it -- we don't use them yet. - All in all, an evil patch. - - * flumotion/worker/checks/video.py (do_element_check): Reworked so - as to go ahead and do the check instead of returning a thunk. - Optionally go to a state higher than READY. If the check_proc - returns a Deferred, don't set the pipeline to NULL (the check_proc - becomes responsible for it). Handle Deferred returns properly. - (check1394): Adapted to check the width and height of the video. - An interesting example, because it uses twisted's scheduling to - iterate the pipeline until it has caps. - - * flumotion/component/feedcomponent.py (FeedComponent.__init__): - Add some debugging. - (ParseLaunchComponent.setup_pipeline): Raise an error with the - proper arg. - - * flumotion/component/producers/firewire/firewire.xml: Add - scaled_width and is_square component properties. - - * flumotion/component/producers/firewire/firewire.py - (createComponent): Adapt to allow for setting the pixel aspect - ratio and padding the video size. - - * flumotion/wizard/steps.py (FireWire): Reworked to detect the - size of the output, add option for setting square pixels, contrain - the aspect ratio, and provide a width correction method. - - * flumotion/wizard/wizard.py (Wizard.error_dialog): fixed long - line. - (Wizard.get_step_state): Removed, just use step::get_state(). - (Wizard._sidebar_clean): Don't set the default size of the vbox, - we set it in the glade file. - - * flumotion/wizard/steps.py - * flumotion/wizard/wizard.py - (WizardStep.get_component_properties): Made to be a simple wrapper - around ::get_state(). All steps changed to implement get_state(). - - * flumotion/twisted/Makefile.am: Added gtk2reactor.py. - - * flumotion/twisted/gtk2reactor.py: New file, branched from - twisted's gtk2reactor. Avoids deprecated functions, and some - pychecker errors fixed. To remove when twisted 2.0 comes out. - - * flumotion/worker/worker.py - * flumotion/worker/config.py - * flumotion/manager/component.py - * flumotion/component/consumers/disker/disker.py - * flumotion/component/consumers/httpstreamer/resources.py - * flumotion/component/consumers/httpstreamer/admin_gtk.py - * flumotion/component/consumers/httpstreamer/http.py - * flumotion/common/config.py - * flumotion/common/reload.py - * flumotion/common/enum.py - * flumotion/wizard/save.py - * flumotion/twisted/gstreactor.py: s/is None/== None/, - s/is not None/!= None/ to avoid pychecker warnings with python - 2.4. - - * data/glade/wizard.glade: Instead of restricting the content area - to a certain size, give the window a default size. This allows it - to expand as necessary. - - * data/glade/wizard_firewire.glade: UI rework. I'm still not - happy. The width correction should be factored out into a filter. - - * bin/flumotion-admin.in: Use flumotion.twisted.gtk2reactor so as - to avoid deprecated code. - -2005-01-31 Thomas Vander Stichele - - * flumotion/common/common.py: - add function to give a "path" for a component and its parent - * flumotion/common/config.py: - add parent property to config entries for components - make sure no flow is called manager or atmosphere - * flumotion/test/test_common.py: - * flumotion/test/test_config.py: - tests for these - -2005-01-31 Thomas Vander Stichele - - * flumotion/common/log.py: - change output a little - -2005-01-28 Thomas Vander Stichele - - * flumotion/twisted/flavors.py: - add hasKey method - * flumotion/wizard/save.py: - give flow a default name - * flumotion/common/config.py: - require names for flows - * flumotion/common/component.py: - add parent and moodPending state keys - -2005-01-27 Andy Wingo - - * flumotion/worker/checks/video.py (check1394): New bundled - function, checks to see if dv1394 can go to PLAYING. Will fail if - the user lacks the /dev/raw1394 entry. - - * flumotion/wizard/steps.py (FireWire): Add some checks to see if - the firewire device really works. - - * flumotion/admin/gtk/wizard.py: - * flumotion/wizard/wizard.py: Get theme colors the right way, by - realizing the label first. - - * data/glade/wizard_welcome.glade: The introductory text is not - selectable. - - * data/glade/wizard_firewire.glade: Add a textview below the - parameters for status information. - - * flumotion/admin/gtk/greeter.py (Authenticate) - (ConnectToExisting): Grab focus to entries. Make enter go to the - next entry if there is one. - -2005-01-26 Andy Wingo - - * flumotion/manager/base.py: - (ManagerAvatar.perspective_getBundleSums): New function, gets the - sums of a bundle and dependencies. - (ManagerAvatar.perspective_getBundleSumsByFile): First get the - bundle name, then call getBundleSums. - - * flumotion/worker/checks/video.py: New file, contains the - gstreamer checks that used to be in wizard.steps. Uses a nifty - procedural abstraction, make_element_checker. - - * flumotion/worker/checks/package.xml: New file, registers - flumotion.worker.checks.video as a bundle. - - * flumotion/worker/checks/__init__.py: New file, placates python. - - * flumotion/worker/worker.py: - (WorkerMedium.setRemoteReference): Make a bundleloader when we get - a remote reference. - (WorkerMedium.remote_runCode): Removed, we don't run code - fragments any more. - (WorkerMedium.remote_runProc): New remoted procedure. Runs a - function in a module, fetching the module from the manager as - necessary. - - * flumotion/wizard/wizard.py (WizardStep.workerRun): Update to - AdminModel's workerRun. - - * flumotion/wizard/steps.py: Move gstreamer checks to - flumotion.worker.checks.video, and change to the new workerRun - api so that workers fetch the necessary code to run the checks. - - * flumotion/common/bundleclient.py: New file. - (BundleLoader): New class, implements a module loader that makes - sure we run the latest version of a module. Will fetch and install - bundles as needed. - - * flumotion/admin/admin.py (AdminModel.workerRun): Instead of - taking a function object, and passing the source of the function - to the worker, pass a module name and function name to the worker. - -2005-01-25 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - * flumotion/common/planet.py: - adding planet state stuff - * flumotion/twisted/flavors.py: - fixing interface description - -2005-01-24 Thomas Vander Stichele - - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/main.py: - fix pychecker warnings - -2005-01-24 Andy Wingo - - * flumotion/admin/gtk/wizard.py: Appease pychecker. - - * flumotion/admin/gtk/main.py (main): Remove host, port, user, - ssl, password options. (The greeter handles this now.) Allow a - config file to be passed on the command line. - (_runInterface): If there's no conf file, run the greeter to get - the host, etc. Make the AdminModel ourselves, then set it on a - Window. - - * flumotion/admin/gtk/wizard.py (Wizard.run): Destroy the window - when the run is finished. Make sure we aren't run twice. - - * flumotion/admin/gtk/greeter.py (Greeter): No longer derived from - Wizard, just proxies a Wizard object. - - * flumotion/admin/admin.py (AdminModel.connectToHost): New method, - will connect to a manager at a host/port/protocol. - (username, password, host, port, use_insecure): New attributes on - the model. - (AdminModel::connection-refused): Pass the host, port, and - protocol when emitting the signal. Emitters in admin.py and - callers in client.py changed. - - * flumotion/admin/gtk/client.py (Window._connectToManager): - Removed, now we receive manager already-constructed. - (Window._setAdminModel): Private method to set the model on the - window. - (Window.__init__): Instead of receiving host, user, passwd, etc. - just receive the model fully-built. - -2005-01-21 Andy Wingo - - * flumotion/admin/gtk/wizard.py (Wizard.set_page): Fix stupid - something. - - * flumotion/admin/gtk/greeter.py (Initial, ConnectToExisting) - (Authenticate): Set used glade attributes to None to appease the - mighty pychecker. - - * flumotion/admin/gtk/wizard.py (Wizard.set_page): Remove unused - local variable. Don't die when adding glade widgets if an - attribute exists, only if it exists and is non-false. - (WizardStep): None-out a couple more variables. - - * data/glade/admin-wizard.glade: - * data/glade/greeter-initial.glade: - * data/glade/greeter-connect_to_existing.glade: - * data/glade/greeter-authenticate.glade: Focus/mnemonic fixen. - - * data/glade/admin-wizard.glade: - * data/glade/greeter-initial.glade: - * data/glade/greeter-connect_to_existing.glade: - * data/glade/greeter-authenticate.glade: Updates. - - * tests/greeter.py: Little wrapper to test the greeter. - - * flumotion/admin/gtk/greeter.py: Instead of detecting procs, etc. - by name, make them classes and pass them explicitly to the - wizard factory. Check inputs, add titles and explanatory text, - etc. etc. - - * flumotion/admin/gtk/wizard.py: Rework to be prettier and to take - classes as the states. "Polish", if you will. - - * flumotion/test/test_greeter.py: Updates for the new greeter API - and behaviour. - - * flumotion/common/pygobject.py (gsignal): Avoid shadowing - `locals' and `dict' builtins. - -2005-01-21 Thomas Vander Stichele - - * configure.ac: - back to trunk - -=== release 0.1.5 === - -2005-01-21 Thomas Vander Stichele - - * NEWS: - * configure.ac: - releasing 0.1.5, "London Bar" - - * flumotion/admin/gtk/greeter.py: - * flumotion/admin/gtk/wizard.py: - * flumotion/test/test_greeter.py: - fix pychecker warnings; add testsuite headers - - * data/glade/admin-wizard.glade: Glade file for the generic - wizard. - - * data/glade/greeter-initial.glade: - * data/glade/greeter-connect_to_existing.glade: - * data/glade/greeter-authenticate.glade: Glade files for the - greeter wizard. - - * flumotion/admin/gtk/greeter.py: New file, uses wizard.py to make - a greeter, run when the user first starts the admin client. - - * flumotion/test/test_greeter.py: New test for the wizard set up - to run the greeter. - - * flumotion/admin/gtk/wizard.py: New file, implementing a generic - wizard widget. - - * flumotion/admin/gtk/Makefile.am (component_PYTHON): - * data/glade/Makefile.am (glade_DATA): - * flumotion/test/Makefile.am (EXTRA_DIST): Updated appropriately. - -2005-01-20 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/manager/component.py: - * flumotion/manager/worker.py: - * flumotion/test/test_flavors.py: - * flumotion/twisted/flavors.py: - * flumotion/wizard/wizard.py: - Go back to using append for List keys, since python also - uses append/remove. Yes, I suck. To make up, fix a bug - with List keys sharing their list among one another. - -2005-01-20 Thomas Vander Stichele - - * flumotion/common/common.py: - scrub some paths like .svn stuff for package candidates - -2005-01-20 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/configure/Makefile.am: - add prefix when looking for package candidates. Fixes some issues - when trying to registerPackagePaths from outside flumotion. - * pkgconfig/Makefile.am: - * pkgconfig/flumotion-uninstalled.pc.in: - * pkgconfig/flumotion.pc.in: - point to the base dir under which flumotion lives instead - -2005-01-19 Thomas Vander Stichele - - * configure.ac: prerelease - -2005-01-19 Thomas Vander Stichele - - * flumotion/common/log.py: - * flumotion/component/component.py: - * flumotion/manager/component.py: - * flumotion/test/test_log.py: - * flumotion/twisted/gstreactor.py: - * flumotion/wizard/save.py: - * flumotion/wizard/wizard.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - add more crack to the logging module - -2005-01-19 Andy Wingo - - * flumotion/common/common.py (version): Update to 2005. - -2005-01-18 Thomas Vander Stichele - - * flumotion/common/config.py: - remove unused code - -2005-01-18 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/manager/component.py: - * flumotion/manager/worker.py: - * flumotion/test/test_flavors.py: - * flumotion/twisted/flavors.py: - * flumotion/wizard/wizard.py: - remove likes add better than append - -2005-01-17 Thomas Vander Stichele - - * flumotion/test/test_worker_worker.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - make one function for getting the worker's socket - -2005-01-13 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/component/feedcomponent.py: - attempt to reconnect when a feeder has gone away - * flumotion/manager/worker.py: - * flumotion/worker/worker.py: - serialize startup of jobs so that jobs start one after another, - not all at the same time. This makes port allocations more - deterministic - -2005-01-13 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/test/test_common.py: - add some common port functions - -2005-01-11 Thomas Vander Stichele - - * flumotion/manager/base.py: - * flumotion/manager/component.py: - * flumotion/test/test_manager.py: - change from setReady to setReadiness - -2005-01-11 Thomas Vander Stichele - - * flumotion/manager/base.py: - add a hasAvatar method - * flumotion/manager/worker.py: - check to see if a component is already running before asking a - worker to start. avoids doubly starting components. - -2005-01-11 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - implement stop - * flumotion/component/component.py: - send only one heartbeat each time, duh - -2005-01-05 Thomas Vander Stichele - - * data/glade/admin.glade: - remove options that go to context menu - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/parts.py: - * flumotion/common/reload.py: - * flumotion/component/component.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/test/test_common_component.py: - * flumotion/test/test_parts.py: - * tests/ComponentsView.py: - add context menu to components view - fix reload - -2005-01-04 Thomas Vander Stichele - - * flumotion/admin/admin.py: - reregister gobject - * tests/ComponentsView.py: - * flumotion/admin/gtk/parts.py: - make columns sortable - * flumotion/common/component.py: - change moods enum so that happy and sad are at opposite sides - -2005-01-04 Thomas Vander Stichele - - * Makefile.am: - * doc/reference/Makefile.am: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/parts.py: - * flumotion/admin/gtk/spyglass.py: - * flumotion/admin/gtk/videotest.py: - * flumotion/wizard/wizard.py: - more gstutils fixes, pychecker fixes - -2005-01-04 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/parts.py: - * flumotion/admin/gtk/spyglass.py: - * flumotion/admin/gtk/videotest.py: - * flumotion/common/Makefile.am: - * flumotion/common/common.py: - * flumotion/common/gstreamer.py: - * flumotion/common/pygtk.py: - * flumotion/component/component.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/producers/webcam/webcam.py: - * flumotion/manager/component.py: - * flumotion/utils/Makefile.am: - * flumotion/utils/gstutils.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - first pass at removing utils/gstutils.py - -2005-01-03 Thomas Vander Stichele - - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/parts.py: - extract UI parts from the main file - -2005-01-03 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - fix errors - -2005-01-03 Thomas Vander Stichele - - * flumotion/admin/gtk/dialogs.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_dialogs.py: - testsuite for dialogs - -2004-12-31 Thomas Vander Stichele - - * flumotion/component/consumers/disker/disker.py: - fix moods - * conf/managers/default/flows/ogg-test-theora.xml: - spread over two workers - * data/glade/admin.glade: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - move some dialogs around - * flumotion/manager/admin.py: - -2004-12-30 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - * flumotion/common/common.py: - * flumotion/common/component.py: - * flumotion/component/component.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/feedcomponent.py: - * flumotion/manager/component.py: - make mood into an enum - -2004-12-30 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/common/worker.py: - * flumotion/manager/worker.py: - * flumotion/wizard/wizard.py: - make admin client notice when workers log in or out - -2004-12-30 Thomas Vander Stichele - - * flumotion/manager/Makefile.am: - * flumotion/manager/admin.py: - * flumotion/manager/common.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - rename common to base since that's what it is - -2004-12-30 Thomas Vander Stichele - - * Makefile.am: - * flumotion/admin/admin.py: - * flumotion/common/common.py: - * flumotion/common/component.py: - * flumotion/common/worker.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_common_component.py: - * flumotion/test/test_flavors.py: - * flumotion/twisted/Makefile.am: - * flumotion/twisted/flavors.py: - add flavors with StateCacheable/RemoteCache - add unittests - add possibility of monitoring lists and having append/remove - listener calls - -2004-12-30 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/common/Makefile.am: - * flumotion/common/common.py: - * flumotion/common/component.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/manager/worker.py: - * flumotion/test/test_common.py: - * flumotion/test/test_common_component.py: - * flumotion/test/test_wizard.py: - * flumotion/wizard/wizard.py: - First pass at making state of the workerHeaven cacheable. - Needs some reorganization and tests of State objects. - -2004-12-30 Thomas Vander Stichele - - * data/glade/admin.glade: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - create a status bar class wrapping the GTK widget - use the status bar for showing info about the UI - -2004-12-29 Thomas Vander Stichele - - * data/glade/wizard_testsource.glade: - don't use F for key access - * flumotion/manager/admin.py: - * flumotion/manager/common.py: - * flumotion/manager/component.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - cleanup of INFO level - -2004-12-29 Thomas Vander Stichele - - * data/image/Makefile.am: - * data/image/mood-happy.png: - * data/image/mood-hungry.png: - * data/image/mood-lost.png: - * data/image/mood-sad.png: - * data/image/mood-sleeping.png: - * data/image/mood-waking.png: - * doc/random/componentstate: - * doc/random/moods: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/common/Makefile.am: - * flumotion/common/common.py: - * flumotion/common/component.py: - * flumotion/component/component.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/feedcomponent.py: - * flumotion/configure/configure.py: - * flumotion/manager/admin.py: - * flumotion/manager/common.py: - * flumotion/manager/component.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_common_component.py: - * flumotion/test/test_htpasswdcrypt.py: - * flumotion/test/test_manager.py: - * flumotion/test/test_manager_admin.py: - * flumotion/worker/worker.py: - * tools/fixme: - A big commit to implement moods, yay ! - -2004-12-27 Thomas Vander Stichele - - * conf/Makefile.am: - * flumotion/component/component.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/feedcomponent.py: - * flumotion/test/test_http.py: - rename component.get_name to getName - -2004-12-21 Thomas Vander Stichele - - * flumotion/manager/component.py: - * flumotion/test/test_worker_worker.py: - fix testsuite - -2004-12-20 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - * flumotion/component/component.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/manager/worker.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - Show worker name and pid for components - -2004-12-20 Thomas Vander Stichele - - * conf/workers/default.xml: - * doc/redhat/flumotion: - * flumotion/manager/main.py: - * flumotion/worker/main.py: - clean up debug levels at various stages - -2004-12-20 Thomas Vander Stichele - - * configure.ac: - bump nano back to HEAD - -=== release 0.1.4 === - -2004-12-17 Thomas Vander Stichele - - patch by: Zaheer Abbas Merali - - * TODO: - * configure.ac: - * flumotion/component/effects/Makefile.am: - * flumotion/component/effects/volume/Makefile.am: - * flumotion/component/effects/volume/__init__.py: - * flumotion/component/effects/volume/admin_gtk.py: - * flumotion/component/effects/volume/volume.glade: - * flumotion/component/effects/volume/volume.py: - * flumotion/component/effects/volume/volume.xml: - * flumotion/component/producers/soundcard/Makefile.am: - * flumotion/component/producers/soundcard/admin_gtk.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/ui/fgtk.py: - Adding a volume effect for level display, and use it in soundcard. - Fixes #133. - -2004-12-17 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/configure/configure.py: - * flumotion/service/main.py: - * flumotion/service/service.py: - improve service script handling and pid file handling - -2004-12-16 Thomas Vander Stichele - - * bin/flumotion.in: - remove all sorts of stuff we don't need for the service script - * flumotion/common/common.py: - new function - * flumotion/service/service.py: - check for dead pids - -2004-12-16 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - info cleanup. - -2004-12-16 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - fixes #136 - warn about missing dv1394src and dvdec elements - -2004-12-16 Thomas Vander Stichele - - * doc/random/streaming: - some additional notes - * flumotion/common/log.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - (hopefully) fix file descriptor leakage by making sure the socket - closes. Document some more. Fix some error cases as well. - * flumotion/twisted/gstreactor.py: - debug the reactor a little - -2004-12-14 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - remove debug line - * flumotion/wizard/enums.py: - make sure "Test" choices are first in the enum - -2004-12-10 Thomas Vander Stichele - - * flumotion/service/service.py: - do not start manager/worker if one is already running. - Fixes issue #132 - -2004-12-10 Thomas Vander Stichele - - * flumotion/service/main.py: - error on unknown commands - implement restart - -2004-12-10 Thomas Vander Stichele - - * data/glade/wizard_consumption.glade: - * data/glade/wizard_disk.glade: - * data/glade/wizard_http.glade: - various accessors - - patch by: Zaheer Abbas Merali - * flumotion/component/consumers/disker/Makefile.am: - * flumotion/component/consumers/disker/admin_gtk.py: - * flumotion/component/consumers/disker/disker.glade: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/disker/disker.xml: - Add button to move to new archive file. - Fixes issue #122 - - -2004-12-10 Thomas Vander Stichele - - * data/glade/wizard_tvcard.glade: - add accessors - * flumotion/component/effects/colorbalance/colorbalance.glade: - add spacing - * flumotion/service/service.py: - stop workers before managers - don't fatally fail when no managers or workers config dirs found, - since that's ok. Needs a prerelease test. - -2004-12-10 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/common/bundle.py: - * flumotion/test/test_bundle.py: - abstract away bundle extraction path more, and make the cachedir - more easily browsable :) - -2004-12-09 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/producers/videotest/admin_gtk.py: - implement tabs. add a log tab to the streamer. - -2004-12-09 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/component.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - refactor code so that more methods are proxied generically - -2004-12-09 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/component.py: - * flumotion/component/effects/colorbalance/admin_gtk.py: - * flumotion/component/effects/colorbalance/colorbalance.py: - * flumotion/component/producers/bttv/admin_gtk.py: - * flumotion/component/producers/webcam/admin_gtk.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - proxy methods generically from a component or effect to the - admin-side views representing them - -2004-12-09 Thomas Vander Stichele - - * doc/random/documenting: - add some doc notes - * doc/reference/Makefile.am: - add more stuff - * flumotion/test/test_component.py: - * flumotion/component/component.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - documenting and method renaming - use "name" as member for component's name - removing deprecated API - * flumotion/component/effects/colorbalance/admin_gtk.py: - * flumotion/admin/admin.py: - debug changes - * flumotion/package.xml: - * flumotion/component/component.xml: - * flumotion/component/Makefile.am: - sort out who owns package entry points - * flumotion/component/effects/colorbalance/colorbalance.xml: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/webcam/webcam.xml: - * flumotion/component/consumers/httpstreamer/http.xml: - fix deps of bundles - * flumotion/component/feedcomponent.py: - * flumotion/component/producers/webcam/webcam.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/effects/colorbalance/colorbalance.py: - create effect base class and rework effect API - * flumotion/component/producers/webcam/admin_gtk.py: - * flumotion/component/producers/bttv/admin_gtk.py: - act on changed properties on colorbalance - * flumotion/worker/job.py: - fix doc - -2004-12-08 Thomas Vander Stichele - - * data/glade/admin.glade: - * flumotion/admin/gtk/client.py: - add shell for fun debugging - * flumotion/admin/admin.py: - properly register paths even though we didn't actually unbundle - since if they're already in the cache they should work too - -2004-12-08 Thomas Vander Stichele - - * flumotion/admin/admin.py: - only registerPackagePath when a bundle got unpacked, and - in the right order. Should fix all lingering "works on second - try" bugs in admin client. - -2004-12-08 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - more error handling - * flumotion/common/bundle.py: - some debug - * flumotion/common/common.py: - return ALL possible candidates for packages, not just the - directories that hold an __init__. This way a bundle depending - on another bundle having the package's __init__ can have imports - for modules in that directory. - * flumotion/common/registry.py: - clean up, document, rename. Don't register REGISTRY_PATHs as - package paths. - * flumotion/component/effects/colorbalance/colorbalance.xml: - * flumotion/component/producers/webcam/admin_gtk.py: - some cleanups and fixes - -2004-12-08 Thomas Vander Stichele - - * configure.ac: - * flumotion/component/Makefile.am: - * flumotion/component/effects/Makefile.am: - * flumotion/component/effects/__init__.py: - * flumotion/component/effects/colorbalance/Makefile.am: - * flumotion/component/effects/colorbalance/__init__.py: - * flumotion/component/effects/colorbalance/admin_gtk.py: - * flumotion/component/effects/colorbalance/colorbalance.glade: - * flumotion/component/effects/colorbalance/colorbalance.py: - * flumotion/component/effects/colorbalance/colorbalance.xml: - add colorbalance effect - * data/glade/wizard_source.glade: - * data/glade/wizard_webcam.glade: - small glade fixes - * doc/random/component: - some more docs - * flumotion/admin/gtk/client.py: - use an import trick to show components instead - * flumotion/common/errors.py: - add a syntax error - * flumotion/wizard/steps.py: - remove print - * flumotion/component/producers/bttv/admin_gtk.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/producers/bttv/bttv.xml: - use colorbalance effect and admin nodes for display - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/component/producers/videotest/videotest.py: - use new nodes for display - * flumotion/component/producers/webcam/admin_gtk.py: - * flumotion/component/producers/webcam/webcam.py: - * flumotion/component/producers/webcam/webcam.xml: - add admin ui for webcam and use effects and nodes - * flumotion/component/feedcomponent.py: - implement effect support - * flumotion/component/base/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/admin_gtk.py: - move to new node display - * flumotion/package.xml: - add effect - -2004-12-08 Thomas Vander Stichele - - * TODO: - some more stuff to do - * flumotion/common/common.py: - rebuild a package that's been re-added. Needs testing - * flumotion/common/errors.py: - add an effect error - * flumotion/admin/admin.py: - add method to get the full local cached path for a bundled file - * flumotion/utils/gstutils.py: - add method to check if an element factory has a given property - * flumotion/wizard/steps.py: - verify if we can set autoprobe-fps to false to speed up detection - * flumotion/component/producers/bttv/admin_gtk.py: - remove line - * flumotion/component/producers/bttv/bttv.xml: - add comment - * flumotion/component/consumers/httpstreamer/http.py: - remove deprecated bundle stuff - * flumotion/worker/job.py: - add some more debugging for when stuff goes wrong - * flumotion/manager/admin.py: - add more debugging - * flumotion/manager/common.py: - raise appropriate error on unfound bundle - -2004-12-07 Thomas Vander Stichele - - * flumotion/component/producers/bttv/colorbalance.glade: - don't expand the separators - -2004-12-07 Thomas Vander Stichele - - patch by: Zaheer Abbas Merali - - * flumotion/component/producers/bttv/Makefile.am: - * flumotion/component/producers/bttv/admin_gtk.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/bttv/colorbalance.glade: - added glade file, slightly reworked, link spinbuttons to scales - -2004-12-06 Thomas Vander Stichele - - * doc/reference/Makefile.am: - * flumotion/admin/__init__.py: - * flumotion/admin/admin.py: - * flumotion/common/__init__.py: - * flumotion/common/bundle.py: - * flumotion/common/common.py: - * flumotion/common/config.py: - * flumotion/common/errors.py: - * flumotion/common/interfaces.py: - * flumotion/common/log.py: - * flumotion/common/registry.py: - * flumotion/component/__init__.py: - * flumotion/component/component.py: - * flumotion/configure/__init__.py: - * flumotion/manager/__init__.py: - * flumotion/manager/admin.py: - * flumotion/manager/common.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/twisted/__init__.py: - * flumotion/twisted/gstreactor.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - * flumotion/twisted/reflect.py: - * flumotion/worker/__init__.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - more doc fixing and uniformizing - -2004-12-06 Thomas Vander Stichele - - * flumotion/admin/__init__.py: - * flumotion/common/__init__.py: - * flumotion/common/bundle.py: - * flumotion/common/common.py: - * flumotion/common/config.py: - * flumotion/common/errors.py: - * flumotion/common/interfaces.py: - * flumotion/common/registry.py: - * flumotion/component/__init__.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/component.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/configure/__init__.py: - * flumotion/manager/__init__.py: - * flumotion/manager/worker.py: - * flumotion/twisted/__init__.py: - * flumotion/twisted/checkers.py: - * flumotion/twisted/credentials.py: - * flumotion/twisted/gstreactor.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - * flumotion/worker/__init__.py: - * flumotion/worker/worker.py: - doc fixing spree, plus removing some deprecated code - -2004-12-06 Thomas Vander Stichele - - * Makefile.am: - implement black/white list for pychecker stuff - * flumotion/common/errors.py: - remove extra line - * flumotion/service/service.py: - * flumotion/component/producers/bttv/admin_gtk.py: - fix pychecker warning - * flumotion/component/producers/bttv/bttv.py: - fix my syntax errors - * flumotion/component/consumers/httpstreamer/http.py: - (try to) fix up warnings - * flumotion/ui/fgtk.py: - import glade as well for testing error - * flumotion/utils/gstutils.py: - rearrange imports - * flumotion/component/producers/videotest/admin_gtk.py: - remove junk - * flumotion/component/consumers/httpstreamer/Makefile.am: - * flumotion/component/producers/bttv/Makefile.am: - * python.mk: - if we ever want to do per-dir pychecks ... - -2004-12-06 Thomas Vander Stichele - - * configure.ac: - check for pychecker - -2004-12-06 Thomas Vander Stichele - - * TODO: - * flumotion/component/producers/bttv/admin_gtk.py: - * flumotion/component/producers/bttv/bttv.py: - style fixing - -2004-12-06 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - make bttv one like webcam one - -2004-12-06 Thomas Vander Stichele - - * flumotion/manager/main.py: - * misc/flu.unstable.stable.modules: - guard against no manager config - update modules - -2004-12-06 Thomas Vander Stichele - - patch by: Zaheer Abbas Merali - - * flumotion/component/producers/bttv/Makefile.am: - * flumotion/component/producers/bttv/admin_gtk.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/producers/bttv/bttv.xml: - add colorbalance + admin page to btt - -2004-12-06 Thomas Vander Stichele - - * flumotion/twisted/gstreactor.py: - removing logging to unbreak reactor - -2004-12-03 Thomas Vander Stichele - - * Makefile.am: - * flumotion/admin/admin.py: - * flumotion/component/consumers/httpstreamer/Makefile.am: - * flumotion/component/consumers/httpstreamer/gtk.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/twisted/credentials.py: - * flumotion/twisted/gstreactor.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/reflect.py: - * flumotion/ui/fgtk.py: - * misc/pycheckerrc: - various error fixing and pychecker stuff - -2004-12-02 Thomas Vander Stichele - - * TODO: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - allow components to notify their admin UI of changed property - make videotest UI use this and properly block signals while - updating UI - -2004-12-02 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/common/errors.py: - * flumotion/component/base/admin_gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/manager/admin.py: - * flumotion/manager/common.py: - * flumotion/manager/component.py: - remove some of the proxy methods in the manager - add some better error handling for remote call failures - uniformize and reorder methods - -2004-12-02 Thomas Vander Stichele - - * Makefile.am: - * flumotion/ui/fgtk.py: - fix up pychecker warnings and add to check - -2004-12-02 Thomas Vander Stichele - - * flumotion/common/enum.py: - * flumotion/test/test_enum.py: - make pychecker happy - -2004-12-01 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - * flumotion/common/enum.py: - Split up enum code out of wizard stuff - * flumotion/ui/Makefile.am: - * flumotion/ui/__init__.py: - * flumotion/ui/fgtk.py: - Create a ui directory holding code and widgets shared among - wizard and admin - * flumotion/wizard/enums.py: - * flumotion/wizard/wizard.py: - use fgtk and enum - * flumotion/component/base/admin_gtk.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/producers/videotest/admin_gtk.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/videotest/videotest.xml: - create a first UI for videotest allowing you to change the - pattern from the admin interface. - -2004-12-01 Thomas Vander Stichele - - * TODO: - * bin/flumotion-admin.in: - * flumotion/wizard/steps.py: - * flumotion/admin/gtk/client.py: - debugging and various updates - * flumotion/manager/admin.py: - also load componentHeaven with wizard-created config - -2004-12-01 Thomas Vander Stichele - - * flumotion/utils/gstutils.py: - add evil hack so we can set GParamEnum values. Needs to be fixed ! - Issue #119. - -2004-12-01 Thomas Vander Stichele - - * bin/flumotion-admin.in: - remove flumotion.component from import path to be sure we use - the bundled code - * bin/flumotion-manager.in: - only update registry here ... - * flumotion/common/setup.py: - ... and not all other binaries - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/manager/common.py: - Use new bundle code - * flumotion/common/common.py: - Fix up code to register package paths - * flumotion/common/registry.py: - search in flumotion/ for registry .xml files, to catch the one - for the base flumotion package - * flumotion/common/errors.py: - * flumotion/component/base/Makefile.am: - * flumotion/component/base/admin_gtk.py: - added base admin_gtk class - * flumotion/component/base/base.xml: - * flumotion/component/consumers/httpstreamer/gtk.py: - * flumotion/component/consumers/httpstreamer/http.xml: - make HTTP streamer use base gtk admin UI - * flumotion/manager/admin.py: - raise an error if entry point not found - * flumotion/manager/manager.py: - add dependencies correctly - * flumotion/package.xml: - * flumotion/Makefile.am: - make base flumotion bundle - -2004-11-30 Thomas Vander Stichele - - * TODO: - * flumotion/component/consumers/httpstreamer/http.xml: - fix up todo list - -2004-11-30 Thomas Vander Stichele - - * conf/minimal.xml: - * doc/random/bundle: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/common/bundle.py: - * flumotion/common/registry.py: - * flumotion/component/consumers/httpstreamer/gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/configure/configure.py: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - * flumotion/manager/admin.py: - * flumotion/manager/common.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/test/test_bundle.py: - * flumotion/test/test_config.py: - * flumotion/test/test_registry.py: - rework bundling and admin UI retrieving to the new system. - Still need to update all other components, and make admin ui stuff - subclass properly. - -2004-11-30 Thomas Vander Stichele - - * flumotion/common/config.py: - * flumotion/manager/component.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - Rework loadConfiguration a little. Make ComponentHeaven - know about config as well. Needs reworking so we - can implement failover and friends. - -2004-11-29 Thomas Vander Stichele - - * flumotion/manager/Makefile.am: - * flumotion/manager/common.py: - Would be good to have this too. - -2004-11-29 Thomas Vander Stichele - - * flumotion/common/bundle.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/test/test_manager.py: - * flumotion/worker/config.py: - * flumotion/worker/main.py: - Common base class for heaven and avatar. Fixes #13 - -2004-11-26 Johan Dahlin - - * doc/random/bundle: - * flumotion/common/registry.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/manager/manager.py: - * flumotion/test/test_registry.py: - - Add relative paths. (and add tests for this) - Add an example bundle to the http streamer. - Add a bundle basket in the vishnu that reads all bundles - from the registry - -2004-11-26 Johan Dahlin - - * flumotion/common/registry.py: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/manager/manager.py: - -2004-11-26 Johan Dahlin - - * flumotion/common/registry.py: - * flumotion/test/test_registry.py: - * doc/random/bundle: - - Add and parsing and tests - - Update the document to reflect the implementation. - -2004-11-26 Thomas Vander Stichele - - * flumotion/manager/admin.py: - * flumotion/manager/manager.py: - * flumotion/twisted/portal.py: - Multiple admin logins now work. Don't annoy other people - by cleaning out their state and stuff though. Fixes #36. - -2004-11-25 Thomas Vander Stichele - - * flumotion/common/bundle.py: - * flumotion/test/test_bundle.py: - add BundlerBasket and test code - -2004-11-25 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - Do not list tracks if element doesn't support the interface. - Fixes #115 - -2004-11-25 Thomas Vander Stichele - - * flumotion/worker/worker.py: - make worker reconnecting - -2004-11-24 Thomas Vander Stichele - - * flumotion/twisted/pb.py: - make reconnecting client factory - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - use reconnecting client factory and add a dialog for when the - manager goes away - -2004-11-19 Thomas Vander Stichele - - * data/glade/wizard_jpeg.glade: - * flumotion/component/encoders/encoders.xml: - * flumotion/component/encoders/jpeg.py: - * flumotion/wizard/steps.py: - Implement framerate changing on JPEG encoding. - Should eventually be generalized as a "filter". - -2004-11-17 Thomas Vander Stichele - - * README: - add test line for multipart/jpeg - * data/glade/wizard_jpeg.glade: - fix up glade file - -2004-11-11 Thomas Vander Stichele - - * configure.ac: - back to development - * flumotion.spec.in: - fix typo - -=== release 0.1.3 === - -2004-11-11 Thomas Vander Stichele - - * configure.ac: - bump for release - * flumotion/wizard/steps.py: - throw up a dialog when we couldn't run code - -2004-11-11 Thomas Vander Stichele - - * flumotion.spec.in: - Integrate spec changes from issue 86 - -2004-11-11 Johan Dahlin - - * flumotion/wizard/steps.py: - Only skip configuration if we use firewire audio - -2004-11-11 Thomas Vander Stichele - - * Makefile.am: - * flumotion/wizard/steps.py: - * flumotion/worker/worker.py: - distcheck now works again. - -2004-11-11 Thomas Vander Stichele - - * data/glade/wizard_audiotest.glade: - add volume - * data/glade/wizard_vorbis.glade: - make quality the default - but didn't work - * flumotion/wizard/steps.py: - really make quality the default for vorbis - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/wizard/enums.py: - * flumotion/wizard/wizard.py: - add volume - * misc/pycheckerrc: - increase maxsize of functions - -2004-11-10 Thomas Vander Stichele - - * data/glade/wizard_tvcard.glade: - * flumotion/wizard/steps.py: - clear up confusion between v4l channels and TV channels - -2004-11-10 Thomas Vander Stichele - - * flumotion/worker/worker.py: - log better error - -2004-11-10 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - Explain the real deal - -2004-11-10 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - fix error message for list_tracks - -2004-11-10 Thomas Vander Stichele - - * configure.ac: - Grrr, why is it necessary to do the same bug twice ? - -2004-11-10 Thomas Vander Stichele - - * flumotion/component/producers/soundcard/soundcard.py: - Don't use audioscale and audioconvert until we actually - first probe the card so we can set correct fixated caps on it. - -2004-11-10 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - Another soundcard fix - this never worked. - Bring names of GStreamer properties and step options in line. - -2004-11-10 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - throw an error when list_tracks doesn't work (interface issues ?) - -2004-11-09 Thomas Vander Stichele - - * flumotion/worker/job.py: - woah, scary how syntax errors going unnoticed can screw up - the whole flumotion system. This fixes soundcards for me. - -2004-11-09 Thomas Vander Stichele - - * flumotion/worker/job.py: - add another error raise - -2004-11-09 Thomas Vander Stichele - - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/wizard/enums.py: - * flumotion/wizard/steps.py: - channels should be serialized as int until there is a good - representation of them, because setting channels=stereo in - GStreamer doesn't work - -2004-11-09 Thomas Vander Stichele - - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - fix some prints and raises - -2004-11-09 Thomas Vander Stichele - - * flumotion/common/errors.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - attempt to make runCode more robust. Needs more work. - -2004-11-09 Thomas Vander Stichele - - * data/glade/wizard_soundcard.glade: - fix typo - * flumotion/wizard/enums.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - block updates when asked. fixes #98 - -2004-11-09 Thomas Vander Stichele - - * flumotion/wizard/wizard.py: - change quit to apply, fixes #71 - -2004-11-09 Thomas Vander Stichele - - * data/glade/wizard_webcam.glade: - * flumotion/wizard/steps.py: - Show name of webcam in the UI - -2004-11-09 Thomas Vander Stichele - - * conf/managers/default/planet.xml: - * conf/workers/default.xml: - * flumotion/admin/gtk/main.py: - * flumotion/common/config.py: - * flumotion/manager/main.py: - * flumotion/worker/config.py: - * flumotion/worker/main.py: - add --debug options to command line - add option to config file for worker and manager - -2004-11-09 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/common/errors.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - cleanup of wizard code; better error checking, throw up - error dialogs. Fixes issue #92 - -2004-11-09 Johan Dahlin - - * configure.ac: Check for the gst module before gst.interfaces and - set PYTHONPATH based on the directory found in pkg-config. - -2004-11-05 Thomas Vander Stichele - - * configure.ac: - back to development - -=== release 0.1.2 === - -2004-11-05 Thomas Vander Stichele - - * NEWS: - * configure.ac: - bump for release - * flumotion/test/test_wizard.py: - skip test for now - -2004-11-05 Johan Dahlin - - * flumotion/common/errors.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - - Add error dialog to audio source step - -2004-11-05 Christian Schaller - - * flumotion.spec.in: update spec file and init.d script for - redhat integration so that it appears in services GUI - -2004-11-05 Thomas Vander Stichele - - * data/glade/wizard_tvcard.glade: - * data/glade/wizard_webcam.glade: - fix up defaults - -2004-11-05 Thomas Vander Stichele - - * Makefile.am: - * flumotion.spec.in: - * flumotion/Makefile.am: - * flumotion/admin/Makefile.am: - * flumotion/admin/gtk/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/component/Makefile.am: - * flumotion/component/base/Makefile.am: - * flumotion/component/bouncers/Makefile.am: - * flumotion/component/consumers/Makefile.am: - * flumotion/component/consumers/disker/Makefile.am: - * flumotion/component/consumers/httpstreamer/Makefile.am: - * flumotion/component/converters/Makefile.am: - * flumotion/component/converters/overlay/Makefile.am: - * flumotion/component/encoders/Makefile.am: - * flumotion/component/muxers/Makefile.am: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/audiotest/Makefile.am: - * flumotion/component/producers/bttv/Makefile.am: - * flumotion/component/producers/firewire/Makefile.am: - * flumotion/component/producers/soundcard/Makefile.am: - * flumotion/component/producers/videotest/Makefile.am: - * flumotion/component/producers/webcam/Makefile.am: - * flumotion/configure/Makefile.am: - * flumotion/manager/Makefile.am: - * flumotion/service/Makefile.am: - * flumotion/test/Makefile.am: - * flumotion/tester/Makefile.am: - * flumotion/twisted/Makefile.am: - * flumotion/utils/Makefile.am: - * flumotion/wizard/Makefile.am: - * flumotion/worker/Makefile.am: - * py-compile: - * python.mk: - - Fix py-compile to support DESTDIR, so the rpm can tag compiled python - code with the final on-disk location - -2004-11-05 Johan Dahlin - - * data/glade/wizard_webcam.glade: - * flumotion/wizard/steps.py: - - Add autodetection code for the webcam - -2004-11-05 Thomas Vander Stichele - - * configure.ac: - expand LIBDIR for installed.py.in - * doc/redhat/flumotion: - allow starting and stopping only one of the service parts - handle error values correctly - log to a service log file - * flumotion/manager/main.py: - * flumotion/service/main.py: - add log file for service startup - -2004-11-04 Thomas Vander Stichele - - * flumotion/service/main.py: - * flumotion/service/service.py: - give good return values so service script is useful - * flumotion/worker/config.py: - fix not inited bug - -2004-11-04 Thomas Vander Stichele - - * flumotion/common/registry.py: - debug - * flumotion/configure/installed.py.in: - fix pythondir - * flumotion/service/service.py: - set name on worker - -2004-11-04 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/resources.py: - fix a STUPID bug where the requester was stored as a tuple because - of a trailing comma and of course %s alone doesn't show this as - a tuple. sigh. - * flumotion/common/errors.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/manager/component.py: - add some more functions so keycards can be expired by the bouncer - -2004-11-04 Thomas Vander Stichele - - * Makefile.am: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/encoders/jpeg.py: - * flumotion/component/encoders/mulaw.py: - add more components to pychecker checking and fix warnings - -2004-11-04 Thomas Vander Stichele - - * flumotion/common/common.py: - make pkgAddPath only add stuff to __path__ if not already there - -2004-11-04 Thomas Vander Stichele - - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - unprivatize Bouncer.addKeycard() - -2004-11-04 Thomas Vander Stichele - - * Makefile.am: - * configure.ac: - * pkgconfig/Makefile.am: - * pkgconfig/flumotion-uninstalled.pc.in: - * pkgconfig/flumotion.pc.in: - adding .pc files - -2004-11-04 Johan Dahlin - - * data/glade/wizard_soundcard.glade: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/test/test_wizard.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - - Add OSS/Alsa and probing to soundcard, fixes issue #61 - -2004-11-04 Thomas Vander Stichele - - * flumotion/common/registry.py: - * flumotion/component/base/base.xml: - * flumotion/component/bouncers/htpasswdcrypt.xml: - * flumotion/component/consumers/disker/disker.xml: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/converters/overlay/overlay.xml: - * flumotion/component/encoders/encoders.xml: - * flumotion/component/muxers/muxers.xml: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/firewire/firewire.xml: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/component/producers/webcam/webcam.xml: - * flumotion/test/test_config.py: - * flumotion/test/test_registry.py: - add toplevel nodes in all partial xml - files. do not raise when a file without is being - parsed so it doesn't trip over other .xml files - -2004-11-03 Thomas Vander Stichele - - * flumotion/wizard/wizard.py: - make wizard remember last chosen worker. fixes issue #76 - -2004-11-03 Johan Dahlin - - * configure.ac: Check for gst.interfaces and gtk.glade - -2004-11-02 Thomas Vander Stichele - - * bin/flumotion-admin.in: - make it work again - * data/glade/Makefile.am: - * data/glade/wizard_audiosource.glade: - * data/image/wizard/Makefile.am: - * data/image/wizard/audiosrc.png: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/steps.py: - fix bug with audio test source being started on wrong worker - rename audiosrc to Sound Card step since that's what it is - -2004-11-02 Thomas Vander Stichele - - * conf/workers/default.xml: - * flumotion/worker/config.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - adding feederport ranges to worker config - -2004-11-02 Thomas Vander Stichele - - * bin/flumotion-manager.in: - * bin/flumotion-worker.in: - * bin/flumotion.in: - copy stuff over from other binaries - * flumotion/common/config.py: - * flumotion/manager/main.py: - add options for manager host and port - -2004-11-02 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - fixing pychecker warnings - -2004-11-02 Thomas Vander Stichele - - * bin/Makefile.am: - * bin/flumotion-manager.in: - * bin/flumotion-worker.in: - * bin/flumotion.in: - * conf/Makefile.am: - * conf/managers/default/planet.xml: - * conf/workers/default.xml: - * configure.ac: - * doc/Makefile.am: - * doc/redhat/flumotion: - * doc/redhat/init.d/flu-manager: - * doc/redhat/init.d/flu-worker: - * doc/redhat/sysconfig/flumotion-manager: - * doc/redhat/sysconfig/flumotion-worker: - * flumotion.spec.in: - * flumotion/Makefile.am: - * flumotion/common/common.py: - * flumotion/configure/Makefile.am: - * flumotion/configure/configure.py: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - * flumotion/manager/main.py: - * flumotion/service/Makefile.am: - * flumotion/service/__init__.py: - * flumotion/service/main.py: - * flumotion/service/service.py: - * flumotion/worker/config.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - restructuring and adding code to support decent init scripts - and correct daemon behaviour - -2004-11-02 Johan Dahlin - - * Makefile.am: - * bin/flumotion-manager.in: - * bin/flumotion-worker.in: - * configure.ac: - * flumotion/common/common.py: - * flumotion/common/registry.py: - * flumotion/common/setup.py: - * flumotion/configure/configure.py: - * flumotion/test/test_registry.py: - - Add support for FLU_REGISTRY_PATH - -2004-10-29 Johan Dahlin - - * data/glade/wizard_firewire.glade: - - Set 384 as default width and 576 as max height. - -2004-10-28 Thomas Vander Stichele - - * flumotion/component/consumers/httpstreamer/resources.py: - advertise correct Flumotion version - -2004-10-27 Thomas Vander Stichele - - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - a SIGCHLD handler can be called only once for multiple children, - so loop as long as we can and only consider a call where no children - were rept as a "special" (possibly wrong) case. This should fix - issue #73 - -2004-10-27 Thomas Vander Stichele - - * flumotion/wizard/wizard.py: - Throw up an error dialog if a worker is missing elements needed - for the step, and block going to the next one. - -2004-10-27 Thomas Vander Stichele - - * flumotion/wizard/steps.py: - Don't activate save to disk by default. If stuff like this - ever needs to be done, do it in the glade file instead. - -2004-10-26 Johan Dahlin - - * flumotion/component/producers/firewire/firewire.py: - - proper width and height in here, avoids unnecessary and ugly scaling. - -2004-10-26 Johan Dahlin - - * flumotion/test/test_wizard.py: - * flumotion/wizard/save.py: - * flumotion/wizard/wizard.py: - - Don't output firewire-audio if we have firewire-video - Add a test for this too. - -2004-10-26 Johan Dahlin - - * flumotion/wizard/save.py: - - Don't add firewire audio component twice. - -2004-10-26 Johan Dahlin - - * flumotion/wizard/save.py: - - Ensure width and height always is set. - -2004-10-25 Thomas Vander Stichele - - * configure.ac: - back to devel - -=== release 0.1.1 === - -2004-10-25 Thomas Vander Stichele - - * configure.ac: - releasing 0.1.1, "El Local" - -2004-10-25 Thomas Vander Stichele - - * flumotion/common/registry.py: - * flumotion/test/test_registry.py: - fix make distcheck. - -2004-10-25 Johan Dahlin - - * data/glade/wizard_firewire.glade: - * flumotion/wizard/save.py: - * flumotion/wizard/steps.py: - - Add firewire to the wizard and add good defaults. - -2004-10-25 Johan Dahlin - - * flumotion/component/producers/firewire/firewire.py: - - Add width, height and framerate - -2004-10-25 Johan Dahlin - - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - - Allow you to change worker and make things easily updatable - -2004-10-25 Thomas Vander Stichele - - * data/glade/wizard_vorbis.glade: - Fix quality setting, which is a float from 0.0 to 1.0 - -2004-10-25 Thomas Vander Stichele - - * configure.ac: - Check for Twisted's version. Fixes issue #46. - -2004-10-25 Thomas Vander Stichele - - * configure.ac: - check for Twisted, needs version check as well - * m4/as-python.m4: - new upstream version, check for python module - -2004-10-25 Johan Dahlin - - * flumotion/admin/admin.py: - * flumotion/worker/worker.py: - Change runCode to execute the parameter and make the admin - interface to it take a object, which it uses inspect.getsource to - retrieve the source. This allows us to just send in a function - instead of a string. - -2004-10-22 Johan Dahlin - - * data/glade/wizard_tvcard.glade: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/main.py: - * flumotion/common/errors.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - - Query the tv-card for information and use it in the wizard. - Fixes Issue #55 - -2004-10-22 Johan Dahlin - - * flumotion/wizard/wizard.py: - Don't use a global instance of the wizard, only save the steps - globally. Fixes Ticket #42 - - -2004-10-22 Johan Dahlin - - * Makefile.am: - * misc/pycheckerrc: - Add pychecker target and a configuration file that disables - the most retarded checks. - -2004-10-22 Johan Dahlin - - * flumotion/worker/worker.py: Make sure that we send a tuple with - exactly one item. - -2004-10-22 Thomas Vander Stichele - - * flumotion/admin/admin.py: - add errback handling to remote methods - * flumotion/worker/worker.py: - fix docs - -2004-10-21 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/main.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - - Check if elements are present on the worker before allowing us to - continue. Add some simple logging in the wizard. And Fix so - --wizard does something useful. - -2004-10-21 Thomas Vander Stichele - - * flumotion/test/test_worker_worker.py: - add regression tests - * flumotion/worker/job.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - install a signal handler correctly, tying into twisted's SIGCHLD - handler. This cleans up zombie workers nicely and closes #41 - -2004-10-21 Johan Dahlin - - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - - TV-Card producer should work better now. - -2004-10-21 Johan Dahlin - - * flumotion/admin/admin.py: - * flumotion/common/common.py: - * flumotion/manager/admin.py: - * flumotion/manager/worker.py: - * flumotion/test/test_common.py: - - Make a generic interface to call from the admin interface into the - worker. Add a method in common with regression tests to print a - repr for args/kwargs. - -2004-10-19 Thomas Vander Stichele - - * configure.ac: - back to svn, yay - -=== release 0.1.0 === - -2004-10-19 Thomas Vander Stichele - - * configure.ac: releasing 0.1.0, "Agua" - -2004-10-19 Johan Dahlin - - * data/glade/admin.glade: - Disable Save in the user interface for now - -2004-10-19 Thomas Vander Stichele - - * NEWS: - * README: - * data/glade/wizard_summary.glade: - adding README - changing ending - -2004-10-19 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/common/common.py: - * flumotion/common/config.py: - * flumotion/wizard/wizard.py: - -2004-10-19 Johan Dahlin - - * flumotion/wizard/wizard.py: - - Make the selecting of worker for a component actually work as - intented. Also load the previous steps when clicking back. - -2004-10-19 Thomas Vander Stichele - - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/manager/component.py: - * flumotion/manager/worker.py: - clean up INFO level messages - -2004-10-19 Johan Dahlin - - * bin/flumotion-admin.in: - * bin/flumotion-manager.in: - * bin/flumotion-tester.in: - * bin/flumotion-worker.in: - * flumotion/__init__.py: - * flumotion/admin/__init__.py: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/__init__.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/main.py: - * flumotion/admin/gtk/spyglass.py: - * flumotion/admin/gtk/videotest.py: - * flumotion/common/__init__.py: - * flumotion/common/bundle.py: - * flumotion/common/common.py: - * flumotion/common/config.py: - * flumotion/common/errors.py: - * flumotion/common/interfaces.py: - * flumotion/common/keycards.py: - * flumotion/common/log.py: - * flumotion/common/registry.py: - * flumotion/common/setup.py: - * flumotion/component/__init__.py: - * flumotion/component/base/__init__.py: - * flumotion/component/base/converter.py: - * flumotion/component/base/producer.py: - * flumotion/component/bouncers/__init__.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/component.py: - * flumotion/component/consumers/__init__.py: - * flumotion/component/consumers/disker/__init__.py: - * flumotion/component/consumers/disker/disker.py: - * flumotion/component/consumers/httpstreamer/__init__.py: - * flumotion/component/consumers/httpstreamer/gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/component/converters/__init__.py: - * flumotion/component/converters/overlay/__init__.py: - * flumotion/component/converters/overlay/genimg.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/encoders/jpeg.py: - * flumotion/component/encoders/mulaw.py: - * flumotion/component/encoders/smoke.py: - * flumotion/component/encoders/speex.py: - * flumotion/component/encoders/theora.py: - * flumotion/component/encoders/vorbis.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/muxers/multipart.py: - * flumotion/component/muxers/ogg.py: - * flumotion/component/producers/__init__.py: - * flumotion/component/producers/audiotest/__init__.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/bttv/__init__.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/soundcard/__init__.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/videotest/__init__.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/webcam/__init__.py: - * flumotion/component/producers/webcam/webcam.py: - * flumotion/configure/configure.py: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - * flumotion/manager/__init__.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/test/__init__.py: - * flumotion/test/common.py: - * flumotion/test/test_bundle.py: - * flumotion/test/test_checkers.py: - * flumotion/test/test_common.py: - * flumotion/test/test_component.py: - * flumotion/test/test_config.py: - * flumotion/test/test_configure.py: - * flumotion/test/test_credentials.py: - * flumotion/test/test_enum.py: - * flumotion/test/test_htpasswdcrypt.py: - * flumotion/test/test_http.py: - * flumotion/test/test_keycards.py: - * flumotion/test/test_log.py: - * flumotion/test/test_manager.py: - * flumotion/test/test_manager_admin.py: - * flumotion/test/test_pb.py: - * flumotion/test/test_reflect.py: - * flumotion/test/test_registry.py: - * flumotion/test/test_wizard.py: - * flumotion/test/test_worker_heaven.py: - * flumotion/test/test_workerconfig.py: - * flumotion/tester/__init__.py: - * flumotion/tester/client.py: - * flumotion/tester/clientfactory.py: - * flumotion/tester/httpclient.py: - * flumotion/twisted/__init__.py: - * flumotion/twisted/checkers.py: - * flumotion/twisted/credentials.py: - * flumotion/twisted/gstreactor.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - * flumotion/twisted/reflect.py: - * flumotion/utils/__init__.py: - * flumotion/utils/gstutils.py: - * flumotion/utils/reload.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - * flumotion/worker/__init__.py: - * flumotion/worker/config.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - - Update header licenses. - -2004-10-19 Thomas Vander Stichele - - * README: - add notes about licensing - * conf/managers/default/planet.xml: - change default username to user - * configure.ac: - update deps - * doc/random/header.py: - update default header - -2004-10-19 Wim Taymans - - * flumotion/wizard/enums.py: - * flumotion/wizard/steps.py: - Fix naming of the steps (bug #28, #29). - -2004-10-19 Wim Taymans - - * flumotion/component/producers/firewire/firewire.py: - Change the names of the feeds - -2004-10-19 Johan Dahlin - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/main.py: - - Add file->open and file->new in interface. Don't load default - configuration on startup. - -2004-10-19 Johan Dahlin - - * data/glade/admin.glade: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - - Add a clean button in the interface and methods in the medium and - avatar. - -2004-10-19 Johan Dahlin - - * flumotion/wizard/save.py: - Generate a runnable firewire configuration - -2004-10-19 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/component.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - update state in admin of components properly. Still hacky - since we say a component is ready when the first *feed* on it - is, but we'll fix that with moods ! - -2004-10-19 Thomas Vander Stichele - - * doc/random/header.py: - semi-final header - -2004-10-19 Johan Dahlin - - * flumotion/wizard/save.py: Boolean expression was broken, it's - now as it should be. - * flumotion/wizard/steps.py: Don't skip audio encoding page if we - have both audio and video. Don't skip encoding if we're chosing a - audio page without a configuration, instead of going directly to - consumption page. - -2004-10-19 Thomas Vander Stichele - - * doc/Makefile.am: - * doc/redhat/flu-manager: - * doc/redhat/flu-worker: - * doc/redhat/init.d/flu-manager: - * doc/redhat/sysconfig/flumotion-manager: - * doc/redhat/sysconfig/flumotion-worker: - * flumotion.spec.in: - - More package fixes, service starts up nicely now, yay - -2004-10-19 Johan Dahlin - - * data/glade/admin.glade: - * data/glade/wizard_source.glade: - * flumotion/admin/gtk/client.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/steps.py: - - Remove some broken stuff in the admin interface. - Improve the wizard, it was quite broken. - -2004-10-19 Thomas Vander Stichele - - * flumotion.spec.in: - * flumotion/manager/main.py: - moved pem, fixed an oops - -2004-10-19 Thomas Vander Stichele - - * conf/Makefile.am: - * doc/redhat/flu-manager: - * flumotion.spec.in: - fix dist - -2004-10-19 Johan Dahlin - - * configure.ac: - * flumotion/component/muxers/ogg.py: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/dv/Makefile.am: - * flumotion/component/producers/dv/__init__.py: - * flumotion/component/producers/dv/dv.py: - * flumotion/component/producers/dv/dv.xml: - * flumotion/component/producers/firewire/Makefile.am: - * flumotion/component/producers/firewire/__init__.py: - * flumotion/component/producers/firewire/firewire.py: - * flumotion/component/producers/firewire/firewire.xml: - - Remove dv component and add firewire - -2004-10-19 Johan Dahlin - - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/audiotest/audiotest.xml: - - Add freq property. - -2004-10-19 Johan Dahlin - - * data/image/wizard/Makefile.am: - * data/image/wizard/summary.png: - * flumotion/wizard/steps.py: - - Add summary icon and fix small regression. - -2004-10-19 Johan Dahlin - - * flumotion/test/Makefile.am: - * flumotion/test/test_workerconfig.py: - * flumotion/worker/Makefile.am: - * flumotion/worker/config.py: - - Add worker configuration and testsuite - -2004-10-19 Wim Taymans - - * flumotion/manager/main.py: - Fix typos and copy-and-paste errors. - -2004-10-19 Johan Dahlin - - reviewed by: - - * data/glade/Makefile.am: - * data/glade/wizard_audio_encoder.glade: - * data/glade/wizard_vorbis.glade: - * flumotion/manager/main.py: - * flumotion/wizard/steps.py: - -2004-10-19 Johan Dahlin - - * data/glade/Makefile.am: - * data/glade/wizard.glade: - * data/glade/wizard_audio_encoder.glade: - * data/glade/wizard_disk.glade: - * data/glade/wizard_license.glade: - * data/glade/wizard_smoke.glade: - * data/glade/wizard_summary.glade: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - - Add a summary step, tweak audio_encoder to show quality for vorbis - Change the disk button into an entry - Increase the size of the wizard slightly - -2004-10-18 Wim Taymans - - * conf/dv-ogg-theora-vorbis.xml: - * flumotion/manager/main.py: - Added ogg theora vorbis example - Fix correct var for the filename. - -2004-10-18 Thomas Vander Stichele - - * conf/Makefile.am: - * data/glade/Makefile.am: - * flumotion.spec.in: - updates - * flumotion/component/bouncers/Makefile.am: - * flumotion/component/converters/overlay/overlay.py: - import correctly, use tempfile - * flumotion/manager/main.py: - -2004-10-18 Johan Dahlin - - * data/glade/wizard_audiotest.glade: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/main.py: - * flumotion/manager/admin.py: - * flumotion/manager/worker.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - * flumotion/worker/worker.py: - add some checks for some elements, not using the result just yet. - -2004-10-18 Thomas Vander Stichele - - * bin/Makefile.am: - * conf/flows/ogg-test-theora.xml: - * configure.ac: - * doc/random/service: - * flumotion/manager/main.py: - make manager start up multiple xml files - -2004-10-18 Thomas Vander Stichele - - * configure.ac: - * flumotion/component/Makefile.am: - * flumotion/component/converters/Makefile.am: - * flumotion/component/converters/__init__.py: - * flumotion/component/converters/overlay/Makefile.am: - * flumotion/component/converters/overlay/__init__.py: - * flumotion/component/converters/overlay/genimg.py: - * flumotion/component/converters/overlay/overlay.py: - * flumotion/component/converters/overlay/overlay.xml: - * flumotion/component/overlay/Makefile.am: - * flumotion/component/overlay/Vera.ttf: - * flumotion/component/overlay/__init__.py: - * flumotion/component/overlay/cc.24x24.png: - * flumotion/component/overlay/fluendo.24x24.png: - * flumotion/component/overlay/genimg.py: - * flumotion/component/overlay/overlay.py: - * flumotion/component/overlay/overlay.xml: - * flumotion/component/overlay/xiph.24x24.png: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/__init__.py: - * flumotion/component/producers/webcam/Makefile.am: - * flumotion/component/producers/webcam/__init__.py: - * flumotion/component/producers/webcam/webcam.py: - * flumotion/component/producers/webcam/webcam.xml: - * flumotion/component/webcam/Makefile.am: - * flumotion/component/webcam/__init__.py: - * flumotion/component/webcam/webcam.py: - * flumotion/component/webcam/webcam.xml: - this should do the trick - -2004-10-18 Johan Dahlin - - * flumotion/admin/gtk/main.py: - * flumotion/common/config.py: - * flumotion/manager/worker.py: - * flumotion/worker/job.py: - - Improve startup wizard logic, still not good - cleanup configuration parsing, set worker on the entry object if - its specified in the tag - - Remove config and start-factory from dictionary, finally. - -2004-10-18 Thomas Vander Stichele - - * configure.ac: - * flumotion/component/Makefile.am: - * flumotion/component/bttv/Makefile.am: - * flumotion/component/bttv/__init__.py: - * flumotion/component/bttv/bttv.py: - * flumotion/component/bttv/bttv.xml: - * flumotion/component/dv/Makefile.am: - * flumotion/component/dv/__init__.py: - * flumotion/component/dv/dv.py: - * flumotion/component/dv/dv.xml: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/bttv/Makefile.am: - * flumotion/component/producers/bttv/__init__.py: - * flumotion/component/producers/bttv/bttv.py: - * flumotion/component/producers/bttv/bttv.xml: - * flumotion/component/producers/dv/Makefile.am: - * flumotion/component/producers/dv/__init__.py: - * flumotion/component/producers/dv/dv.py: - * flumotion/component/producers/dv/dv.xml: - moved dv and btt - -2004-10-18 Thomas Vander Stichele - - * configure.ac: - * flumotion/component/Makefile.am: - * flumotion/component/audiotest/Makefile.am: - * flumotion/component/audiotest/__init__.py: - * flumotion/component/audiotest/audiotest.py: - * flumotion/component/audiotest/audiotest.xml: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/audiotest/Makefile.am: - * flumotion/component/producers/audiotest/__init__.py: - * flumotion/component/producers/audiotest/audiotest.py: - * flumotion/component/producers/audiotest/audiotest.xml: - * flumotion/component/producers/soundcard/Makefile.am: - * flumotion/component/producers/soundcard/__init__.py: - * flumotion/component/producers/soundcard/soundcard.py: - * flumotion/component/producers/soundcard/soundcard.xml: - * flumotion/component/soundcard/Makefile.am: - * flumotion/component/soundcard/__init__.py: - * flumotion/component/soundcard/soundcard.py: - * flumotion/component/soundcard/soundcard.xml: - move audiotest and souncard - -2004-10-18 Thomas Vander Stichele - - * flumotion/test/Makefile.am: - * flumotion/test/test_manager_admin.py: - adding test - -2004-10-18 Johan Dahlin - - * data/glade/Makefile.am: - * data/glade/wizard.glade: - * data/glade/wizard_audio_encoder.glade: - * data/glade/wizard_audiotest.glade: - * data/glade/wizard_source.glade: - * data/glade/wizard_welcome.glade: - * flumotion/admin/gtk/main.py: - * flumotion/manager/worker.py: - * flumotion/test/test_worker_heaven.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - * flumotion/worker/main.py: - - Add audiotest component, add workers everywhere in the wizard and - save it properly. - Fix wizard debugging again. - -2004-10-18 Thomas Vander Stichele - - * configure.ac: - * flumotion/component/Makefile.am: - * flumotion/component/producers/Makefile.am: - * flumotion/component/producers/__init__.py: - * flumotion/component/producers/videotest/Makefile.am: - * flumotion/component/producers/videotest/__init__.py: - * flumotion/component/producers/videotest/videotest.py: - * flumotion/component/producers/videotest/videotest.xml: - * flumotion/component/videotest/Makefile.am: - * flumotion/component/videotest/__init__.py: - * flumotion/component/videotest/videotest.py: - * flumotion/component/videotest/videotest.xml: - move videotest to producers - -2004-10-18 Thomas Vander Stichele - - * configure.ac: - * flumotion/component/Makefile.am: - * flumotion/component/consumers/disker/Makefile.am: - * flumotion/component/consumers/disker/__init__.py: - * flumotion/component/consumers/httpstreamer/__init__.py: - * flumotion/component/consumers/httpstreamer/gtk.py: - * flumotion/component/consumers/httpstreamer/http.py: - * flumotion/component/consumers/httpstreamer/resources.py: - * flumotion/test/test_http.py: - * flumotion/wizard/save.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - move and rename consumer components and friends - -2004-10-18 Thomas Vander Stichele - - * TODO: - * flumotion/component/Makefile.am: - * flumotion/component/consumers/httpstreamer/Makefile.am: - * flumotion/component/consumers/httpstreamer/http.xml: - * flumotion/component/file/Makefile.am: - * flumotion/component/file/__init__.py: - * flumotion/component/file/file.py: - * flumotion/component/file/file.xml: - * flumotion/component/http/Makefile.am: - * flumotion/component/http/__init__.py: - * flumotion/component/http/gtk.py: - * flumotion/component/http/http.glade: - * flumotion/component/http/http.py: - * flumotion/component/http/http.xml: - * flumotion/component/http/resources.py: - moving and renaming components - -2004-10-18 Thomas Vander Stichele - - * flumotion/component/Makefile.am: - * flumotion/component/bouncers/Makefile.am: - * flumotion/component/bouncers/htpasswd.py: - * flumotion/component/bouncers/htpasswd.xml: - * flumotion/component/passwd/Makefile.am: - * flumotion/component/passwd/__init__.py: - * flumotion/component/passwd/passwd.py: - * flumotion/component/passwd/passwd.xml: - remove two unused components - -2004-10-18 Johan Dahlin - - * flumotion/component/file/file.py: - * flumotion/component/http/http.py: - - file: append an extension to the type - http: use get_element('sink') instead of get_sink() - -2004-10-18 Wim Taymans - - * flumotion/component/encoders/speex.py: - * flumotion/wizard/steps.py: - Fix speex encoding. - Set bitrate property range to sane values. - -2004-10-18 Johan Dahlin - - * flumotion/admin/gtk/main.py: - * flumotion/wizard/save.py: - * flumotion/wizard/wizard.py: - - Make --wizard and --debug work again. - - Create muxers when we need them and make sure to only create them - when they're needed. - -2004-10-18 Thomas Vander Stichele - - * flumotion/common/errors.py: - * flumotion/component/overlay/Makefile.am: - * flumotion/component/overlay/cc_24x24.png: - * flumotion/component/overlay/fluendo_24x24.png: - * flumotion/component/overlay/genimg.py: - * flumotion/component/overlay/xiph_24x24.png: - rename a little - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - handle failed imports more gracefully than before - -2004-10-18 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/component.py: - not having an UI is not an error. - clear UI in admin when no UI. - -2004-10-18 Wim Taymans - - * flumotion/admin/gtk/main.py: - * flumotion/manager/component.py: - Fix uninitialized var. - Fix dependency breakage. - -2004-10-18 Thomas Vander Stichele - - * flumotion/component/file/file.py: - make name slightly cleaner - * flumotion/component/webcam/webcam.py: - more webcam fixing, use filtercaps - -2004-10-17 Wim Taymans - - * data/glade/wizard_overlay.glade: - Fix typo. - -2004-10-17 Thomas Vander Stichele - - * data/glade/wizard_webcam.glade: - * flumotion/component/webcam/webcam.py: - turn off autoprobe - lock spinbutton's values to what webcams can actually do - -2004-10-17 Thomas Vander Stichele - - * flumotion/admin/admin.py: - fix Johan's bug - -2004-10-17 Johan Dahlin - - * flumotion/test/test_wizard.py: Fix test breakage - - * bin/flumotion-admin.in: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/main.py: - * flumotion/manager/admin.py: - * flumotion/manager/worker.py: - * flumotion/wizard/wizard.py: - - Integrate the Wizard into the admin client, almost works as it - should. - -2004-10-17 Thomas Vander Stichele - - * flumotion/component/feedcomponent.py: - * flumotion/configure/configure.py: - * flumotion/wizard/steps.py: - * flumotion/worker/worker.py: - also use default ports for streaming and GStreamer ports - -2004-10-17 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - * flumotion/configure/configure.py: - * flumotion/manager/main.py: - * flumotion/worker/main.py: - set the default ports for TCP, SSL, streamer and GStreamer - use the default manager ports everywhere - -2004-10-17 Thomas Vander Stichele - - * conf/flows/ogg-test-theora.xml: - * conf/planets/default.xml: - some changes for new structure - * flumotion.spec.in: - some additions - * configure.ac: - * flumotion/configure/configure.py: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - * flumotion/test/test_configure.py: - add logdir - * flumotion/manager/main.py: - * flumotion/manager/worker.py: - * flumotion/worker/main.py: - use logdir when daemonizing - -2004-10-17 Johan Dahlin - - * flumotion/component/audiotest/audiotest.py (createComponent): - Set sync to true for sinesrc, to avoid eating up all CPU. - - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/steps.py: - * flumotion/wizard/wizard.py: - - Make it optional to specifiy the mainloop, so we can run it from - the administration interface. - -2004-10-17 Wim Taymans - - * doc/random/authentication: - * flumotion/manager/component.py: - Added some FIXMEs. - Moved callback function. - -2004-10-17 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/manager/component.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/worker/main.py: - add options to -manager and -worker to daemonize - -2004-10-17 Thomas Vander Stichele - - * flumotion/common/keycards.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/manager/main.py: - * flumotion/twisted/pb.py: - 60% coverage ! - -2004-10-17 Johan Dahlin - - * data/glade/wizard_disk.glade: - * data/glade/wizard_http.glade: - * flumotion/common/config.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/file/file.py: - * flumotion/component/file/file.xml: - * flumotion/component/http/http.py: - * flumotion/test/test_config.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/steps.py: - - HTTP component: UI work, remove worker - Disk component: make it work again, UI work - -2004-10-17 Thomas Vander Stichele - - * flumotion/test/test_pb.py: - add missing tests, everything works, yay ! - -2004-10-17 Thomas Vander Stichele - - * flumotion/test/test_pb.py: - add a regression test for the complete FPBClientFactory - and fix others - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - commenting, documenting, fixing, logging - -2004-10-17 Thomas Vander Stichele - - * flumotion/twisted/portal.py: - cleanup - * flumotion/test/test_pb.py: - * flumotion/twisted/pb.py: - remove deprecated stuff: - FMClientFactory, _PortalRoot, _FPortalAuthChallenger - -2004-10-17 Thomas Vander Stichele - - * flumotion/manager/admin.py: - * flumotion/worker/worker.py: - doc fixes - * flumotion/twisted/portal.py: - document, remove FlumotionPortal - -2004-10-17 Thomas Vander Stichele - - * flumotion/manager/manager.py: - Remove ManagerCredentialsChecker which was deprecated. - -2004-10-17 Thomas Vander Stichele - - * flumotion/manager/admin.py: - * flumotion/twisted/portal.py: - The avatar was being removed twice, once by heaven, once by - detached. - Take opportunity to store avatarId's for admin and consistentify - with other heavens. - Still need to assign a unique id to admin clients. - -2004-10-17 Johan Dahlin - - * flumotion/component/http/Makefile.am: - * flumotion/component/http/http.py: - * flumotion/component/http/http_resources.py: - * flumotion/component/http/resources.py: - * flumotion/test/test_http.py: - * flumotion/test/test_wizard.py: - Johan needs to update this - - Rename http_resources to resources, and update tests. - Add more wizard tests - -2004-10-17 Thomas Vander Stichele - - * flumotion/component/component.py: - * flumotion/twisted/portal.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - component now logs in with same options as the worker it got - started from - -2004-10-17 Johan Dahlin - - * flumotion/wizard/wizard.py: Add very simple unittest for wizard - and its steps - - * flumotion/wizard/steps.py: Rename from wizard_step to make - thomas happy - - * flumotion/wizard/wizard.py: - * flumotion/wizard/wizard_step.py: - - Make it possible to go back to major steps. Fixes quite a few bugs. - Beginning of cleanup for the WizardStep API. - -2004-10-17 Johan Dahlin - - * data/glade/wizard_overlay.glade: - * flumotion/wizard/save.py: - * flumotion/wizard/wizard_step.py: - - Fixes to overlay component, it should only show a text if chose to - include one in the wizard. - -2004-10-17 Thomas Vander Stichele - - * TODO: - clean up todo, some things are already done, yay - -2004-10-17 Thomas Vander Stichele - - * conf/planet.xml: - * flumotion/common/config.py: - * flumotion/manager/worker.py: - * flumotion/test/test_config.py: - * flumotion/wizard/wizard.py: - * flumotion/wizard/wizard_step.py: - grid to flow - -2004-10-17 Thomas Vander Stichele - - * conf/planet.xml: - use htpasswdcrypt bouncer for manager and streamer - * flumotion/component/http/http_resources.py: - use KeycarUACPP instead of deprecated HTTPClientKeycard - * flumotion/component/bouncers/htpasswdcrypt.py: - return a random-ish salt when the username is not in the - backend to pretend everything's fine - * flumotion/component/component.py: - switch from reconnecting client factory to new FPBClientFactory - * flumotion/twisted/portal.py: - add new BouncerPortal wrapping an IRealm and a Bouncer - * flumotion/twisted/pb.py: - add new FPB Client and Server Factories - * flumotion/test/test_pb.py: - added - * flumotion/admin/gtk/client.py: - change password option to -d, pass on options to model - for keycard - * flumotion/admin/admin.py: - use FPBClientFactory - log in with an actual keycard, using Challenge/Response, yay ! - * flumotion/common/keycards.py: - set unjellyable, change repr - * flumotion/worker/worker.py: - use FPBClientFactory - * flumotion/worker/job.py: - log in component using keycard (currently UACPP, change later ?) - * flumotion/worker/main.py: - log in worker using keycard (currently UACPP, change later ?) - * flumotion/manager/manager.py: - use the bouncer portal now - * flumotion/manager/component.py: - some debugging - -2004-10-16 Johan Dahlin - - * data/glade/wizard_audio_encoder.glade: - * data/glade/wizard_consumption.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_overlay.glade: - * data/glade/wizard_theora.glade: - * data/image/wizard/firewire.png: - * data/image/wizard/webcam.png: - * flumotion/common/config.py: - * flumotion/component/overlay/Makefile.am: - * flumotion/component/overlay/genimg.py: - * flumotion/component/overlay/overlay.py: - * flumotion/component/overlay/overlay.xml: - * flumotion/test/test_config.py: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/wizard.py: - * flumotion/wizard/wizard_step.py: - - Some HIG fixes, Fix overlay component. Only show logos when we - should. - Make sidebar work somewhat better. - -2004-10-16 Thomas Vander Stichele - - * flumotion/test/test_common.py: - * flumotion/common/common.py: - write a mergeImplements function to merge __implements__ class - attributes - * flumotion/common/keycard.py: - removed - * flumotion/common/keycards.py: - additions - * flumotion/component/bouncers/bouncer.py: - verify that the bouncer can prime the given keycard - * flumotion/twisted/checkers.py: - * flumotion/test/test_checkers.py: - return a deferred failure when the user is not in the database, - so it looks the same as a wrong password and can't be exploited - * flumotion/component/bouncers/htpasswdcrypt.py: - * flumotion/component/bouncers/htpasswdcrypt.xml: - implement actual functionality - * flumotion/test/Makefile.am: - * flumotion/test/test_htpasswdcrypt.py: - added - * flumotion/test/test_keycards.py: - test initing of keycard - * flumotion/twisted/credentials.py: - fix __implements__ - -2004-10-16 Johan Dahlin - - * flumotion/worker/worker.py: Clean up error - handling in worker brain. - - * flumotion/component/Makefile.am: - * flumotion/component/audiotest/Makefile.am: - * flumotion/component/audiotest/__init__.py: - * flumotion/component/audiotest/audiotest.py: - * flumotion/component/audiotest/audiotest.xml: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/wizard_step.py: - - Add an audiotest step (sinesrc) - -2004-10-16 Johan Dahlin - - * flumotion/component/overlay/Makefile.am: - * flumotion/component/overlay/cc_24x24.png: - * flumotion/component/overlay/fluendo_24x24.png: - * flumotion/component/overlay/overlay.py: - * flumotion/component/overlay/xiph_24x24.png: - * flumotion/twisted/gstreactor.py: - * flumotion/wizard/wizard_step.py: - - Add logos to overlay component, remove some prints in gstreactor - -2004-10-16 Thomas Vander Stichele - - * TODO: - * conf/planet.xml: - * doc/random/authentication: - * flumotion/common/keycards.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_credentials.py: - * flumotion/test/test_keycards.py: - * flumotion/twisted/credentials.py: - add tests and add some keycards - -2004-10-16 Johan Dahlin - - * data/image/wizard/Makefile.am (image_DATA): Add a few more icons - for the wizard - - * flumotion/manager/component.py (ComponentHeaven.shutdown): - Remove the avatar - (ComponentHeaven.createAvatar, ComponentHeaven.removeAvatar): Add - logging. - (ComponentHeaven.removeAvatar): Remove feeders too - (FeederSet.removeFeeders): New method. - - * flumotion/manager/main.py (_loadConfig): Don't parse the - configuration twice. - -2004-10-15 Johan Dahlin - - * configure.ac: - * data/glade/wizard.glade: - * data/image/wizard/audiosrc.png: - * data/image/wizard/consumption.png: - * data/image/wizard/firewire.png: - * data/image/wizard/licenses.png: - * data/image/wizard/overlay.png: - * data/image/wizard/source.png: - * data/image/wizard/testsource.png: - * data/image/wizard/webcam.png: - * data/image/wizard/wizard.png: - * data/image/wizard/xiphfish.png: - * flumotion/component/encoders/smoke.py: - * flumotion/component/encoders/speex.py: - * flumotion/wizard/wizard.py: - * flumotion/wizard/wizard_step.py: - - Wizard work, commit some icons. - -2004-10-15 Johan Dahlin - - * flumotion/test/: Add a few new unittests. - -2004-10-15 Thomas Vander Stichele - - * flumotion/test/test_checkers.py: - * flumotion/twisted/checkers.py: - cred checkers tests and fixes - -2004-10-15 Thomas Vander Stichele - - * flumotion/test/Makefile.am: - * flumotion/test/test_checkers.py: - * flumotion/twisted/checkers.py: - add a CryptChecker and a test. TEST NUMBER 100, WOOHOO ! - -2004-10-15 Thomas Vander Stichele - - * flumotion/test/Makefile.am: - * flumotion/test/test_credentials.py: - * flumotion/twisted/credentials.py: - add CryptPassword related credentials and tests - -2004-10-15 Thomas Vander Stichele - - * TODO: - * doc/random/header.py: - reworded header after call with the lawyer - -2004-10-15 Johan Dahlin - - * flumotion/test/Makefile.am: Add more unittests - - * flumotion/component/encoders/encoders.xml: - * flumotion/component/encoders/jpeg.py: - * flumotion/component/encoders/mulaw.py: - * flumotion/component/muxers/muxers.xml: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - - Multipart/Mulaw/JPEG now works. - -2004-10-15 Thomas Vander Stichele - - * conf/planet.xml: - * flumotion/twisted/reflect.py: - add missing files - -2004-10-15 Johan Dahlin - - * conf/minimal.xml: - * conf/videotest-jpeg.xml: - * flumotion/common/config.py: - * flumotion/component/component.py: - * flumotion/component/encoders/theora.py: - * flumotion/component/http/http_resources.py: - * flumotion/component/overlay/overlay.py: - * flumotion/component/overlay/overlay.xml: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/worker/worker.py - * flumotion/worker/job.py - * flumotion/worker/report.py - * flumotion/worker/main.py - * flumotion/wizard/save.py: - * flumotion/wizard/wizard_step.py: - - Update configuration for minimal and videotest. - Fix some errors found by pychecker. - Make the overlay component generate an image on the fly. - Make the worker use fork() instead of ProcessProtocol. - -2004-10-15 Thomas Vander Stichele - - * Makefile.am: - * flumotion/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/configure/Makefile.am: - * flumotion/manager/Makefile.am: - * flumotion/tester/Makefile.am: - * flumotion/twisted/Makefile.am: - * flumotion/utils/Makefile.am: - * flumotion/wizard/Makefile.am: - * flumotion/worker/Makefile.am: - dist fixes - -2004-10-15 Thomas Vander Stichele - - * flumotion/manager/manager.py: - * flumotion/twisted/pb.py: - * flumotion/twisted/portal.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - merge back portal stuff that came from pb into pb - -2004-10-15 Thomas Vander Stichele - - * doc/reference/Makefile.am: - * flumotion/admin/admin.py: - * flumotion/component/component.py: - * flumotion/twisted/Makefile.am: - * flumotion/twisted/pb.py: - * flumotion/twisted/pbutil.py: - * flumotion/worker/worker.py: - move pbutil.py to pb.py - -2004-10-15 Thomas Vander Stichele - - * doc/reference/Makefile.am: - add twisted stuff - * flumotion/admin/admin.py: - * flumotion/component/component.py: - * flumotion/manager/manager.py: - * flumotion/twisted/Makefile.am: - * flumotion/twisted/checkers.py: - * flumotion/twisted/cred.py: - * flumotion/twisted/credentials.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - split out cred.py to credentials.py and checkers.py so they - match twisted's .py names - -2004-10-15 Thomas Vander Stichele - - * TODO: - some more notes - * flumotion/component/http/http_resources.py: - fix bug when mountpoint is not specified - * flumotion/component/bouncers/htpasswd.py: - * flumotion/component/bouncers/htpasswd.xml: - also allow specifying raw data instead of a filename to init - * flumotion/admin/admin.py: - * flumotion/common/config.py: - add parsing of a raw string - * flumotion/manager/worker.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - * flumotion/twisted/portal.py: - documenting - * flumotion/manager/manager.py: - use the bouncer to authenticate workers, comps and admin to follow - * flumotion/manager/main.py: - create a bouncer component which we don't start, yay ! - -2004-10-14 Thomas Vander Stichele - - * flumotion/common/config.py: - * flumotion/component/bouncers/htpasswd.xml: - * flumotion/component/component.py: - * flumotion/manager/component.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/test/test_config.py: - * flumotion/twisted/cred.py: - * flumotion/twisted/pbutil.py: - * flumotion/twisted/portal.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - move to the final xml configuration syntax for - add an avatarId request to pb.client and portal so pb.client - can request a specific avatarId when logging in - -2004-10-14 Johan Dahlin - - * flumotion/test/test_http.py: Fix rest regressions. - - * doc/reference/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/common/auth.py: - * flumotion/component/http/http.py: - * flumotion/component/http/http.xml: - - Kill auth, replaced by bouncer. - -2004-10-14 Johan Dahlin - - * flumotion/component/feedcomponent.py: - * flumotion/component/http/Makefile.am: - * flumotion/component/http/http.py: - * flumotion/component/http/http.xml: - - Separate twisted resources to a separate file, implement - mount_point and clean up some other things - -2004-10-14 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - * flumotion/common/common.py: - * flumotion/manager/main.py: - * flumotion/worker/main.py: - put in --version, synchronize options, use lowercase - -2004-10-14 Thomas Vander Stichele - - * bin/Makefile.am: - * bin/flumotion.in: - * configure.ac: - rename flumotion to flumotion-manager - - * flumotion/test/Makefile.am: - fix test - -2004-10-14 Johan Dahlin - - * flumotion/component/feedcomponent.py: - * flumotion/component/videotest/videotest.py: - * flumotion/component/videotest/videotest.xml: - * flumotion/wizard/enums.py: - * flumotion/wizard/wizard_step.py: - - Fix videotest fix pattern property. Add a method on feedcomponent - to get an element from a pipeline. - -2004-10-13 Thomas Vander Stichele - - * doc/reference/Makefile.am: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/spyglass.py: - * flumotion/admin/gtk/videotest.py: - * flumotion/common/Makefile.am: - * flumotion/common/config.py: - * flumotion/common/log.py: - * flumotion/common/registry.py: - * flumotion/common/setup.py: - * flumotion/component/component.py: - * flumotion/component/http/http.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/test/test_log.py: - * flumotion/test/test_manager.py: - * flumotion/tester/clientfactory.py: - * flumotion/tester/httpclient.py: - * flumotion/utils/Makefile.am: - * flumotion/utils/log.py: - * flumotion/utils/reload.py: - * flumotion/wizard/wizard.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - utils.log -> common.log - -2004-10-13 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - * flumotion/common/launcher.py: - remove common.launcher - -2004-10-13 Thomas Vander Stichele - - * doc/reference/Makefile.am: - * flumotion/common/config.py: - * flumotion/common/interfaces.py: - * flumotion/common/registry.py: - * flumotion/component/component.py: - * flumotion/manager/manager.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - fix doc class hierarchy, fill in module descriptions - -2004-10-13 Thomas Vander Stichele - - * configure.ac: - * doc/reference/Makefile.am: - * flumotion/Makefile.am: - * flumotion/admin/gtk/spyglass.py: - * flumotion/admin/gtk/videotest.py: - * flumotion/common/registry.py: - * flumotion/common/setup.py: - * flumotion/config/Makefile.am: - * flumotion/config/__init__.py: - * flumotion/config/installed.py.in: - * flumotion/config/setup.py: - * flumotion/config/uninstalled.py.in: - * flumotion/configure/Makefile.am: - * flumotion/configure/__init__.py: - * flumotion/configure/configure.py: - * flumotion/configure/installed.py.in: - * flumotion/configure/uninstalled.py.in: - * flumotion/manager/main.py: - * flumotion/test/test_configure.py: - * flumotion/test/test_flumotion_config.py: - * flumotion/test/test_log.py: - * flumotion/wizard/wizard.py: - put all configure-time stuff in flumotion.configure package - -2004-10-13 Johan Dahlin - - * Makefile.am (test): New target - - * flumotion/test/test_log.py (TestOwnLogHandler.setUp) - (TestLog.setUp): Reset logging here, to avoid having unwanted - logging functions installed when running this test. - - * flumotion/utils/log.py (reset): New method, to remove all - logging handlers - - * data/glade/wizard_audio_encoder.glade: - * flumotion/component/base/producer.py: - * flumotion/component/encoders/encoders.xml: - * flumotion/component/encoders/theora.py: - * flumotion/component/encoders/vorbis.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/muxers/muxers.xml: - * flumotion/component/muxers/ogg.py: - * flumotion/component/soundcard/soundcard.py: - * flumotion/component/soundcard/soundcard.xml: - * flumotion/component/videotest/videotest.py: - * flumotion/component/videotest/videotest.xml: - * flumotion/component/webcam/webcam.py: - * flumotion/component/webcam/webcam.xml: - * flumotion/manager/component.py: - * flumotion/wizard/wizard_step.py: - - Woho, the default configuration is not only parsable, but - runnable! - -2004-10-13 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - * flumotion/manager/main.py: - * flumotion/worker/Makefile.am: - * flumotion/worker/job.py: - * flumotion/worker/launcher.py: - * flumotion/worker/main.py: - synchronize more options - make admin client log in with ssl as well - -2004-10-13 Thomas Vander Stichele - - * conf/manager/flumotion.pem: - add a dummy cert - * configure.ac: - add SYSCONFDIR - * flumotion/config/installed.py.in: - * flumotion/config/uninstalled.py.in: - add configdir - * flumotion/manager/main.py: - * flumotion/twisted/cred.py: - * flumotion/worker/job.py: - * flumotion/worker/launcher.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - implement SSL option (-t on worker and manager) - -2004-10-13 Johan Dahlin - - * flumotion/common/Makefile.am: Add setup.py - - * configure.ac: - * data/glade/wizard_overlay.glade: - * flumotion/component/Makefile.am: - * flumotion/component/encoders/jpeg.py: - * flumotion/component/encoders/mulaw.py: - * flumotion/component/encoders/smoke.py: - * flumotion/component/encoders/speex.py: - * flumotion/component/encoders/theora.py: - * flumotion/component/encoders/vorbis.py: - * flumotion/component/muxers/Makefile.am: - * flumotion/component/muxers/__init__.py: - * flumotion/component/muxers/muxers.xml: - * flumotion/component/muxers/ogg.py: - * flumotion/component/soundcard/Makefile.am: - * flumotion/component/soundcard/__init__.py: - * flumotion/component/soundcard/soundcard.py: - * flumotion/component/soundcard/soundcard.xml: - * flumotion/component/webcam/Makefile.am: - * flumotion/component/webcam/__init__.py: - * flumotion/component/webcam/webcam.py: - * flumotion/component/webcam/webcam.xml: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/wizard_step.py: - - Fix headers for encoders. Add ogg muxer, soundcard and webcam - components. - We can now actually parse the default output of the wizard. - -2004-10-12 Johan Dahlin - - * configure.ac: - * flumotion/component/encoders/Makefile.am: - * flumotion/component/encoders/encoders.xml: - * flumotion/component/encoders/mulaw.py: - * flumotion/component/encoders/speex.py: - * flumotion/component/encoders/vorbis.py: - * flumotion/wizard/save.py: - * flumotion/wizard/wizard_step.py: - - And audio encoders. - -2004-10-12 Johan Dahlin - - * flumotion/component/Makefile.am: - * flumotion/component/encoders/Makefile.am: - * flumotion/component/encoders/__init__.py: - * flumotion/component/encoders/encoders.xml: - * flumotion/component/encoders/jpeg.py: - * flumotion/component/encoders/smoke.py: - * flumotion/component/encoders/theora.py: - * flumotion/wizard/save.py: - * flumotion/wizard/wizard_step.py: - - Add video encoders. - -2004-10-12 Johan Dahlin - - * bin/flumotion-admin.in: - * flumotion/admin/gtk/client.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/enums.py: - * flumotion/wizard/save.py: - * flumotion/wizard/wizard.py: - * flumotion/wizard/wizard_step.py: - - Make the wizard spit out proper configuration files. Now we just - need to write all these components. Ignore all UserWarnings, - perhaps this is the wrong workaround for broken gtk2reactor. - - -2004-10-12 Thomas Vander Stichele - - * flumotion/component/http/http.py: - make PROPFIND return 501 - -2004-10-12 Thomas Vander Stichele - - * flumotion/component/http/http.py: - make HEAD requests work - -2004-10-12 Thomas Vander Stichele - - * conf/ogg-test-theora-bouncer.xml: - * conf/ogg-test-theora.xml: - add s - * flumotion/component/http/http.py: - revert back to my last version to fix bugs one by one - -2004-10-12 Thomas Vander Stichele - - * configure.ac: - * flumotion/component/Makefile.am: - * flumotion/component/bouncer.py: - * flumotion/component/bouncer.xml: - * flumotion/component/bouncers/Makefile.am: - * flumotion/component/bouncers/__init__.py: - * flumotion/component/bouncers/bouncer.py: - * flumotion/component/bouncers/bouncer.xml: - bounce the bouncer around - -2004-10-12 Thomas Vander Stichele - - * flumotion/common/keycards.py: - * flumotion/component/bouncer.py: - * flumotion/component/http/http.py: - implement duration and expire - -2004-10-12 Thomas Vander Stichele - - * flumotion/manager/component.py: - * flumotion/test/test_manager.py: - uniformize, privatize, rewrite, remove, restructure - -2004-10-12 Johan Dahlin - - * flumotion/component/http/http.py: - Allow grids without a bouncer. Refactor stuff a little bit. Show - a better error message for PROPFIND requests. - - * data/glade/Makefile.am: - * data/glade/wizard.glade: - * data/glade/wizard_welcome.glade: - * flumotion/admin/gtk/client.py: - * flumotion/wizard/wizard.py: - * flumotion/wizard/wizard_step.py: - - Add a welcome step, add --wizard argument to flumotion-admin and - run the wizard from there instead. - -2004-10-12 Thomas Vander Stichele - - * flumotion/manager/component.py: - * flumotion/test/test_manager.py: - uniformize and privatize getComponent(Eaters/Feeders)Data - -2004-10-11 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/component.py: - * flumotion/component/http/http.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - move ui file bundling to base class and formalize a bit - -2004-10-11 Thomas Vander Stichele - - * flumotion/common/Makefile.am: - * flumotion/common/interfaces.py: - * flumotion/common/keycards.py: - * flumotion/component/bouncer.py: - * flumotion/component/http/http.py: - * flumotion/manager/component.py: - * flumotion/test/test_http.py: - make keycards module. bouncer now works. - -2004-10-11 Johan Dahlin - - * Makefile.am: - * bin/flumotion-admin.in: - * bin/flumotion-worker.in: - * bin/flumotion.in: - * doc/reference/gendoc.py: - * flumotion/common/setup.py: - * flumotion/config/__init__.py: - * flumotion/config/setup.py: - * flumotion/test/common.py: - * flumotion/tools/show-coverage: - - Add tool to show coverage. Clean up flumotion.config a little - bit. There is now a common function (flumotion.config.setup.setup) - to initialize parts, it should probably be made a little bit more - flexible, but that's for later - -2004-10-07 Thomas Vander Stichele - - * conf/ogg-test-theora-bouncer.xml: - * flumotion/common/keycard.py: - * flumotion/component/component.py: - * flumotion/component/http/http.py: - * flumotion/manager/component.py: - * flumotion/worker/job.py: - add a keycard.py, make keycard remote copyable - send the keycard to the manager, which returns True for now - next step: to the bouncer ! - -2004-10-07 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/common/interfaces.py: - * flumotion/component/bouncer.py: - * flumotion/component/component.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/http/http.py: - * flumotion/manager/manager.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - We have a new name for an Avatar's sidekick: Medium - use it everywhere - -2004-10-07 Thomas Vander Stichele - - * conf/ogg-test-vorbis-theora.xml: - * flumotion/common/config.py: - * flumotion/component/base/base.xml: - * flumotion/component/feedcomponent.py: - * flumotion/component/http/http.py: - * flumotion/component/http/http.xml: - * flumotion/manager/component.py: - * flumotion/manager/worker.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - a bunch of changes allowing non-feed components to start up. - still needs some work. - -2004-10-07 Thomas Vander Stichele - - * flumotion/config/installed.py.in: - * flumotion/config/uninstalled.py.in: - add version number - -2004-10-07 Johan Dahlin - - * flumotion/component/http/http.py - (HTTPStreamingResource._render): Fix HEAD and PROPFIND for - component, so gnome-vfs 2.6.0 can sniff the content-type without - barking. - - * flumotion/common/registry.py (ComponentRegistry.getFileList): - Make it recursive - - * flumotion/test/test_registry.py (TestFindComponents): and add - some tests - -2004-10-06 Thomas Vander Stichele - - * flumotion/component/Makefile.am: - * flumotion/manager/manager.py: - * flumotion/twisted/cred.py: - * flumotion/twisted/portal.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - remove confusion, add comments - -2004-10-05 Thomas Vander Stichele - - * flumotion/component/Makefile.am: - * flumotion/component/base/converter.py: - * flumotion/component/base/producer.py: - * flumotion/component/component.py: - * flumotion/component/feedcomponent.py: - * flumotion/component/file/file.py: - * flumotion/component/http/http.py: - * flumotion/test/test_component.py: - separate out feedcomponent to a separate file - -2004-10-05 Thomas Vander Stichele - - * TODO: - * flumotion/admin/admin.py: - * flumotion/common/interfaces.py: - * flumotion/component/component.py: - * flumotion/component/http/http.py: - * flumotion/manager/manager.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - rename interfaces for the views that handle remote calls from - manager - split out FeedComponent from BaseComponent in preparation for - other types of component - -2004-10-05 Johan Dahlin - - * data/glade/wizard.glade: - * flumotion/test/Makefile.am: - * flumotion/test/test_enum.py: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/enums.py: - * flumotion/wizard/wizard.py: - * flumotion/wizard/wizard_step.py: - - More enum work. - -2004-10-04 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/common/launcher.py: - * flumotion/component/component.py: - * flumotion/manager/component.py: - * flumotion/worker/job.py: - * flumotion/worker/launcher.py: - make server/client factory explicit - -2004-10-04 Thomas Vander Stichele - - * Makefile.am: - * TODO: - * bin/flumotion-worker.in: - * bin/flumotion.in: - * conf/Makefile.am: - * conf/complex.xml: - * conf/ogg-test-theora.xml: - * conf/ogg-test-vorbis-theora.xml: - * conf/videotest-jpeg.xml: - * flumotion/component/component.py: - * flumotion/component/http/http.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/test/Makefile.am: - * flumotion/test/common.py: - * flumotion/test/test_component.py: - * flumotion/test/test_manager.py: - * flumotion/utils/log.py: - * flumotion/worker/Makefile.am: - * flumotion/worker/job.py: - * flumotion/worker/report.py: - * flumotion/worker/worker.py: - merge diffs between revision 681 on branch and trunk to trunk - -2004-10-04 Thomas Vander Stichele - - branch: johan-workers - - * flumotion/manager/component.py: - and this should fix that problem by delaying adding of the component - avatar to the feeder - -2004-10-01 Thomas Vander Stichele - - branch: johan-workers - - * flumotion/manager/component.py: - I guess this explains why I get random tracebacks in the manager. - This means I can go home and fix it on monday. - -2004-10-01 Thomas Vander Stichele - - branch: johan-workers - - * TODO: - * flumotion/test/Makefile.am: - make test dir stop "make" on errors - * flumotion/manager/component.py: - * flumotion/test/test_manager.py: - some more cleanups - -2004-10-01 Thomas Vander Stichele - - branch: johan-workers - - * Makefile.am: - * TODO: - * conf/complex.xml: - * flumotion/component/component.py: - * flumotion/component/http/http.py: - * flumotion/manager/component.py: - * flumotion/manager/worker.py: - * flumotion/test/common.py: - * flumotion/test/test_component.py: - * flumotion/test/test_manager.py: - * flumotion/worker/job.py: - * flumotion/worker/worker.py: - server starts up now in the correct order, yay ! - -2004-09-30 Thomas Vander Stichele - - branch: johan-workers - - * flumotion/component/component.py: - * flumotion/manager/component.py: - finally arrived at the next error - -2004-09-30 Thomas Vander Stichele - - branch: johan-workers - - * flumotion/utils/log.py: - add PID - * flumotion/component/component.py: - * flumotion/manager/component.py: - * flumotion/worker/__init__.py: - * flumotion/worker/job.py: - * flumotion/worker/launcher.py: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - clear up confusion with feedName, feederName, and friends - document and comment - -2004-09-29 Thomas Vander Stichele - - * flumotion/manager/worker.py: - * flumotion/worker/job.py: - * flumotion/worker/main.py: - * flumotion/worker/report.py: - * flumotion/worker/worker.py: - merging report functionality with worker.py - clean up and comment - -2004-09-29 Thomas Vander Stichele - - branch: johan-workers - - * bin/flumotion-worker.in: - make it just like flumotion.in - * flumotion/worker/Makefile.am: - * flumotion/worker/main.py: - * flumotion/worker/worker.py: - split it up similarly to manager - -2004-09-29 Thomas Vander Stichele - - * conf/ogg-test-theora.xml: - use username and password and stuff - * flumotion/worker/job.py: - * flumotion/worker/report.py: - * flumotion/worker/worker.py: - rename some objects, restructure main() - -2004-09-30 Johan Dahlin - - * data/glade/Makefile.am: - * data/glade/wizard.glade: - * data/glade/wizard_audio_encoder.glade: - * data/glade/wizard_audiosource.glade: - * data/glade/wizard_consumption.glade: - * data/glade/wizard_disk.glade: - * data/glade/wizard_encoding.glade: - * data/glade/wizard_firewire.glade: - * data/glade/wizard_http.glade: - * data/glade/wizard_jpeg.glade: - * data/glade/wizard_overlay.glade: - * data/glade/wizard_smoke.glade: - * data/glade/wizard_source.glade: - * data/glade/wizard_testsource.glade: - * data/glade/wizard_theora.glade: - * data/glade/wizard_tvcard.glade: - * data/glade/wizard_webcam.glade: - * flumotion/wizard/Makefile.am: - * flumotion/wizard/__init__.py: - * flumotion/wizard/wizard.py: - * flumotion/wizard/wizard_step.py: - - More wizard work. Most pages in - place and pretty functional. No configuration saving yet. Need a - little bit more logic aswell. - -2004-09-28 Johan Dahlin - - * data/glade/wizard.glade: - * data/glade/wizard_audiosource.glade: - * data/glade/wizard_source.glade: - * data/glade/wizard_testsource.glade: - * data/glade/wizard_tvcard.glade: - * flumotion/wizard/wizard_step.py: - - Do some more wizard work - -2004-09-28 Thomas Vander Stichele - - * configure.ac: bump nano version for development - -=== release 0.0.1 === - -2004-09-28 Thomas Vander Stichele - - * configure.ac: releasing 0.0.1, "Backsy" - -2004-09-28 Thomas Vander Stichele - - * bin/Makefile.am: - getting ready for release, disable nonworking stuff from install - * flumotion/component/component.py: - give more info in a warning - -2004-09-28 Thomas Vander Stichele - - * bin/flumotion-admin.in: - * bin/flumotion-tester.in: - * bin/flumotion-worker.in: - * bin/flumotion.in: - * bin/runtest.in: - * doc/random/header.py: - * flumotion/__init__.py: - * flumotion/admin/__init__.py: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/__init__.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - * flumotion/admin/gtk/spyglass.py: - * flumotion/admin/gtk/videotest.py: - * flumotion/common/__init__.py: - * flumotion/common/auth.py: - * flumotion/common/bundle.py: - * flumotion/common/common.py: - * flumotion/common/config.py: - * flumotion/common/errors.py: - * flumotion/common/interfaces.py: - * flumotion/common/launcher.py: - * flumotion/common/registry.py: - * flumotion/component/__init__.py: - * flumotion/component/base/__init__.py: - * flumotion/component/base/converter.py: - * flumotion/component/base/producer.py: - * flumotion/component/bttv/__init__.py: - * flumotion/component/bttv/bttv.py: - * flumotion/component/component.py: - * flumotion/component/dv/__init__.py: - * flumotion/component/dv/dv.py: - * flumotion/component/file/__init__.py: - * flumotion/component/file/file.py: - * flumotion/component/http/__init__.py: - * flumotion/component/http/gtk.py: - * flumotion/component/http/http.py: - * flumotion/component/multipartjpeg/__init__.py: - * flumotion/component/multipartjpeg/multipartjpeg.py: - * flumotion/component/overlay/__init__.py: - * flumotion/component/overlay/overlay.py: - * flumotion/component/passwd/__init__.py: - * flumotion/component/passwd/passwd.py: - * flumotion/component/videotest/__init__.py: - * flumotion/component/videotest/videotest.py: - * flumotion/config/__init__.py: - * flumotion/config/installed.py.in: - * flumotion/config/uninstalled.py.in: - * flumotion/manager/__init__.py: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/manager/main.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/test/__init__.py: - * flumotion/test/common.py: - * flumotion/test/test_bundle.py: - * flumotion/test/test_common.py: - * flumotion/test/test_component.py: - * flumotion/test/test_config.py: - * flumotion/test/test_flumotion_config.py: - * flumotion/test/test_http.py: - * flumotion/test/test_log.py: - * flumotion/test/test_manager.py: - * flumotion/test/test_registry.py: - * flumotion/tester/__init__.py: - * flumotion/tester/client.py: - * flumotion/tester/clientfactory.py: - * flumotion/tester/httpclient.py: - * flumotion/twisted/__init__.py: - * flumotion/twisted/cred.py: - * flumotion/twisted/gstreactor.py: - * flumotion/twisted/pbutil.py: - * flumotion/twisted/portal.py: - * flumotion/twisted/shell.py: - * flumotion/utils/__init__.py: - * flumotion/utils/gstutils.py: - * flumotion/utils/log.py: - * flumotion/utils/reload.py: - * flumotion/worker/__init__.py: - * flumotion/worker/job.py: - * flumotion/worker/launcher.py: - * flumotion/worker/report.py: - * flumotion/worker/worker.py: - synchronize headers of source code - -2004-09-25 Thomas Vander Stichele - - * flumotion/utils/Makefile.am: - install reload.py - -2004-09-25 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/test/test_common.py: - nicely format time with common.formatTime() - -2004-09-25 Thomas Vander Stichele - - * flumotion/common/common.py: - * flumotion/component/http/http.py: - display SI units - -2004-09-25 Thomas Vander Stichele - - * doc/reference/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/common/common.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_common.py: - A slight case of overengineering. - At least we follow SI units correctly now. - -2004-09-24 Thomas Vander Stichele - - * doc/reference/Makefile.am: - remove spyglass for now - * flumotion/manager/manager.py: - rename and privatize sensibly - -2004-09-24 Thomas Vander Stichele - - * flumotion/component/component.py: - fix reload. Fixes revision 596. - -2004-09-23 Thomas Vander Stichele - - * flumotion/component/http/http.py: - handle add and remove by putting them on a lock-protected queue - instead of using gobject-y stuff. - -2004-09-23 Thomas Vander Stichele - - * flumotion/component/http/http.py: - comment out the right signal emission to see if it fixes problems - -2004-09-23 Thomas Vander Stichele - - * flumotion/component/http/http.py: - disable a signal emission to see if it keeps the server going - -2004-09-22 Thomas Vander Stichele - - * flumotion/manager/component.py: - components -> avatars - rename and privatize addComponent to _addAvatar - * flumotion/manager/manager.py: - getAvatarFor -> createAvatarFor - * flumotion/test/test_manager.py: - rename Perspective to Avatar - -2004-09-22 Thomas Vander Stichele - - * flumotion/manager/manager.py: - commenting some more, privatize a function - -2004-09-17 Johan Dahlin - - * flumotion/common/config.py: - * flumotion/common/registry.py: - * flumotion/config/__init__.py: - * flumotion/manager/worker.py: - * flumotion/test/Makefile.am: - * flumotion/test/test_config.py: - * flumotion/utils/log.py: - - Move test_config to test_flumotion_config and add test_config for - common/config. Write test suite for test_config and fix a couple - of bugs meanwhile. - -2004-09-17 Johan Dahlin - - * flumotion/component/http/http.py: Implement admin-password, - fixes Ticket #10 - - * flumotion/manager/worker.py: Make optional - - * bin/flumotion-tester.in: Move imports down a little bit. - - * flumotion/component/http/http.py - (MultifdSinkStreamer.client_removed_idle): Don't close the file - descriptor here. - (HTTPStreamingResource.removeClient): Call request.finish() and - let python/twisted take care of closing the fd. Fixes a number of - bugs. Together with latest version of multifdsink we have a much - more stable server. - -2004-09-17 Thomas Vander Stichele - - * TODO: - * flumotion/component/http/http.py: - update at most once every second. re-enable updating but not - with idle_add, but boolean, which doesn't care if it's threadsafe. - -2004-09-16 Thomas Vander Stichele - - * bin/flumotion-tester.in: - * flumotion/tester/client.py: - * flumotion/tester/clientfactory.py: - * flumotion/tester/httpclient.py: - provide a decent set of options to influence behaviour of static - http clients - -2004-09-16 Johan Dahlin - - * flumotion/common/config.py: - Add basic support for and and worker on component - - * flumotion/admin/admin.py: - * flumotion/component/component.py: - * flumotion/manager/admin.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/twisted/Makefile.am: - * flumotion/twisted/cred.py: - * flumotion/twisted/pbutil.py: - - Deprecate pbutil.ReallyAllowAnonymousAcces and replace it by - cred.FlexibleCredentials, for which we can turn on/off anonymous - access whenever we want. - -2004-09-16 Johan Dahlin - - * flumotion/worker/job.py: - * flumotion/worker/report.py: - * flumotion/worker/worker.py: - - Proper command line parsing for worker/job - -2004-09-16 Thomas Vander Stichele - - * flumotion/component/http/http.py: - disable idle_add from other threads for now; we run into GIL - lock stalls. An idea might be to just set a self.changed boolean - and have a callLater from the main thread repeatedly check and - signal ui changed. - -2004-09-15 Thomas Vander Stichele - - * flumotion/component/http/http.py: - threading fixes, twisted now "sees" only on thread - first pass at fixing race issues - now needs gst-plugins 0.8.4.1 (cvs) - -2004-09-15 Thomas Vander Stichele - - * bin/flumotion-tester.in: - * flumotion/tester/client.py: - * flumotion/tester/httpclient.py: - more cleanup - -2004-09-15 Thomas Vander Stichele - - * bin/Makefile.am: - * bin/flumotion-tester.in: - * configure.ac: - * flumotion/Makefile.am: - * flumotion/tester/__init__.py: - * flumotion/tester/client.py: - * flumotion/tester/httpclient.py: - add tester classes and application, also needs cleanup - -2004-09-15 Johan Dahlin - - * bin/runtest.in: make it a little bit smarter - - * flumotion/common/registry.py (ComponentRegistry.addFromString): - new method, helps testing - (ComponentRegistry.hasComponent): Fix a bug, use self.components - instead of self.component - - * flumotion/test/test_registry.py: New file, to test basic parsing - -2004-09-15 Thomas Vander Stichele - - * TODO: - * flumotion/test/test_log.py: - unfuck test - -2004-09-15 Thomas Vander Stichele - - * TODO: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/common/bundle.py: - * flumotion/common/launcher.py: - * flumotion/component/component.py: - * flumotion/component/http/gtk.py: - * flumotion/component/http/http.glade: - * flumotion/component/http/http.py: - * flumotion/component/http/http.xml: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - make http statistics work. Needs more cleanup and discussion. - -2004-09-15 Johan Dahlin - - * flumotion/worker/job.py: - * flumotion/worker/launcher.py: - * flumotion/worker/report.py: - * flumotion/worker/worker.py: - - Shutdown cleanly. - -2004-09-14 Thomas Vander Stichele - - * flumotion/common/bundle.py: - * flumotion/test/test_bundle.py: - add relative paths to bundle - -2004-09-14 Thomas Vander Stichele - - * flumotion/common/bundle.py: - * flumotion/test/test_bundle.py: - test unbundler - -2004-09-14 Thomas Vander Stichele - - * flumotion/common/bundle.py: - * flumotion/test/test_bundle.py: - rework bundle to also have unbundler - -2004-09-14 Johan Dahlin - - * bin/runtest.in (olddir): script to run tests - - * flumotion/component/http/http.py (MultifdSinkStreamer.notify_caps_cb) - (MultifdSinkStreamer.update_ui_state): Use idle_add to emit - signals, to ensure that they are sent from the main thread - - * flumotion/worker: Commit worker, still WIP - - * flumotion/test/test_log.py: - Add, 2 tests skipped now, will handle them later - -2004-09-14 Thomas Vander Stichele - - * data/glade/Makefile.am: - * data/glade/http.glade: - add UI for http component - -2004-09-14 Johan Dahlin - - * flumotion/test/: Move testsuite over here and use trial. - - * flumotion/manager/worker.py (WorkerHeaven): Clean up, almost - ready for general consumption. - - * flumotion/manager/component.py (ComponentAvatar.getListenHost): - Support new and old twisted code for getting the host - - * flumotion/manager/admin.py (AdminAvatar): - I don't implement IHeaven, really. - - * flumotion/manager/main.py: New file, currently unused - - * flumotion/common/config.py (ConfigEntry.getWorker): - Add dummy getWorker() method - - * testsuite/tests/log.py (TestLog.testLogHandlerAssertion): Add test - - * flumotion/utils/log.py (addLogHandler): Doc fix, add pedantic - assertion. - -2004-09-13 Johan Dahlin - - * conf/minmal.xml: add a minimal configuration for testing purposes. - -2004-09-13 Thomas Vander Stichele - - * TODO: - * flumotion/utils/log.py: - * testsuite/tests/log.py: - add tests for logging - -2004-09-13 Johan Dahlin - - * flumotion/common/bundle.py: - * flumotion/component/component.py: - * flumotion/component/http/http_gui.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * testsuite/tests/bundle.py: - - Documentation updates. Bundle fixes. - -2004-09-13 Thomas Vander Stichele - - * flumotion/admin/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/component/Makefile.am: - * flumotion/config/Makefile.am: - * flumotion/manager/Makefile.am: - * flumotion/twisted/Makefile.am: - * flumotion/utils/Makefile.am: - * flumotion/worker/Makefile.am: - adding ctags generation - -2004-09-13 Thomas Vander Stichele - - * flumotion/component/component.py: - * flumotion/manager/component.py: - remove depreciation warnings - -2004-09-12 Thomas Vander Stichele - - * flumotion/component/bttv/bttv.py: - import producer correctly - -2004-09-12 Thomas Vander Stichele - - * flumotion/manager/admin.py: - change componentmanager to c-heaven - -2004-09-10 Johan Dahlin - - * doc/reference/Makefile.am: - * flumotion/common/launcher.py: - * flumotion/manager/Makefile.am: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * flumotion/manager/worker.py: - * flumotion/utils/log.py: - * flumotion/worker/launcher.py: - * flumotion/worker/worker.py: - - Merge in new manager code, add a worker heaven and clean up the - relation between the different heavens. Best of all, we now have - a Vishnu object. - -2004-09-09 Thomas Vander Stichele - - * doc/reference/Makefile.am: - * flumotion/admin/admin.py: - * flumotion/common/bundle.py: - * flumotion/common/interfaces.py: - * flumotion/manager/admin.py: - * flumotion/manager/manager.py: - various doc fixes - -2004-09-09 Thomas Vander Stichele - - * flumotion/Makefile.am: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - small bugfixes - * flumotion/common/Makefile.am: - * flumotion/common/bundle.py: - * testsuite/tests/Makefile.am: - * testsuite/tests/bundle.py: - add module for bundling of files into a zip with caching - * testsuite/tests/config.py: - fix test - -2004-09-09 Thomas Vander Stichele - - * flumotion/component/http/http.py: - * flumotion/component/http/http_gui.py: - use getStats() for HTML stats page as well - -2004-09-09 Thomas Vander Stichele - - * data/glade/admin.glade: - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - abstract tie between model and view further. - add a reload of only one component to speed up debugging. - -2004-09-09 Johan Dahlin - - * bin/Makefile.am: - * bin/flumotion-admin.in: - * bin/flumotion-worker.in: - * configure.ac: - * flumotion/Makefile.am: - * flumotion/manager/component.py: - * flumotion/worker/Makefile.am: - * flumotion/worker/__init__.py: - * flumotion/worker/launcher.py: - * flumotion/worker/worker.py: - - Add basic worker script - -2004-09-08 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/http/http.py: - * flumotion/component/http/http_gui.py: - rearranging some code so I understand what to do tomorrow. - -2004-09-08 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/component/component.py: - * flumotion/component/http/http.py: - * flumotion/component/http/http_gui.py: - * flumotion/manager/component.py: - layout statistics more nicely. Add peak time. - -2004-09-08 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - make progress dialog a bit better, with updates on what it's reloading - -2004-09-08 Thomas Vander Stichele - - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - change interface according to suggestions - -2004-09-08 Thomas Vander Stichele - - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/gtk/client.py: - * flumotion/admin/gtk/dialogs.py: - add a Gtk progress dialog - -2004-09-08 Thomas Vander Stichele - - * flumotion/admin/admin.py: - * flumotion/admin/gtk/client.py: - change clients to components. - -2004-09-08 Thomas Vander Stichele - - * bin/flumotion-admin.in: - * configure.ac: - * flumotion/admin/__init__.py: - * flumotion/admin/adminclient.py: - * flumotion/admin/admininterface.py: - * flumotion/admin/gtk/Makefile.am: - * flumotion/admin/gtk/__init__.py: - move actual client to gtk - -2004-09-08 Thomas Vander Stichele - - * bin/flumotion-admin.in: - * configure.ac: - * flumotion/Makefile.am: - * flumotion/admin/adminclient.py: - * flumotion/gui/adminclient.py: - * flumotion/gui/admininterface.py: - * flumotion/gui/streamclient.py: - * flumotion/manager/manager.py: - move gui to admin - -2004-09-08 Thomas Vander Stichele - - * TODO: - * doc/reference/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/common/launcher.py: - * flumotion/manager/Makefile.am: - * flumotion/manager/config.py: - move manager.config to common - -2004-09-08 Thomas Vander Stichele - - * bin/flumotion.in: - * flumotion/manager/registry.py: - put registry in homedir. create higher-level directories. - turn on logging before registry checks. - -2004-09-08 Thomas Vander Stichele - - * autogen.sh: - * configure.ac: - remove autoheader and related things - * data/Makefile.am: - * data/registry/Makefile.am: - remove - * data/registry/basecomponents.xml: - * flumotion/config/installed.py.in: - * flumotion/config/uninstalled.py.in: - add registrydir config setting - put installed version in homedir - * flumotion/manager/registry.py: - change to components.xml - -2004-09-08 Johan Dahlin - - * flumotion/manager/admin.py (AdminHeaven): - * flumotion/manager/component.py (ComponentHeaven): Implement - IHeaven interface - - * flumotion/common/interfaces.py (IHeaven.removeAvatar): Add a - bunch of new interfaces - -2004-09-08 Thomas Vander Stichele - - * flumotion/Makefile.am: - * testsuite/Makefile.am: - * testsuite/runtests.py: - first stab at making make distcheck work again - -2004-09-08 Johan Dahlin - - * tests/manager.py: update tests. - - * flumotion/manager/component.py (ComponentHeaven): rename and - move from manager.Manager - -2004-09-08 Thomas Vander Stichele - - * Makefile.am: - * configure.ac: - * tests/Makefile.am: - * tests/common.py.in: - * tests/runtests.py: - * tests/tests/Makefile.am: - * tests/tests/component_http.py: - * tests/tests/component_parse.py: - * tests/tests/config.py: - * tests/tests/manager.py: - * tests/webbie.py: - move to testsuite - -2004-09-08 Thomas Vander Stichele - - * configure.ac: - * tests/Makefile.am: - * tests/config.py: - * tests/manager.py: - * tests/runtests.py: - * tests/test_component_parse.py: - * tests/test_http.py: - move actual tests to a subdir - -2004-09-08 Thomas Vander Stichele - - * bin/flumotion.in: - * doc/reference/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/manager/Makefile.am: - * flumotion/manager/launcher.py: - move launcher to common - -2004-09-08 Thomas Vander Stichele - - * doc/reference/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/component/http/http.py: - * flumotion/manager/Makefile.am: - * flumotion/manager/auth.py: - move auth to common - -2004-09-08 Thomas Vander Stichele - - * TODO: - * bin/flumotion.in: - * configure.ac: - * doc/reference/Makefile.am: - * flumotion/Makefile.am: - * flumotion/common/Makefile.am: - * flumotion/component/Makefile.am: - * flumotion/component/base/Makefile.am: - * flumotion/component/bttv/Makefile.am: - * flumotion/component/component.py: - * flumotion/component/dv/Makefile.am: - * flumotion/component/file/Makefile.am: - * flumotion/component/http/Makefile.am: - * flumotion/component/http/http.py: - * flumotion/component/multipartjpeg/Makefile.am: - * flumotion/component/overlay/Makefile.am: - * flumotion/component/passwd/Makefile.am: - * flumotion/component/passwd/passwd.py: - * flumotion/component/videotest/Makefile.am: - * flumotion/config/Makefile.am: - * flumotion/errors.py: - * flumotion/gui/Makefile.am: - * flumotion/gui/adminclient.py: - * flumotion/gui/admininterface.py: - * flumotion/interfaces.py: - * flumotion/manager/Makefile.am: - * flumotion/manager/admin.py: - * flumotion/manager/auth.py: - * flumotion/manager/component.py: - * flumotion/manager/interfaces.py: - * flumotion/manager/manager.py: - * flumotion/twisted/Makefile.am: - * flumotion/twisted/errors.py: - * flumotion/utils/Makefile.am: - * flumotion/utils/gstutils.py: - * flumotion/utils/log.py: - * flumotion/utils/proctitle.py: - * tests/test_http.py: - create flumotion.common and put errors and interfaces there - remove proctitle - add a clean-local rule everywhere for .pyc and .pyo - -2004-09-08 Johan Dahlin - - * flumotion/manager/launcher.py (Launcher.launch_component): Clean - up here aswell, so we have a better idea what needs to be sent - over the wire - - * flumotion/manager/config.py: Cleanup considerable, try to do - things at the same place - -2004-09-07 Thomas Vander Stichele - - * flumotion/manager/Makefile.am: - * flumotion/manager/admin.py: - * flumotion/manager/component.py: - * flumotion/manager/manager.py: - * tests/manager.py: - created manager/component.py, yay ! - -2004-09-07 Thomas Vander Stichele - - * flumotion/manager/admin.py: - * flumotion/manager/manager.py: - change doc crosslinks to match - -2004-09-07 Thomas Vander Stichele - - * doc/reference/Makefile.am: - * flumotion/component/Makefile.am: - * flumotion/component/base/converter.py: - * flumotion/component/base/producer.py: - * flumotion/component/file/file.py: - * flumotion/component/http/http.py: - * flumotion/component/passwd/passwd.py: - * flumotion/manager/Makefile.am: - * flumotion/manager/component.py: - * flumotion/manager/launcher.py: - * tests/test_component_parse.py: - move server.component to component.component, yay - -2004-09-07 Thomas Vander Stichele - - * configure.ac: - * data/registry/basecomponents.xml: - * doc/reference/Makefile.am: - * flumotion/Makefile.am: - * flumotion/component/Makefile.am: - * flumotion/component/base/Makefile.am: - * flumotion/component/base/base.xml: - * flumotion/component/bttv/Makefile.am: - * flumotion/component/bttv/bttv.py: - * flumotion/component/bttv/bttv.xml: - * flumotion/component/dv/Makefile.am: - * flumotion/component/dv/dv.py: - * flumotion/component/dv/dv.xml: - * flumotion/component/file/Makefile.am: - * flumotion/component/file/file.xml: - * flumotion/component/http/Makefile.am: - * flumotion/component/http/http.xml: - * flumotion/component/multipartjpeg/Makefile.am: - * flumotion/component/multipartjpeg/multipartjpeg.py: - * flumotion/component/multipartjpeg/multipartjpeg.xml: - * flumotion/component/overlay/Makefile.am: - * flumotion/component/overlay/overlay.py: - * flumotion/component/overlay/overlay.xml: - * flumotion/component/passwd/Makefile.am: - * flumotion/component/passwd/passwd.xml: - * flumotion/component/videotest/Makefile.am: - * flumotion/component/videotest/videotest.py: - * flumotion/component/videotest/videotest.xml: - * flumotion/components/Makefile.am: - * flumotion/components/__init__.py: - * flumotion/components/base/Makefile.am: - * flumotion/components/base/__init__.py: - * flumotion/components/base/base.xml: - * flumotion/components/base/converter.py: - * flumotion/components/base/producer.py: - * flumotion/components/bttv/Makefile.am: - * flumotion/components/bttv/__init__.py: - * flumotion/components/bttv/bttv.py: - * flumotion/components/bttv/bttv.xml: - * flumotion/components/dv/Makefile.am: - * flumotion/components/dv/__init__.py: - * flumotion/components/dv/dv.py: - * flumotion/components/dv/dv.xml: - * flumotion/components/file/Makefile.am: - * flumotion/components/file/__init__.py: - * flumotion/components/file/file.py: - * flumotion/components/file/file.xml: - * flumotion/components/http/Makefile.am: - * flumotion/components/http/__init__.py: - * flumotion/components/http/http.py: - * flumotion/components/http/http.xml: - * flumotion/components/http/http_gui.py: - * flumotion/components/multipartjpeg/Makefile.am: - * flumotion/components/multipartjpeg/__init__.py: - * flumotion/components/multipartjpeg/multipartjpeg.py: - * flumotion/components/multipartjpeg/multipartjpeg.xml: - * flumotion/components/overlay/Makefile.am: - * flumotion/components/overlay/__init__.py: - * flumotion/components/overlay/overlay.py: - * flumotion/components/overlay/overlay.xml: - * flumotion/components/passwd/Makefile.am: - * flumotion/components/passwd/__init__.py: - * flumotion/components/passwd/passwd.py: - * flumotion/components/passwd/passwd.xml: - * flumotion/components/videotest/Makefile.am: - * flumotion/components/videotest/__init__.py: - * flumotion/components/videotest/videotest.py: - * flumotion/components/videotest/videotest.xml: - * flumotion/manager/Makefile.am: - * flumotion/manager/registry.py: - * tests/test_http.py: - flumotion.components -> flumotion.component - -2004-09-07 Thomas Vander Stichele - - * bin/flumotion.in: - * configure.ac: - * doc/reference/Makefile.am: - * flumotion/Makefile.am: - * flumotion/components/base/converter.py: - * flumotion/components/base/producer.py: - * flumotion/components/file/file.py: - * flumotion/components/http/http.py: - * flumotion/components/passwd/passwd.py: - * flumotion/gui/adminclient.py: - * flumotion/gui/admininterface.py: - * flumotion/manager/admin.py: - * flumotion/manager/auth.py: - * flumotion/manager/component.py: - * flumotion/manager/config.py: - * flumotion/manager/launcher.py: - * flumotion/manager/manager.py: - * flumotion/server/Makefile.am: - * flumotion/server/__init__.py: - * flumotion/server/admin.py: - * flumotion/server/auth.py: - * flumotion/server/component.py: - * flumotion/server/config.py: - * flumotion/server/interfaces.py: - * flumotion/server/launcher.py: - * flumotion/server/manager.py: - * flumotion/server/registry.py: - * tests/manager.py: - * tests/test_component_parse.py: - * tests/test_http.py: - - move server to manager. First stab, now need to move parts - not related to manager out. - -2004-09-07 Thomas Vander Stichele - - * flumotion/server/admin.py: - subclass log.Loggable - -2004-09-07 Thomas Vander Stichele - - * doc/reference/Makefile.am: - hide line - * flumotion/server/manager.py: - * tests/manager.py: - change FeederManager to FeederSet - -2004-09-07 Thomas Vander Stichele - - * flumotion/components/base/converter.py: - * flumotion/components/base/producer.py: - * flumotion/components/file/file.py: - * flumotion/components/http/http.py: - * flumotion/server/admin.py: - * flumotion/server/component.py: - * flumotion/server/manager.py: - * tests/manager.py: - * tests/test_component_parse.py: - use eaters and feeders as names for feeded and feeding elements - -2004-09-07 Thomas Vander Stichele - - * flumotion/server/manager.py: - * flumotion/utils/gstutils.py: - * flumotion/utils/log.py: - documentation and method renaming/ordering - -2004-09-07 Thomas Vander Stichele - - * doc/reference/Makefile.am: - add check-local that lets us know what we forgot - * doc/reference/gendoc.py: - * flumotion/gui/adminclient.py: - * flumotion/gui/admininterface.py: - * flumotion/server/admin.py: - * flumotion/server/component.py: - * flumotion/server/launcher.py: - * flumotion/server/manager.py: - * flumotion/twisted/errors.py: - rename controller to manager - -2004-09-07 Thomas Vander Stichele - - * flumotion/server/Makefile.am: - * flumotion/server/controller.py: - rename to manager - -2004-09-07 Thomas Vander Stichele - - * flumotion/gui/admininterface.py: - * flumotion/server/admin.py: - * flumotion/server/controller.py: - * flumotion/utils/__init__.py: - properly stack reload calls one after another - -2004-09-07 Johan Dahlin - - * flumotion/components/http/http.py: - * flumotion/gui/adminclient.py: - * flumotion/gui/admininterface.py: - * flumotion/server/component.py: - * flumotion/utils/gstutils.py: - - Added gsignal function to help install simple signals, use it over - the code. Clean up component_view property slightly too. - -2004-09-06 Thomas Vander Stichele - - * flumotion/utils/log.py: - add timestamp similar to syslog - -2004-09-06 Johan Dahlin - - * flumotion/components/http/http.py: - * flumotion/components/http/http_gui.py: - * flumotion/gui/adminclient.py: - * flumotion/gui/admininterface.py: - * flumotion/server/admin.py: - * flumotion/server/component.py: - * flumotion/server/controller.py: - - Add notifications to administrative interface, improve http view slightly - -2004-09-06 Johan Dahlin - - * flumotion/server/launcher.py (Launcher): Enable core dumps by - default and cleanup logging. - -2004-09-03 Thomas Vander Stichele - - * flumotion/gui/adminclient.py: - * flumotion/gui/admininterface.py: - document and rename - * flumotion/server/admin.py: - more avatar fixes - * flumotion/server/component.py: - fix doc build warning - * flumotion/server/controller.py: - more avatar fixes - * flumotion/twisted/gstreactor.py: - fix doc build warning - -2004-09-03 Thomas Vander Stichele - - * flumotion/server/admin.py: - reorganize doc strings - -2004-09-03 Thomas Vander Stichele - - * flumotion/components/http/http.py: - self.error on blocked port - * flumotion/server/admin.py: - * flumotion/server/controller.py: - use Avatar instead of Perspective - -2004-09-03 Thomas Vander Stichele - - * flumotion/twisted/gstreactor.py: - print on KeyboardInterrupt until we figure out where the problem is. - -2004-09-03 Thomas Vander Stichele - - * flumotion/gui/adminclient.py: - properly handle error dialog. - -2004-09-03 Johan Dahlin - - * flumotion/components/http/http.py - (HTTPStreamingAdminResource.render_stats): Start cleaning up the - statistics so we eventually can move them to a separate class. - - * flumotion/server/config.py (ConfigEntry.getComponent): Move back - function and clean up slightly. - - * flumotion/components/http/http.py: - * flumotion/components/http/http_gui.py: - * flumotion/gui/admininterface.py: - * flumotion/server/admin.py: - * flumotion/server/component.py: - * flumotion/server/controller.py: - - Implement basic avatar proxy: to proxy method between the admin - interface and the component interface. So far it's only one way - and currently no error checking. Fixes Ticket #1 - -2004-09-03 Thomas Vander Stichele - - * flumotion/config/__init__.py: - fix config with reload - -2004-09-03 Thomas Vander Stichele - - * flumotion/gui/admininterface.py: - fix callbacks for reload - -2004-09-03 Johan Dahlin - - * flumotion/gui/adminclient.py: Add an green icon for playing and - a red one otherwise. - - * flumotion/server/controller.py: Make user interface work again - -2004-09-02 Johan Dahlin - - * flumotion/gui/admininterface.py (AdminInterface): Use debugging - framework instead of prints - -2004-09-01 Thomas Vander Stichele - - * flumotion/server/launcher.py: - * flumotion/utils/log.py: - remove enableLogging and disableLogging. Use new method, - setFluDebug. Make that reset levels on the fly as well. - -2004-09-01 Thomas Vander Stichele - - * flumotion/utils/log.py: - fix up debugging system, FLU_DEBUG now works like in GStreamer, - but with categories registered as they are encountered. - -2004-09-01 Thomas Vander Stichele - - * bin/flumotion-admin.in: - * bin/flumotion.in: - trigger FLU_DEBUG parsing with debug.init - * data/glade/admin.glade: - change name - * flumotion/gui/adminclient.py: - * flumotion/server/component.py: - * flumotion/server/controller.py: - * flumotion/utils/__init__.py: - add flumotion.utils.log to blacklist - * flumotion/utils/log.py: - - -2004-09-01 Thomas Vander Stichele - - * bin/flumotion-admin.in: - * flumotion/config/installed.py.in: - * flumotion/config/uninstalled.py.in: - fix locations properly - * flumotion/gui/adminclient.py: - set default icon - -2004-09-01 Thomas Vander Stichele - - * bin/Makefile.am: - * bin/video-server-admin.in: - * configure.ac: - rename video-server-admin to flumotion-admin - -2004-09-01 Thomas Vander Stichele - - * configure.ac: - * data/Makefile.am: - * data/image/fluendo.png: - * data/ui/Makefile.am: - * data/ui/admin.glade: - * data/ui/spyglass.glade: - * data/ui/videotest.glade: - * flumotion/admin/spyglass.py: - * flumotion/admin/videotest.py: - * flumotion/gui/adminclient.py: - create data/image and data/glade - use it everywhere - add and set app icon - -2004-09-01 Thomas Vander Stichele - - * bin/video-server-admin.in: - * flumotion/components/http/http.py: - * flumotion/gui/adminclient.py: - * flumotion/server/admin.py: - * flumotion/server/component.py: - * flumotion/server/controller.py: - adding reload on all levels, works now - * flumotion/twisted/errors.py: - add ReloadSyntaxError - -2004-09-01 Johan Dahlin - - * data/registry/basecomponents.xml: - * flumotion/components/http/http.py: - * flumotion/components/http/http.xml: - * flumotion/components/http/http_gui.py: - * flumotion/components/passwd/passwd.py: - * flumotion/gui/adminclient.py: - * flumotion/server/admin.py: - * flumotion/server/component.py: - * flumotion/server/config.py: - * flumotion/server/controller.py: - * flumotion/server/registry.py: Add *very* basic support for transmitting - user interface over the wire. Still full of hacks. - -2004-09-01 Thomas Vander Stichele - - * data/ui/admin.glade: - * flumotion/gui/adminclient.py: - * flumotion/server/admin.py: - * flumotion/server/controller.py: - * flumotion/utils/__init__.py: - Add a Reload code button. Add utility function to reload - flumotion modules. And it actually works as well. - -2004-09-01 Thomas Vander Stichele - - * flumotion/gui/adminclient.py: - handle dialogs a bit nicer. - error dialogs for exceptions raised on controller or component. - * flumotion/server/admin.py: - * flumotion/server/component.py: - * flumotion/server/controller.py: - handle/forward exceptions - * flumotion/twisted/errors.py: - * flumotion/utils/gstutils.py: - better error messages for properties. - allow setting of strings. - -2004-08-31 Johan Dahlin - - * flumotion/server/registry.py (ComponentRegistry): Implement - saving and merging - - * flumotion/components: Split out to subdirectories and move out - configuration to separate files - - * flumotion/twisted/portal.py (namedAny): Use a method of - comparing the raised import message that actually works. - -2004-08-31 Thomas Vander Stichele - - * flumotion/server/admin.py: - clean up detached admin clients' perspective from Admin - * flumotion/twisted/portal.py: - remove DEBUG print - -2004-08-31 Thomas Vander Stichele - - * flumotion/twisted/portal.py: - Copy and adapt namedAny to check for the actual textual message - instead of length of backtrace. Issue filed in twisted as - http://www.twistedmatrix.com/users/roundup.twistd/twisted/issue698 - -2004-08-31 Johan Dahlin - - * flumotion/server/interfaces.py (IAdminComponent): Add a new interface - - * flumotion/server/controller.py (Dispatcher.requestAvatar): And - use it here - - * flumotion/twisted/pbutil.py (FMClientFactory): New factory, to - be used instead PBClientFactory - - * flumotion/gui/adminclient.py (AdminInterface.__init__): Use it here - - * flumotion/server/component.py (ComponentFactory.login): - - * flumotion/twisted/pbutil.py - (ReconnectingPBClientFactory.startLogin): - - Make sure that all PBClientFactories that connect sends in - IPerspective - -2004-08-30 Thomas Vander Stichele - - * flumotion/server/admin.py: - * flumotion/server/controller.py: - clean up handling of mind - * flumotion/utils/log.py: - fix functions for debug and log, duh. - -2004-08-30 Johan Dahlin - - * flumotion/server/interfaces.py (IBaseComponent): - * flumotion/server/controller.py (Dispatcher.requestAvatar): - * flumotion/twisted/portal.py: - * flumotion/twisted/pbutil.py: - Support different interfaces - also add a base interface (IBaseComponent) - which all components must inherit from - unfortunately this involves copying a little bit of code - from twisted, but what can we do? - -2004-08-30 Thomas Vander Stichele - - * flumotion/server/admin.py: - * flumotion/server/controller.py: - * flumotion/twisted/pbutil.py: - remove NewCredPerspective since it's a pb.Avatar and we override - attached and detached anyway - -2004-08-27 Thomas Vander Stichele - - * flumotion/gui/adminclient.py: - * flumotion/server/admin.py: - * flumotion/server/controller.py: - lots of documenting - -2004-08-27 Johan Dahlin - - * flumotion/server/controller.py (__all__): Don't export private - classes. - (Feed.setReady): Use a boolean for ready instead of state, so we - can remove silly enums. - (Feed.isReady): New method - - * flumotion/server/error.py: Remove, since it was unused. - - * TODO: Add some more items - - * flumotion/components/http.py (HTTPStreamingAdminResource): - Implement maxclient support - - * flumotion/components/file.py (FileStreamingResource): Show - filename when restarting the component - -2004-08-24 Thomas Vander Stichele - - * flumotion/gui/adminclient.py: - * flumotion/server/admin.py: - * flumotion/server/component.py: - * flumotion/server/controller.py: - * flumotion/utils/log.py: - various logging and commenting - -2004-08-18 Thomas Vander Stichele - - * flumotion/utils/log.py: - create Loggable class, to be subclassed, to handle logging - * flumotion/components/converter.py: - * flumotion/components/http.py: - * flumotion/components/producer.py: - * flumotion/gui/adminclient.py: - * flumotion/server/admin.py: - * flumotion/server/component.py: - * flumotion/server/config.py: - * flumotion/server/controller.py: - * flumotion/server/launcher.py: - subclass Loggable where-ever - -2004-08-18 Johan Dahlin - - * flumotion/components/file.py (FileSinkStreamer.__init__): - Implement changing of filename - (FileStreamingResource.__init__): New resource for auth interface - (why is it called auth??) - - * flumotion/components/http.py (HTTPStreamingResource.setLogfile): - Append logfile - - * data/registry/basecomponents.xml: Add auth-port to http-streamer - -2004-08-18 Thomas Vander Stichele - - * flumotion/server/component.py: - add all handlers - -2004-08-17 Johan Dahlin - - * tests/test_component_parse.py (PipelineTest.__init__): Call - __gobject_init__ to avoid segfault. - - * flumotion/components/multipartjpeg.py (createComponent): Add quality - - * flumotion/server/component.py (BaseComponent.debug): Rename gst - only functions to use gtk style - - * conf/videotest-jpeg.xml: remove big - -2004-08-17 Thomas Vander Stichele - - * flumotion/components/http.py: - fix average client code - -2004-08-17 Thomas Vander Stichele - - * conf/multipart-bttv-overlay-jpeg.xml: - * data/registry/basecomponents.xml: - * flumotion/components/bttv.py: - add channel choosing using interfaces - * misc/flu.modules: - add jhbuild modules file - -2004-08-17 Johan Dahlin - - * flumotion/server/component.py (ComponentView): New class with - twisted specific interfaces - (BaseComponent): remove twisted code and add signals for - communication with it - - * conf/videotest-jpeg.xml: Change location of png file - -2004-08-16 Thomas Vander Stichele - - * flumotion/components/http.py: - log stats requests - -2004-08-16 Thomas Vander Stichele - - * flumotion/components/http.py: - get rid of traceback when no mimetype yet - -2004-08-13 Thomas Vander Stichele - - * doc/reference/Makefile.am: - * tests/runtests.py: - fix distcheck - -2004-08-13 Thomas Vander Stichele - - * configure.ac: - * doc/Makefile.am: - * doc/coding-style.txt: - * doc/gendoc.py: - * doc/header.py: - * doc/ideas.txt: - * doc/reference/Makefile.am: - * doc/simple.dia: - reorganize docs in preparation for the manual - -2004-08-12 Thomas Vander Stichele - - * doc/Makefile.am: - only rebuild docs when source module files change - -2004-08-12 Johan Dahlin - - * tests/test_component_parse.py: import common - * tests/test_http.py: New test - -2004-08-11 Thomas Vander Stichele - - * flumotion/components/http.py: - implement getrlimit and fd reservation - -2004-08-11 Thomas Vander Stichele - - * flumotion/server/admin.py: - * flumotion/server/component.py: - * flumotion/server/config.py: - * flumotion/server/controller.py: - * flumotion/server/launcher.py: - adapt debugging - -2004-08-11 Thomas Vander Stichele - - * flumotion/gui/adminclient.py: - throw up a dialog if we can't connect - * flumotion/utils/log.py: - make logging similar to GStreamer's - -2004-08-11 Johan Dahlin - - * flumotion/server/config.py (FlumotionConfigXML.parseProperties): - Add support for float values - - * flumotion/components/multipartjpeg.py (createComponent): New component - - * flumotion/server/config.py (FlumotionConfigXML.parse_entry): - Clean up - - * flumotion/server/registry.py - (RegistryXmlParser.parse_component): Implement inheritence - - * flumotion/components/http.py: Clean up - (HTTPStreamingResource.render): Refactor different results here - - * flumotion/components/overlay.py: New component - - * flumotion/server/config.py (ConfigEntry): Rename to sort out things - - * flumotion/server/auth.py: Authentication helper functions - - * flumotion/components/passwd.py (HTTPGatekeeper): New gatekeeper, - for htpasswd (from apache), only supports crypt encryption right now - - * flumotion/components/http.py (HTTPClientKeycard): New - IClientKeycard implementation for twisted http requests - - * flumotion/server/interfaces.py (IClientKeycard) - (IAuthenticate): New file with two interfaces - - * conf/videotest-jpeg.xml: Add auth component - -2004-08-11 Thomas Vander Stichele - - * conf/multipart-bttv-jpeg.xml: - add jpeg from bttv config - * flumotion/components/http.py: - oops, allow more than 1 client - -2004-08-11 Thomas Vander Stichele - - * flumotion/components/http.py: - set max clients to 1001, return 503 page if too many clients - -2004-08-10 Thomas Vander Stichele - - * bin/flumotion.in: - remove jdahlin hack - * flumotion/components/http.py: - add admin page on /stats protected by password. - show lots of useful info - * flumotion/server/config.py: - translate unicode from xml - -2004-08-09 Thomas Vander Stichele - - * flumotion/components/http.py: - always authenticate until authentication written - -2004-08-09 Thomas Vander Stichele - - * doc/header.py: - cleanup - -2004-08-09 Thomas Vander Stichele - - * conf/ogg-test-theora.xml: - fixes - * flumotion/components/__init__.py: - * flumotion/components/converter.py: - * flumotion/components/file.py: - * flumotion/components/http.py: - * flumotion/components/passwd.py: - * flumotion/components/producer.py: - add/fix header - -2004-08-09 Thomas Vander Stichele - - * Makefile.am: - * configure.ac: - * doc/ - move from docs - * flumotion/admin/spyglass.py: - fix header - -2004-08-09 Johan Dahlin - - * bin/flumotion.in: Call threads_init here, to avoid strange crashes. - -2004-08-09 Thomas Vander Stichele - - * configure.ac: - * data/Makefile.am: - * flumotion/Makefile.am: - fix build - -2004-08-05 Johan Dahlin - - * conf/*.conf: Move to conf/historic - - * flumotion/server/config.py (FlumotionConfig): Kill - - * flumotion/server/launcher.py (Launcher.start): Clean up. - -2004-08-04 Thomas Vander Stichele - - * flumotion/admin/__init__.py: - * flumotion/admin/spyglass.py: - * flumotion/admin/videotest.py: - * ui/videotest.glade: - adding videotest UI component, not done yet. - -2004-08-04 Thomas Vander Stichele - - * docs/Makefile.am: - * flumotion/admin/spyglass.py: - * ui/spyglass.glade: - spyglass now works and is documented. - -2004-08-04 Thomas Vander Stichele - - * flumotion/utils/log.py: - allow FLU_DEBUG env var to influence debugging, still needs - category and level filtering implementation - -2004-08-04 Thomas Vander Stichele - - * configure.ac: - require latest release of pygtk - * flumotion/server/Makefile.am: - components have moved - -2004-08-03 Thomas Vander Stichele - - * configure.ac: - * docs/Makefile.am: - * flumotion/Makefile.am: - * flumotion/config/Makefile.am: - * flumotion/config/__init__.py: - * flumotion/config/installed.py.in: - * flumotion/config/uninstalled.py.in: - * tests/config.py: - add a module containing configure-time variables. - add to epydoc to please myself. - add test for config to please Johan. - -2004-08-03 Johan Dahlin - - * bin/flumotion.in: - * configure.ac (PYGTK_REQ): Require PyGTK 2.3.96 - - * flumotion/server/launcher.py: Call gobject.thread_init here - - * flumotion/components/producer.py: Ditto - - * flumotion/components/converter.py: Move here - -2004-08-03 Thomas Vander Stichele - - * autogen.sh: - * configure.ac: - use config.h - * ui/spyglass.glade: - * ui/videotest.glade: - adding glade files for UI components - -2004-08-02 Johan Dahlin - - * configure.ac: Require Python 2.3 - - * flumotion/server/config.py (FlumotionConfig.parse_component): - Rework kind and logging, should be much more generic now and allow - us to extend components much easier. Cleans up a lot aswell! - - * flumotion/server/launcher.py: Kill command line options for - individual components - - * flumotion/components/file.py: Move out file streamer here. - -2004-07-30 Johan Dahlin - - * flumotion/server/config.py: More cleaning up, work in progress - - * flumotion/server/launcher.py: Attempting to clean up shutdown, - slightly better now but far from perfect - - * flumotion/server/registry.py: New file to handle registry - parsing and management - - * flumotion/server/admin.py - (AdminPerspective.perspective_shutdown): New method to shutdown - the reactor - - * bin/flumotion.in: add DATA_DIR - - * flumotion/components/http.py: Move out http streamer from - streamer.py - - * data/registry/basecomponents.xml: A list of all components - included in the base flumotion package. - - * conf/complex.xml: ditto - - * conf/videotest-jpeg.xml: xml version of videotest-jpeg.conf, - unused so far - -2004-07-27 Johan Dahlin - - * flumotion/server/streamer.py (HTTPStreamingResource.setHeader): - Rewrite most part of the HTTP server, handles simple - authentication now, ready for the new authentication framework. - (HTTPStreamingResource.render): Add simple authentication - - * conf/videotest-jpeg.conf: Overlay an image. - -2004-07-23 Johan Dahlin - - * flumotion/server/controller.py (Dispatcher.requestAvatar): Clean - up, clean up imports as well - * flumotion/server/*: Futher logging cleanups - -2004-07-22 Johan Dahlin - - * flumotion/server/component.py (ParseLaunchComponent): Refactor stuff - - * tests/test_component_parse.py: Tests for pipeline parsing - - * flumotion/utils/log.py (log): Rework, add support for message - handlers, so we can send stuff over the wire at a later point - - * flumotion/server/launcher.py (Launcher.load_config): Clean up - * flumotion/server/*: Clean up logging - -2004-07-21 Johan Dahlin - - * flumotion/server/config.py: Move out - stuff from launcher.py to here, to prepare for further user interface changes - -2004-07-16 Johan Dahlin - - * flumotion/server/controller.py: Clean up a little bit and add - some documentation - - * tests: Add some basic tests for the controller class - -2004-06-28 Johan Dahlin - - * flumotion/server/*: Add support for changing properties - -2004-06-27 Johan Dahlin - - * flumotion/server/launcher.py (main): Add support for setuid to a - username and renice. - (Launcher): Add support to connect to another controller. - (Launcher.setup): Move administrative interface to the same process - - * conf/sine-disc.conf (sine): Add nice for testing - -2004-06-26 Johan Dahlin - - * flumotion/server/controller.py (FeedManager.feedReady): Add - silly FIXME - - * flumotion/server/streamer.py: Support client connecting logging, - including number of bytes sent to each client. - - * flumotion/server/launcher.py: Start adding nice levels. - - * flumotion/gui/adminclient.py (Window.update): Clean up - -2004-06-25 Johan Dahlin - - * flumotion/server/streamer.py: New streamers and stuff - - * flumotion/server/admin.py (RemoteComponentView.__cmp__): - Implement, check only name attribute for now - - * flumotion/gui/adminclient.py - (AdminInterface.remote_componentAdded): Make it somewhat work to - reconnect component and add some new columns - - * data/ui/admin.glade: Remove textview for now - -2004-06-24 Johan Dahlin - - * conf/complex.conf: New configuration, in preparation - for guadec. - - * conf/ogg-test-theora-vorbis.conf: Move encoding of audio and - video to separate components. - - * conf/camserv-relay.conf: Add a file streamer - - * flumotion/server/controller.py - (ComponentPerspective.callRemote): Catch DeadReferenceError's - - * flumotion/server/launcher.py: updates for file/http streaming - - * flumotion/server/streamer.py (FileSinkStreamer): New streamer - (FakeSinkStremaer): Old, renamed. - - * flumotion/gui/adminclient.py: Small updates - - * flumotion/utils/gstutils.py (is_port_free): Don't print socket - errors which makes us all very nervous. - -2004-06-22 Johan Dahlin - - * flumotion/utils/gstutils.py (verbose_deep_notify_cb): Log the - component name aswell - - * bin/video-server-admin.in: Script to run the admin interface. - - * flumotion/server/*: Cleanup callbacks, always prefix twisted - callbacks with cb_. - -2004-06-20 Johan Dahlin - - * flumotion/utils/gstutils.py (verbose_deep_notify_cb): Filter out - active notifies and empty caps. Thomas will probably kill me for - this. - - * flumotion/server/*: Better error checking, make exception be - sent over the wire and catch them so we can do stuff. I never. - Add errbacks for all callbacks, so we can catch eventual - exceptions. Add a stop method on component, so the controller can - shut down the controller if something bad happens. - - - * flumotion/utils/proctitle.py: - * flumotion/utils/_proctitle.c: Import proctitle by Dave Cinege, - still ununsed though. - - * data/ui/admin.glade, flumotion/gui/adminclient.py, - flumotion/server/admin.py: New files, beginning of an interface - for the server. - - * configure.ac: Simplify python checks - - * m4/as-python.m4 (else): Add AM_CHECK_PYTHON_HEADERS macro. - -2004-06-18 Johan Dahlin - - * flumotion/server/controller.py (Controller.isLocalComponent): - Don't call getListenHost, since it needs to be working for - streamer too. - (Controller.getSourceComponents): Enable remote "hack" name - resolving again - - * conf/test-ogg-theora-vorbis.conf (feeds): Update to have two - feeds in one pipeline - - * flumotion/server: Add support for feeds. Introduce Feed and - FeedManager objects. In a sort of hackish state. But it seems to - run all configuration files quite well so assuming it works for - now. - -2004-06-17 Johan Dahlin - - * bin/flumotion.in (dir): Remove silly require. - - * flumotion/utils/gstutils.py (caps_repr): Refactor out from - verbose_deep_notify_cb - - * flumotion/server/launcher.py: Improve command line parsing, we - now have an interface similar to cvs. - - * flumotion/utils/log.py (enableLogging, disableLogging): New functions - -2004-06-15 Thomas Vander Stichele - - * flumotion.spec.in: update - -2004-06-15 Johan Dahlin - - * flumotion/server/launcher.py (main): Merge in all command line - parsing from other files in here. Improve logging. - - * flumotion/errors.py: Move OptionError here - -2004-06-11 Johan Dahlin - - * configure.ac (PYGTK_REQ): Require 2.0.0. - Add gst-python dependency - - * scripts/: Remove, superseded by configuration files - - * flumotion/gui/.svnignore: Adding some stuff I missed - - * .svnignore: - -2004-06-10 Thomas Vander Stichele - - * flumotion/component.py: - * flumotion/controller.py: - * flumotion/launcher.py: - * flumotion/streamer.py: - adding vi mode lines - adding self.msg methods that print the object names - figure out content type header from caps - -2004-06-07 Thomas Vander Stichele - - * Makefile.am: - * configure.ac: - * flumotion.spec.in: - adding spec file - -2004-06-07 Thomas Vander Stichele - - * Makefile: - * Makefile.am: - * autogen.sh: - * configure.ac: - * docs/Makefile.am: - * flumotion/Makefile.am: - * m4/Makefile.am: - * m4/as-ac-expand.m4: - * m4/as-python.m4: - * m4/as-version.m4: - adding autotools stuff - -2004-06-07 Thomas Vander Stichele - - * first post - +# Generated by Makefile. Do not edit. diff -Nru flumotion-0.6.1/common/as-python.m4 flumotion-0.9.1/common/as-python.m4 --- flumotion-0.6.1/common/as-python.m4 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/common/as-python.m4 2011-09-11 08:09:08.000000000 +0000 @@ -40,7 +40,7 @@ dnl should we do the version check? ifelse([$1],[], - [AC_PATH_PROG(PYTHON, python python2.5 python2.4 python2.3 python2.2)], + [AC_PATH_PROG(PYTHON, python python2.7 python2.6 python2.5 python2.4 python2.3 python2.2)], [ AC_MSG_NOTICE(Looking for Python version >= $1) changequote(<<, >>)dnl @@ -55,7 +55,7 @@ changequote([, ])dnl python_good=false - for python_candidate in python python2.5 python2.4 python2.3 python2.2; do + for python_candidate in python python2.7 python2.6 python2.5 python2.4 python2.3 python2.2; do unset PYTHON AC_PATH_PROG(PYTHON, $python_candidate) 1> /dev/null 2> /dev/null diff -Nru flumotion-0.6.1/common/as-version.m4 flumotion-0.9.1/common/as-version.m4 --- flumotion-0.6.1/common/as-version.m4 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/common/as-version.m4 2011-09-11 08:09:08.000000000 +0000 @@ -1,59 +1,71 @@ -dnl version.m4 0.0.6 +dnl as-version.m4 0.2.0 + dnl autostars m4 macro for versioning -dnl thomas@apestaart.org -dnl -dnl AS_VERSION(PACKAGE, PREFIX, MAJOR, MINOR, MICRO, NANO, ACTION_IF_NO_NANO, ACTION_IF_NANO) + +dnl Thomas Vander Stichele + +dnl $Id: as-version.m4,v 1.4 2004/06/01 09:40:05 thomasvs Exp $ + +dnl AS_VERSION + dnl example -dnl AS_VERSION(gstreamer, GST_VERSION, 0, 3, 2,) -dnl for a 0.3.2 release version -dnl +dnl AS_VERSION + dnl this macro -dnl - defines [$PREFIX]_MAJOR, MINOR and MICRO -dnl - if NANO is empty, then we're in release mode, else in cvs/dev mode -dnl - defines [$PREFIX], VERSION, and [$PREFIX]_RELEASE -dnl - executes the relevant action -dnl - AC_SUBST's PACKAGE, VERSION, [$PREFIX] and [$PREFIX]_RELEASE -dnl as well as the little ones +dnl - AC_SUBST's PACKAGE_VERSION_MAJOR, _MINOR, _MICRO +dnl - AC_SUBST's PACKAGE_VERSION_RELEASE, +dnl which can be used for rpm release fields dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents -dnl maintainer mode from running ok +dnl maintainer mode from running correctly dnl -dnl don't forget to put #undef [$2] and [$2]_RELEASE in acconfig.h +dnl don't forget to put #undef PACKAGE_VERSION_RELEASE in acconfig.h +dnl if you use acconfig.h AC_DEFUN([AS_VERSION], [ - PACKAGE=[$1] - [$2]_MAJOR=[$3] - [$2]_MINOR=[$4] - [$2]_MICRO=[$5] - NANO=[$6] - [$2]_NANO=$NANO - if test "x$NANO" = "x" || test "x$NANO" = "x0"; - then - AC_MSG_NOTICE(configuring [$1] for release) - VERSION=[$3].[$4].[$5] - [$2]_RELEASE=1 - dnl execute action - ifelse([$7], , :, [$7]) + PACKAGE_VERSION_MAJOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f1) + PACKAGE_VERSION_MINOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f2) + PACKAGE_VERSION_MICRO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f3) + + AC_SUBST(PACKAGE_VERSION_MAJOR) + AC_SUBST(PACKAGE_VERSION_MINOR) + AC_SUBST(PACKAGE_VERSION_MICRO) +]) + +dnl AS_NANO(ACTION-IF-NO-NANO, [ACTION-IF-NANO]) + +dnl requires AC_INIT to be called before +dnl For projects using a fourth or nano number in your versioning to indicate +dnl development or prerelease snapshots, this macro allows the build to be +dnl set up differently accordingly. + +dnl this macro: +dnl - parses AC_PACKAGE_VERSION, set by AC_INIT, and extracts the nano number +dnl - sets the variable PACKAGE_VERSION_NANO +dnl - sets the variable PACKAGE_VERSION_RELEASE, which can be used +dnl for rpm release fields +dnl - executes ACTION-IF-NO-NANO or ACTION-IF-NANO + +dnl example: +dnl AS_NANO(RELEASE="yes", RELEASE="no") + +AC_DEFUN([AS_NANO], +[ + AC_MSG_CHECKING(nano version) + + NANO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f4) + + if test x"$NANO" = x || test "x$NANO" = "x0" ; then + AC_MSG_RESULT([0 (release)]) + NANO=0 + PACKAGE_VERSION_RELEASE=1 + ifelse([$1], , :, [$1]) else - AC_MSG_NOTICE(configuring [$1] for development with nano $NANO) - VERSION=[$3].[$4].[$5].$NANO - [$2]_RELEASE=0.`date +%Y%m%d.%H%M%S` - dnl execute action - ifelse([$8], , :, [$8]) + AC_MSG_RESULT($NANO) + PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S` + ifelse([$2], , :, [$2]) fi - - [$2]=$VERSION - AC_DEFINE_UNQUOTED([$2], "$[$2]", [Define the version]) - AC_SUBST([$2]) - AC_DEFINE_UNQUOTED([$2]_RELEASE, "$[$2]_RELEASE", [Define the release version]) - AC_SUBST([$2]_RELEASE) - - AC_SUBST([$2]_MAJOR) - AC_SUBST([$2]_MINOR) - AC_SUBST([$2]_MICRO) - AC_SUBST([$2]_NANO) - AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define the package name]) - AC_SUBST(PACKAGE) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define the version]) - AC_SUBST(VERSION) + PACKAGE_VERSION_NANO=$NANO + AC_SUBST(PACKAGE_VERSION_NANO) + AC_SUBST(PACKAGE_VERSION_RELEASE) ]) diff -Nru flumotion-0.6.1/common/changelog.mk flumotion-0.9.1/common/changelog.mk --- flumotion-0.6.1/common/changelog.mk 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/common/changelog.mk 2011-09-11 08:09:08.000000000 +0000 @@ -0,0 +1,18 @@ +changelog: + @if test -d "$(srcdir)/.git"; \ + then \ + echo Creating ChangeLog && \ + ( cd "$(top_srcdir)" && \ + echo '# Generated by Makefile. Do not edit.'; echo; \ + $(top_srcdir)/missing --run git log \ + --pretty=format:'commit:%n%ad %an <%ae>%ndescription:%n%s%n%brefs: %n%d %nfiles:'\ + --stat --name-only --date=short --topo-order $(GIT_LOG_START_COMMIT)..HEAD) | \ + $(top_srcdir)/common/gitlog2ChangeLog > ChangeLog.tmp \ + && cat $(top_srcdir)/ChangeLog.old >> ChangeLog.tmp \ + && cp -f ChangeLog.tmp $(distdir)/ChangeLog \ + && rm -f ChangeLog.tmp \ + || ( rm -f ChangeLog.tmp ; \ + echo Failed to generate ChangeLog >&2 ); \ + else \ + echo A git clone is required to generate a ChangeLog >&2; \ + fi diff -Nru flumotion-0.6.1/common/common.mk flumotion-0.9.1/common/common.mk --- flumotion-0.6.1/common/common.mk 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/common/common.mk 2011-09-11 08:09:08.000000000 +0000 @@ -2,6 +2,10 @@ test: @make check -C flumotion/test +quicktest: + @make check -C flumotion/test \ + TRIAL_FLAGS="--reporter=verbose --skip-slow" + check-docs: @make check -C doc/reference @@ -13,8 +17,8 @@ ret=0; for f in $(CONFIG); do echo "Validating $$f"; $(top_builddir)/env bash -c "export PYTHONPATH=$(FLUMOTION_DIR):$(top_srcdir)${PYTHONPATH:+:$PYTHONPATH} && $(PYTHON) $(top_srcdir)/common/validate-config.py $(srcdir)/$$f" || ret=1; done && exit $$ret check-local-pep8: - find $(top_srcdir)/flumotion -name \*.py | sort -u | xargs $(PYTHON) $(top_srcdir)/common/pep8.py --repeat - find $(top_srcdir)/flumotion -name \*.py.in | sort -u | xargs $(PYTHON) $(top_srcdir)/common/pep8.py --repeat + find $(top_srcdir)/flumotion ! -regex $(top_srcdir)/flumotion/extern/.\* -name \*.py | sort -u | xargs $(PYTHON) $(top_srcdir)/common/pep8.py --repeat + find $(top_srcdir)/flumotion ! -regex $(top_srcdir)/flumotion/extern/.\* -name \*.py.in | sort -u | xargs $(PYTHON) $(top_srcdir)/common/pep8.py --repeat # run our hacked-up version of trial with all the reactors that we actually use and build up the final result coverage: @@ -39,11 +43,12 @@ tools/fixme | less -R # remove any cache written in distcheck -dist-hook: +dist-hook:: rm -rf cache release: dist make $(PACKAGE)-$(VERSION).tar.bz2.md5 + [ -r $(PACKAGE)-$(VERSION).tar.gz ] && make $(PACKAGE)-$(VERSION).tar.gz.md5 # generate md5 sum files %.md5: % @@ -53,7 +58,7 @@ sloc: sloccount flumotion | grep "(SLOC)" | cut -d = -f 2 -.PHONY: test +.PHONY: test quicktest locale-uninstalled-1: diff -Nru flumotion-0.6.1/common/flumotion-trial flumotion-0.9.1/common/flumotion-trial --- flumotion-0.6.1/common/flumotion-trial 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/common/flumotion-trial 2011-09-11 08:09:08.000000000 +0000 @@ -1,23 +1,19 @@ #!/usr/bin/python # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. # This is a trial replacement with support for storing the @@ -25,6 +21,7 @@ # couple of times with different reactors and building up the final # coverage. + import os import sys @@ -39,6 +36,10 @@ class FOptions(_Options): + optFlags = [ + ['skip-slow', None, + "Skip slow test cases (marked with a 'slow = True' attribute)."]] + optParameters = [['saved-coverage', None, None, 'Filename to store coverage results.' ' Can only be used with --coverage.']] @@ -57,6 +58,11 @@ outfile=self['saved-coverage']) sys.settrace(self.tracer.globaltrace) + # make options available to flumotion.testsuite + def getConfig(): + return dict(self) + twisted.scripts.trial.getConfig = getConfig + twisted.scripts.trial.Options = FOptions # without this snippet, copied from twisted's trial, for some reason diff -Nru flumotion-0.6.1/common/gen-locale-xml.py flumotion-0.9.1/common/gen-locale-xml.py --- flumotion-0.6.1/common/gen-locale-xml.py 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/common/gen-locale-xml.py 2011-09-11 08:09:08.000000000 +0000 @@ -1,28 +1,24 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. # this script generates a locale registry .xml file for flumotion # languages are bundled by the two-letter code the locale identifier # starts with - +# # usage: # gen-locale-xml.py [gettext domain] [project name] [one or # more language codes] diff -Nru flumotion-0.6.1/common/gitlog2ChangeLog flumotion-0.9.1/common/gitlog2ChangeLog --- flumotion-0.6.1/common/gitlog2ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/common/gitlog2ChangeLog 2011-09-11 08:09:08.000000000 +0000 @@ -0,0 +1,91 @@ +#!/usr/bin/awk -f +function clean_environment() +{ + header = "" + commit_msg = "" + backport = "" + reviewed = "" + release_tag = "" + file_list = "" + + in_commit = 0 + in_description = 0 + in_refs = 0 + in_files = 0 +} +function print_commit() +{ + if (release_tag) + print release_tag + if (header) + print header + if (reviewed) + print reviewed + if (backport) + print backport + if (file_list) + print file_list + if (commit_msg) + print commit_msg +} +BEGIN { + clean_environment() +} +/^commit:/ { + print_commit() + clean_environment() + in_commit = 1 + next +} +/^description:/ { + in_description = 1 + in_commit = 0 + next +} +/^refs:/ { + in_refs = 1 + in_description = 0 +} +/^files:/ { + in_refs = 0 + in_files = 1 + next +} +in_commit == 1 { + header = sprintf("%s\n", $0) + next +} +in_description == 1 { + if (/^[Bb]ackport/) { + backport = sprintf("\t%s", $0) + next + } + if (/^[Rr]eviewed by/) { + reviewed = sprintf("\t%s", $0) + next + } + if (commit_msg) + commit_msg = sprintf("%s\t%s\n", commit_msg, $0) + else + commit_msg = sprintf("\t%s\n", $0) + next +} +in_refs == 1 { + match($0, /[0-9]+\.[0-9]+\.[0-9]+/) + if (RSTART) + release_tag = sprintf("=== release %s ===\n", substr($0, RSTART, RLENGTH)) +} +in_files == 1 { + if ($0 && ! /ChangeLog/) + if (!file_list) + if (reviewed || backport) + file_list = sprintf("\n\t* %s:", $0) + else + file_list = sprintf("\t* %s:", $0) + else + file_list = sprintf("%s\n\t* %s:", file_list, $0) + next +} +END { + print_commit() +} diff -Nru flumotion-0.6.1/common/Makefile.am flumotion-0.9.1/common/Makefile.am --- flumotion-0.6.1/common/Makefile.am 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/common/Makefile.am 2011-09-11 08:09:08.000000000 +0000 @@ -5,6 +5,8 @@ as-ac-expand.m4 \ intltool.m4 \ py-compile-destdir \ + gitlog2ChangeLog \ + changelog.mk \ common.mk \ epydoc.mk \ filterdoc.py \ diff -Nru flumotion-0.6.1/common/Makefile.in flumotion-0.9.1/common/Makefile.in --- flumotion-0.6.1/common/Makefile.in 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/common/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -40,14 +40,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -75,6 +74,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -84,18 +84,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -143,6 +136,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -160,16 +154,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -177,7 +173,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -192,6 +187,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -224,7 +220,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -251,6 +246,8 @@ as-ac-expand.m4 \ intltool.m4 \ py-compile-destdir \ + gitlog2ChangeLog \ + changelog.mk \ common.mk \ epydoc.mk \ filterdoc.py \ diff -Nru flumotion-0.6.1/common/setup.m4 flumotion-0.9.1/common/setup.m4 --- flumotion-0.6.1/common/setup.m4 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/common/setup.m4 2011-09-11 08:09:08.000000000 +0000 @@ -41,8 +41,11 @@ _setup = False + # we have a setup.setup() function so we don't import setup without doing # anything to it + + def setup(): global _setup @@ -52,7 +55,7 @@ # make sure we find the original flumotion dir always and firstly if not FLU_DIR in sys.path: sys.path.insert(0, FLU_DIR) - + # import flumotion and possibly add the original flumotion dir to __path__ # and rebuild; without this trial seems to not be able to find # flumotion.common @@ -74,21 +77,21 @@ log.debug('setup', 'RELATIVE_PATH: %s' % RELATIVE_PATH) levels = RELATIVE_PATH.count(os.path.sep) pplist = [['..']] * levels - + # now register our flumotion dir as an additional one # in the .m4, we wrap this in [] so aclocal does not expand __file__ [__thisdir = os.path.dirname(os.path.abspath(__file__))] pplist.insert(0, __thisdir) - + # in distcheck mode, we need to go up one more if __thisdir.find('_build') != -1: log.debug('setup', 'distcheck mode (in %s)' % __thisdir) pplist.append('..') - else: + else: log.debug('setup', 'normal mode') __packagePath = os.path.abspath(os.path.join(*pplist)) - + from flumotion.common import package log.debug('setup', 'registering our package path %s' % __packagePath) package.getPackager().registerPackagePath(__packagePath, PROJECT) diff -Nru flumotion-0.6.1/common/trial.mk flumotion-0.9.1/common/trial.mk --- flumotion-0.6.1/common/trial.mk 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/common/trial.mk 2011-09-11 08:09:08.000000000 +0000 @@ -6,12 +6,14 @@ # base package flumotion tests to run always, instead of # the current package +TRIAL_FLAGS = --reporter=timing + trial: rm-trial-test-log @if test -z "$(TRIAL_ENV)"; then \ echo "Please set the TRIAL_ENV Makefile variable."; \ exit 1; fi - $(TRIAL_ENV) $(top_srcdir)/common/flumotion-trial -r default \ - flumotion.test 2>&1 \ + $(TRIAL_ENV) $(top_srcdir)/common/flumotion-trial -r default \ + $(TRIAL_FLAGS) flumotion.test 2>&1 \ | tee trial.test.log; \ if ! test $${PIPESTATUS[0]} -eq 0; \ then \ @@ -19,7 +21,7 @@ exit 1; \ fi; \ $(TRIAL_ENV) $(top_srcdir)/common/flumotion-trial -r gtk2 \ - flumotion.test 2>&1 \ + $(TRIAL_FLAGS) flumotion.test 2>&1 \ | tee -a trial.test.log; \ if test $${PIPESTATUS[0]} -eq 0; \ then \ diff -Nru flumotion-0.6.1/common/validate-registry.py flumotion-0.9.1/common/validate-registry.py --- flumotion-0.6.1/common/validate-registry.py 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/common/validate-registry.py 2011-09-11 08:09:08.000000000 +0000 @@ -24,8 +24,15 @@ # uncomment to see better where the problem comes from when it claims # to be in ihooks.py # import traceback; traceback.print_stack() + + # if it's not in our code, it's not our fault + if filename.startswith('/usr/lib'): + return + + # count the deprecation as a fatal error global exitCode exitCode += 1 + warnings.showwarning = showwarning from flumotion.common import setup @@ -68,12 +75,6 @@ if not c.description: componentError(c, 'is missing a description') - for s in c.sockets: - try: - function = reflect.namedAny(s) - except AttributeError: - componentError(c, 'could not import socket %s' % s) - def propertyError(c, p, msg): global exitCode sys.stderr.write("Property %s on component %s from %s %s.\n" %( @@ -107,20 +108,6 @@ if not plug.description: plugError(plug, 'is missing a description') - # a plug type and its class name should match too - normalizedType = ''.join(plug.type.split('-')) + 'plug' - function = plug.entries['default'].function - normalizedClass = function.lower() - if normalizedType != normalizedClass: - plugError(plug, 'type %s does not match class %s' % ( - plug.type, function)) - - # a plug's socket should be creatable - try: - function = reflect.namedAny(plug.socket) - except AttributeError: - plugError(plug, 'could not import socket %s' % plug.socket) - # a plug should be creatable for name, entry in plug.entries.items(): diff -Nru flumotion-0.6.1/conf/Makefile.in flumotion-0.9.1/conf/Makefile.in --- flumotion-0.6.1/conf/Makefile.in 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/conf/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -41,14 +41,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -76,6 +75,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -85,18 +85,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -144,6 +137,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -161,16 +155,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -178,7 +174,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -193,6 +188,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -225,7 +221,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -459,6 +454,10 @@ test: @make check -C flumotion/test +quicktest: + @make check -C flumotion/test \ + TRIAL_FLAGS="--reporter=verbose --skip-slow" + check-docs: @make check -C doc/reference @@ -470,8 +469,8 @@ ret=0; for f in $(CONFIG); do echo "Validating $$f"; $(top_builddir)/env bash -c "export PYTHONPATH=$(FLUMOTION_DIR):$(top_srcdir)${PYTHONPATH:+:$PYTHONPATH} && $(PYTHON) $(top_srcdir)/common/validate-config.py $(srcdir)/$$f" || ret=1; done && exit $$ret check-local-pep8: - find $(top_srcdir)/flumotion -name \*.py | sort -u | xargs $(PYTHON) $(top_srcdir)/common/pep8.py --repeat - find $(top_srcdir)/flumotion -name \*.py.in | sort -u | xargs $(PYTHON) $(top_srcdir)/common/pep8.py --repeat + find $(top_srcdir)/flumotion ! -regex $(top_srcdir)/flumotion/extern/.\* -name \*.py | sort -u | xargs $(PYTHON) $(top_srcdir)/common/pep8.py --repeat + find $(top_srcdir)/flumotion ! -regex $(top_srcdir)/flumotion/extern/.\* -name \*.py.in | sort -u | xargs $(PYTHON) $(top_srcdir)/common/pep8.py --repeat # run our hacked-up version of trial with all the reactors that we actually use and build up the final result coverage: @@ -496,11 +495,12 @@ tools/fixme | less -R # remove any cache written in distcheck -dist-hook: +dist-hook:: rm -rf cache release: dist make $(PACKAGE)-$(VERSION).tar.bz2.md5 + [ -r $(PACKAGE)-$(VERSION).tar.gz ] && make $(PACKAGE)-$(VERSION).tar.gz.md5 # generate md5 sum files %.md5: % @@ -510,7 +510,7 @@ sloc: sloccount flumotion | grep "(SLOC)" | cut -d = -f 2 -.PHONY: test +.PHONY: test quicktest locale-uninstalled-1: if test -d po; then \ diff -Nru flumotion-0.6.1/conf/managers/default/manhole.xml flumotion-0.9.1/conf/managers/default/manhole.xml --- flumotion-0.6.1/conf/managers/default/manhole.xml 2009-09-09 11:37:18.000000000 +0000 +++ flumotion-0.9.1/conf/managers/default/manhole.xml 2011-09-11 08:09:03.000000000 +0000 @@ -2,7 +2,7 @@ + type="manager-manhole"> ~/.ssh/authorized_keys true 2222 diff -Nru flumotion-0.6.1/config.guess flumotion-0.9.1/config.guess --- flumotion-0.6.1/config.guess 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/config.guess 2011-09-11 08:09:18.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2009-06-10' +timestamp='2011-05-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,8 +56,9 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -180,7 +181,7 @@ fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -223,7 +224,7 @@ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -269,7 +270,10 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -295,7 +299,7 @@ echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -333,6 +337,9 @@ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" @@ -391,23 +398,23 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -477,8 +484,8 @@ echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -491,7 +498,7 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -548,7 +555,7 @@ echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -591,52 +598,52 @@ 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -727,22 +734,22 @@ exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -766,14 +773,14 @@ exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -801,18 +808,18 @@ echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in + *:Interix*:*) + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd | genuineintel) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -854,6 +861,20 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -861,7 +882,13 @@ then echo ${UNAME_MACHINE}-unknown-linux-gnu else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi fi exit ;; avr32*:Linux:*:*) @@ -874,7 +901,18 @@ echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -901,39 +939,18 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -942,14 +959,17 @@ *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -957,6 +977,9 @@ sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-tilera-linux-gnu + exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; @@ -964,60 +987,8 @@ echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1025,11 +996,11 @@ echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1061,7 +1032,7 @@ fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1089,13 +1060,13 @@ exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1130,8 +1101,8 @@ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1174,10 +1145,10 @@ echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1203,11 +1174,11 @@ exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1247,6 +1218,16 @@ *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1262,6 +1243,9 @@ *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1307,13 +1291,13 @@ echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1353,11 +1337,11 @@ #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff -Nru flumotion-0.6.1/config.sub flumotion-0.9.1/config.sub --- flumotion-0.6.1/config.sub 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/config.sub 2011-09-11 08:09:18.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2009-06-11' +timestamp='2011-03-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -72,8 +75,9 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -120,8 +124,9 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -149,12 +154,12 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -170,10 +175,10 @@ os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -278,26 +283,39 @@ | moxie \ | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -308,6 +326,18 @@ basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -328,7 +358,7 @@ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ @@ -340,7 +370,7 @@ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -362,24 +392,28 @@ | mmix-* \ | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* \ + | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile-* | tilegx-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -404,7 +438,7 @@ basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -474,11 +508,20 @@ basic_machine=powerpc-ibm os=-cnk ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -510,7 +553,7 @@ basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -726,6 +769,9 @@ basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -830,6 +876,12 @@ np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -912,9 +964,10 @@ ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -1008,6 +1061,9 @@ basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1064,17 +1120,10 @@ basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff + # This must be matched before tile*. + tilegx*) + basic_machine=tilegx-unknown + os=-linux-gnu ;; tile*) basic_machine=tile-unknown @@ -1147,6 +1196,9 @@ xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1244,9 +1296,12 @@ if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1268,8 +1323,8 @@ # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1282,7 +1337,8 @@ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1290,7 +1346,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1329,7 +1385,7 @@ -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1378,7 +1434,7 @@ -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1423,6 +1479,8 @@ -dicos*) os=-dicos ;; + -nacl*) + ;; -none) ;; *) @@ -1445,10 +1503,10 @@ # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1460,8 +1518,17 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1488,7 +1555,7 @@ m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1515,7 +1582,7 @@ *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff -Nru flumotion-0.6.1/configure flumotion-0.9.1/configure --- flumotion-0.6.1/configure 2009-09-09 11:37:51.000000000 +0000 +++ flumotion-0.9.1/configure 2011-09-11 08:09:17.000000000 +0000 @@ -1,11 +1,15 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for flumotion 0.6.1. +# Generated by GNU Autoconf 2.68 for flumotion 0.9.1. +# +# Report bugs to . +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## @@ -87,6 +91,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -169,6 +174,14 @@ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes @@ -212,11 +225,18 @@ # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -226,7 +246,8 @@ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: flumotion-devel@lists.fluendo.com about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." @@ -314,7 +335,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -354,19 +375,19 @@ fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -523,160 +544,14 @@ # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -695,10 +570,10 @@ # Identity of this package. PACKAGE_NAME='flumotion' PACKAGE_TARNAME='flumotion' -PACKAGE_VERSION='0.6.1' -PACKAGE_STRING='flumotion 0.6.1' -PACKAGE_BUGREPORT='' -PACKAGE_URL='' +PACKAGE_VERSION='0.9.1' +PACKAGE_STRING='flumotion 0.9.1' +PACKAGE_BUGREPORT='flumotion-devel@lists.fluendo.com' +PACKAGE_URL='http://www.flumotion.net/' # Factoring default headers for most tests. ac_includes_default="\ @@ -750,15 +625,6 @@ HAVE_EPYDOC_TRUE EPYDOC XVFB -BUILD_TRAYICON_FALSE -BUILD_TRAYICON_TRUE -PYGTK_DEFSDIR -PYGTK_CODEGEN -PYGTK_LIBS -PYGTK_CFLAGS -GTK_LIBS -GTK_CFLAGS -PKG_CONFIG PYTHON_INCLUDES pkgpyexecdir pyexecdir @@ -775,9 +641,11 @@ LIPO NMEDIT DSYMUTIL -lt_ECHO +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP LN_S NM @@ -859,16 +727,17 @@ MSGFMT MKINSTALLDIRS ACLOCAL_AMFLAGS +GIT_LOG_START_COMMIT GST_010_REQ PYGST_010_REQ +PYCAIRO_010_REQ PYGTK_010_REQ -RELEASE -FLUMOTION_NANO -FLUMOTION_MICRO -FLUMOTION_MINOR -FLUMOTION_MAJOR -FLUMOTION_RELEASE -FLUMOTION +PACKAGE_VERSION_RELEASE +PACKAGE_VERSION_NANO +PACKAGE_VERSION_SPEC +PACKAGE_VERSION_MICRO +PACKAGE_VERSION_MINOR +PACKAGE_VERSION_MAJOR am__untar am__tar AMTAR @@ -943,6 +812,7 @@ enable_shared with_pic enable_fast_install +with_sysroot enable_libtool_lock enable_docs with_cortado_prefix @@ -955,12 +825,7 @@ LDFLAGS LIBS CPPFLAGS -CPP -PKG_CONFIG -GTK_CFLAGS -GTK_LIBS -PYGTK_CFLAGS -PYGTK_LIBS' +CPP' # Initialize some variables set by options. @@ -1023,8 +888,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1069,7 +935,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1095,7 +961,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1299,7 +1165,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1315,7 +1181,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1345,8 +1211,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1354,7 +1220,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1364,7 +1230,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1372,13 +1238,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1401,7 +1267,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1415,8 +1281,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1431,9 +1297,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1472,11 +1338,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1502,7 +1368,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 flumotion 0.6.1 to adapt to many kinds of systems. +\`configure' configures flumotion 0.9.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1516,7 +1382,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1572,7 +1438,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of flumotion 0.6.1:";; + short | recursive ) echo "Configuration of flumotion 0.9.1:";; esac cat <<\_ACEOF @@ -1602,6 +1468,8 @@ --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). --with-cortado-prefix= where cortado can be found @@ -1611,20 +1479,15 @@ LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor - PKG_CONFIG path to pkg-config utility - GTK_CFLAGS C compiler flags for GTK, overriding pkg-config - GTK_LIBS linker flags for GTK, overriding pkg-config - PYGTK_CFLAGS - C compiler flags for PYGTK, overriding pkg-config - PYGTK_LIBS linker flags for PYGTK, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to the package provider. +Report bugs to . +flumotion home page: . _ACEOF ac_status=$? fi @@ -1687,10 +1550,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -flumotion configure 0.6.1 -generated by GNU Autoconf 2.64 +flumotion configure 0.9.1 +generated by GNU Autoconf 2.68 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1734,8 +1597,8 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1780,8 +1643,8 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1794,7 +1657,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1812,7 +1675,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1837,7 +1700,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1848,8 +1711,8 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1890,8 +1753,8 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1903,7 +1766,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1958,15 +1821,15 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by flumotion $as_me 0.6.1, which was -generated by GNU Autoconf 2.64. Invocation command line was +It was created by flumotion $as_me 0.9.1, which was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2076,11 +1939,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2114,11 +1975,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2131,11 +1990,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2149,11 +2006,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2208,7 +2063,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2219,18 +2079,22 @@ for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in @@ -2299,7 +2163,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2312,20 +2176,27 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2354,7 +2225,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2441,11 +2312,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2467,7 +2338,7 @@ # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2477,7 +2348,7 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2531,7 +2402,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2571,7 +2442,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2624,7 +2495,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2649,6 +2520,7 @@ fi + test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -2656,7 +2528,6 @@ # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi @@ -2675,7 +2546,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2715,7 +2586,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2723,7 +2594,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2757,7 +2628,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2773,7 +2644,7 @@ # Define the identity of the package. PACKAGE='flumotion' - VERSION='0.6.1' + VERSION='0.9.1' cat >>confdefs.h <<_ACEOF @@ -2815,74 +2686,59 @@ - PACKAGE=flumotion - FLUMOTION_MAJOR=0 - FLUMOTION_MINOR=6 - FLUMOTION_MICRO=1 - NANO=0 - FLUMOTION_NANO=$NANO - if test "x$NANO" = "x" || test "x$NANO" = "x0"; - then - { $as_echo "$as_me:${as_lineno-$LINENO}: configuring flumotion for release" >&5 -$as_echo "$as_me: configuring flumotion for release" >&6;} - VERSION=0.6.1 - FLUMOTION_RELEASE=1 - : - else - { $as_echo "$as_me:${as_lineno-$LINENO}: configuring flumotion for development with nano $NANO" >&5 -$as_echo "$as_me: configuring flumotion for development with nano $NANO" >&6;} - VERSION=0.6.1.$NANO - FLUMOTION_RELEASE=0.`date +%Y%m%d.%H%M%S` - : - fi - - FLUMOTION=$VERSION - -cat >>confdefs.h <<_ACEOF -#define FLUMOTION "$FLUMOTION" -_ACEOF - + PACKAGE_VERSION_MAJOR=$(echo 0.9.1 | cut -d'.' -f1) + PACKAGE_VERSION_MINOR=$(echo 0.9.1 | cut -d'.' -f2) + PACKAGE_VERSION_MICRO=$(echo 0.9.1 | cut -d'.' -f3) -cat >>confdefs.h <<_ACEOF -#define FLUMOTION_RELEASE "$FLUMOTION_RELEASE" -_ACEOF +PACKAGE_VERSION_SPEC=`echo $VERSION | tr '-' '_'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5 +$as_echo_n "checking nano version... " >&6; } + NANO=$(echo 0.9.1 | cut -d'.' -f4) + if test x"$NANO" = x || test "x$NANO" = "x0" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5 +$as_echo "0 (release)" >&6; } + NANO=0 + PACKAGE_VERSION_RELEASE=1 + : + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NANO" >&5 +$as_echo "$NANO" >&6; } + PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S` + : + fi + PACKAGE_VERSION_NANO=$NANO -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF +AUTHORS=$srcdir/AUTHORS +PYGTK_010_REQ=2.10.0 -RELEASE=$FLUMOTION_RELEASE +PYCAIRO_010_REQ=1.2.0 +PYGST_010_REQ=0.10.4 +GST_010_REQ=0.10.11 -AUTHORS=$srcdir/AUTHORS -PYGTK_010_REQ=2.8.4 +GST_010_SUPPORTED=true -PYGST_010_REQ=0.10.0 +GIT_LOG_START_COMMIT="e504f6baf852066b47c96b74d9f7f1c78313a841" -GST_010_REQ=0.10.0.1 +ACLOCAL_AMFLAGS="-I m4 -I common" -GST_010_SUPPORTED=true -ACLOCAL_AMFLAGS="-I m4 -I common" @@ -2903,7 +2759,7 @@ set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in @@ -2940,7 +2796,7 @@ set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -2982,7 +2838,7 @@ set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in @@ -3021,7 +2877,7 @@ set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then : +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in @@ -3169,7 +3025,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3209,7 +3065,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3262,7 +3118,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3302,7 +3158,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3361,7 +3217,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3405,7 +3261,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3459,8 +3315,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3481,32 +3337,30 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3568,62 +3422,28 @@ else ac_file='' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -3653,19 +3473,78 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi -rm -f conftest$ac_cv_exeext +rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3705,8 +3584,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3716,7 +3595,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3753,7 +3632,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3831,7 +3710,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3930,7 +3809,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -4055,27 +3934,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4093,14 +3972,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -4108,7 +3987,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4171,7 +4050,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${acl_cv_path_LD+set}" = set; then : +if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -4204,10 +4083,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${acl_cv_prog_gnu_ld+set}" = set; then : +if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -4225,7 +4104,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } -if test "${acl_cv_rpath+set}" = set; then : +if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else @@ -4682,7 +4561,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if test "${gt_cv_func_gnugettext1_libc+set}" = set; then : +if ${gt_cv_func_gnugettext1_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4743,7 +4622,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -5196,7 +5075,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then : +if ${gt_cv_func_gnugettext1_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -5346,7 +5225,7 @@ case "$am__api_version" in 1.01234) - as_fn_error "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 + as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 ;; *) ;; @@ -5363,7 +5242,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || - as_fn_error "Your intltool is too old. You need intltool 0.34.2 or later." "$LINENO" 5 + as_fn_error $? "Your intltool is too old. You need intltool 0.34.2 or later." "$LINENO" 5 fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' @@ -5416,7 +5295,7 @@ set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then : +if ${ac_cv_path_INTLTOOL_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_PERL in @@ -5453,10 +5332,10 @@ if test -z "$INTLTOOL_PERL"; then - as_fn_error "perl not found; required for intltool" "$LINENO" 5 + as_fn_error $? "perl not found; required for intltool" "$LINENO" 5 fi if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then - as_fn_error "perl 5.x required for intltool" "$LINENO" 5 + as_fn_error $? "perl 5.x required for intltool" "$LINENO" 5 fi if test "x" != "xno-xml"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5 @@ -5465,7 +5344,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else - as_fn_error "XML::Parser perl module is required for intltool" "$LINENO" 5 + as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5 fi fi @@ -5473,7 +5352,7 @@ set dummy iconv; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_ICONV+set}" = set; then : +if ${ac_cv_path_INTLTOOL_ICONV+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_ICONV in @@ -5514,7 +5393,7 @@ set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_MSGFMT+set}" = set; then : +if ${ac_cv_path_INTLTOOL_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_MSGFMT in @@ -5555,7 +5434,7 @@ set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_MSGMERGE+set}" = set; then : +if ${ac_cv_path_INTLTOOL_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_MSGMERGE in @@ -5596,7 +5475,7 @@ set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INTLTOOL_XGETTEXT+set}" = set; then : +if ${ac_cv_path_INTLTOOL_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_XGETTEXT in @@ -5869,8 +5748,8 @@ -macro_version='2.2.6' -macro_revision='1.3012' +macro_version='2.4' +macro_revision='1.3293' @@ -5886,9 +5765,78 @@ ltmain="$ac_aux_dir/ltmain.sh" +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -5943,7 +5891,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -5970,7 +5918,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -6019,7 +5967,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -6033,7 +5981,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -6085,7 +6033,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -6100,7 +6048,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -6152,7 +6100,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -6231,7 +6179,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -6268,10 +6216,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -6298,7 +6246,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -6351,14 +6299,17 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -6396,13 +6347,13 @@ fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -6451,10 +6402,19 @@ fi fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi fi test -z "$NM" && NM=nm @@ -6465,18 +6425,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6473: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6476: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6479: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6500,7 +6460,7 @@ # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -6533,6 +6493,11 @@ lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -6597,8 +6562,8 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -6640,8 +6605,8 @@ # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -6690,9 +6655,83 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' @@ -6706,6 +6745,11 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -6728,7 +6772,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -6768,7 +6812,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -6827,7 +6871,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -6869,16 +6913,18 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -6908,6 +6954,10 @@ lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -6916,11 +6966,11 @@ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -6942,7 +6992,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -7023,6 +7073,21 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -7038,12 +7103,165 @@ + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -7056,7 +7274,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -7076,14 +7294,18 @@ fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -7096,7 +7318,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -7115,6 +7337,10 @@ $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -7126,16 +7352,72 @@ esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi @@ -7148,7 +7430,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -7188,7 +7470,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -7247,7 +7529,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -7287,7 +7569,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -7358,6 +7640,18 @@ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + @@ -7404,7 +7698,7 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -7465,8 +7759,8 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -7502,6 +7796,7 @@ else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -7527,8 +7822,8 @@ test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then @@ -7543,6 +7838,18 @@ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -7554,7 +7861,7 @@ cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -7580,8 +7887,8 @@ _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -7591,8 +7898,8 @@ test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -7629,6 +7936,17 @@ $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + @@ -7650,6 +7968,44 @@ + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -7681,7 +8037,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7684 "configure"' > conftest.$ac_ext + echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7775,7 +8131,7 @@ CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -7843,7 +8199,124 @@ need_locks="$enable_libtool_lock" - +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then @@ -7851,7 +8324,7 @@ set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -7891,7 +8364,7 @@ set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -7943,7 +8416,7 @@ set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -7983,7 +8456,7 @@ set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -8035,7 +8508,7 @@ set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -8075,7 +8548,7 @@ set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -8127,7 +8600,7 @@ set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -8167,7 +8640,7 @@ set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -8219,7 +8692,7 @@ set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -8259,7 +8732,7 @@ set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -8334,7 +8807,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -8363,7 +8836,7 @@ $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no @@ -8393,6 +8866,38 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; @@ -8420,7 +8925,7 @@ else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test "$DSYMUTIL" != ":"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -8440,7 +8945,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -8470,7 +8975,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -8486,11 +8991,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -8529,7 +9034,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -8545,18 +9050,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -8568,7 +9073,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8685,8 +9190,7 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -8700,7 +9204,7 @@ do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF @@ -8711,6 +9215,8 @@ + + # Set options @@ -8833,6 +9339,7 @@ + test -z "$LN_S" && LN_S="ln -s" @@ -8854,7 +9361,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -8882,19 +9389,6 @@ - - - - - - - - - - - - - case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some @@ -8907,23 +9401,6 @@ ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -8952,7 +9429,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -8962,7 +9439,7 @@ if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -9028,7 +9505,7 @@ if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -9161,11 +9638,16 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -9181,15 +9663,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9184: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9188: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes @@ -9218,8 +9700,6 @@ lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -9267,6 +9747,12 @@ lt_prog_compiler_pic='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -9309,6 +9795,13 @@ lt_prog_compiler_pic='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + lt_prog_compiler_pic='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -9350,7 +9843,7 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -9371,7 +9864,13 @@ lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' @@ -9383,25 +9882,25 @@ # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_wl='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' + lt_prog_compiler_wl='-Wl,' ;; esac ;; @@ -9433,7 +9932,7 @@ lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; @@ -9490,13 +9989,17 @@ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -9504,7 +10007,7 @@ if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -9520,15 +10023,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9523: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9527: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes @@ -9557,13 +10060,18 @@ + + + + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -9576,7 +10084,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes @@ -9606,7 +10114,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9625,16 +10133,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9628: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9632: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -9661,7 +10169,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9680,16 +10188,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9683: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9687: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -9799,13 +10307,39 @@ openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -9823,6 +10357,7 @@ fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -9838,11 +10373,12 @@ ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -9878,10 +10414,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -9899,6 +10437,11 @@ fi ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no @@ -9914,7 +10457,7 @@ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -9924,15 +10467,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -9943,13 +10487,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -9965,17 +10513,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -9989,8 +10537,8 @@ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -10008,8 +10556,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -10055,8 +10603,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -10096,8 +10644,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -10185,7 +10735,13 @@ allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10198,25 +10754,32 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' @@ -10225,7 +10788,13 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10238,30 +10807,42 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -10293,20 +10874,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -10316,7 +10940,11 @@ hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec='' + fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in @@ -10324,7 +10952,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -10367,7 +10995,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -10375,7 +11003,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -10390,8 +11018,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -10409,16 +11037,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -10430,7 +11058,46 @@ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + ;; esac fi @@ -10458,26 +11125,39 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -10539,17 +11219,17 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -10559,13 +11239,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -10578,9 +11258,9 @@ no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -10768,48 +11448,54 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; esac @@ -10976,16 +11662,23 @@ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= @@ -10998,7 +11691,7 @@ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -11018,7 +11711,13 @@ if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi @@ -11106,7 +11805,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -11137,8 +11836,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -11159,36 +11859,83 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -11272,6 +12019,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -11317,8 +12078,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -11376,7 +12139,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -11385,12 +12148,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -11403,13 +12171,17 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -11418,7 +12190,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -11733,6 +12505,11 @@ + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= @@ -11805,7 +12582,7 @@ # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11839,7 +12616,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -11853,12 +12630,12 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11892,16 +12669,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11935,12 +12712,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11974,12 +12751,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12013,7 +12790,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -12054,7 +12831,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -12063,7 +12840,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12066 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12104,7 +12881,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -12113,7 +12896,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -12150,7 +12937,7 @@ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -12159,7 +12946,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12162 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12200,7 +12987,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -12209,7 +13002,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -12402,13 +13199,13 @@ sys.exit(1)" python_good=false - for python_candidate in python python2.5 python2.4 python2.3 python2.2; do + for python_candidate in python python2.7 python2.6 python2.5 python2.4 python2.3 python2.2; do unset PYTHON # Extract the first word of "$python_candidate", so it can be a program name with args. set dummy $python_candidate; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then : +if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in @@ -12461,7 +13258,7 @@ if test "$python_good" != "true"; then - as_fn_error "No suitable version of python found" "$LINENO" 5 + as_fn_error $? "No suitable version of python found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking local Python configuration" >&5 @@ -12516,7 +13313,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then : +if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in @@ -12561,13 +13358,13 @@ if test "$PYTHON" = :; then - as_fn_error "no suitable Python interpreter found" "$LINENO" 5 + as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } -if test "${am_cv_python_version+set}" = set; then : +if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` @@ -12586,7 +13383,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } -if test "${am_cv_python_platform+set}" = set; then : +if ${am_cv_python_platform+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` @@ -12600,7 +13397,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } -if test "${am_cv_python_pythondir+set}" = set; then : +if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE @@ -12616,6 +13413,14 @@ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac fi @@ -12630,7 +13435,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } -if test "${am_cv_python_pyexecdir+set}" = set; then : +if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE @@ -12640,500 +13445,83 @@ am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || - echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` - case $am_cv_python_pyexecdir in - $am_py_exec_prefix*) - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` - ;; - esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 -$as_echo "$am_cv_python_pyexecdir" >&6; } - pyexecdir=$am_cv_python_pyexecdir - - - - pkgpyexecdir=\${pyexecdir}/$PACKAGE - - - - fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for headers required to compile python extensions" >&5 -$as_echo_n "checking for headers required to compile python extensions... " >&6; } - - py_prefix=`$PYTHON -c "import sys; print sys.prefix"` - py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" - - if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" - fi - - - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } -HAVE_PYTHON_H=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - - as_fn_error "You need to install the Python development packages." "$LINENO" 5 - -fi -rm -f conftest.err conftest.$ac_ext -CPPFLAGS="$save_CPPFLAGS" - - -as_save_PYTHONPATH=$PYTHONPATH -PYTHONPATH=$srcdir:$PYTHONPATH -export PYTHONPATH - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module pygtk" >&5 -$as_echo_n "checking for python module pygtk... " >&6; } - - prog=" -import sys - -try: - - import pygtk - from flumotion.common import boot; boot.init_gobject() - sys.exit(0) -except ImportError, e: - raise SystemExit(*e.args) -except SystemExit, e: - if not e.args or (e.args[0] != 0 and not isinstance(e.args[0], str)): - raise SystemExit('Unknown error') - raise -except Exception, e: - print ' Error while trying to import pygtk:' - print ' %r: %s' % (e, e) - sys.exit(1)" - -if $PYTHON -c "$prog" 1>&5 2>&6 -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - : -else - as_fn_error "pygtk not found or too old" "$LINENO" 5 -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module pygst" >&5 -$as_echo_n "checking for python module pygst... " >&6; } - - prog=" -import sys - -try: - - import pygst - from flumotion.common import boot; boot.init_gobject(); boot.init_gst() - sys.exit(0) -except ImportError, e: - raise SystemExit(*e.args) -except SystemExit, e: - if not e.args or (e.args[0] != 0 and not isinstance(e.args[0], str)): - raise SystemExit('Unknown error') - raise -except Exception, e: - print ' Error while trying to import pygst:' - print ' %r: %s' % (e, e) - sys.exit(1)" - -if $PYTHON -c "$prog" 1>&5 2>&6 -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - : -else - as_fn_error "gst-python not found or too old" "$LINENO" 5 -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module kiwi" >&5 -$as_echo_n "checking for python module kiwi... " >&6; } - - prog=" -import sys - -try: - - import kiwi - from flumotion.common import boot; boot.init_kiwi() - sys.exit(0) -except ImportError, e: - raise SystemExit(*e.args) -except SystemExit, e: - if not e.args or (e.args[0] != 0 and not isinstance(e.args[0], str)): - raise SystemExit('Unknown error') - raise -except Exception, e: - print ' Error while trying to import kiwi:' - print ' %r: %s' % (e, e) - sys.exit(1)" - -if $PYTHON -c "$prog" 1>&5 2>&6 -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - : -else - as_fn_error "kiwi not found or too old" "$LINENO" 5 -fi - - -PYTHONPATH=$as_save_PYTHONPATH -export PYTHONPATH - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - -fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 -$as_echo_n "checking for GTK... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$GTK_CFLAGS"; then - pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$GTK_LIBS"; then - pkg_cv_GTK_LIBS="$GTK_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0"` - else - GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$GTK_PKG_ERRORS" >&5 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_GTK=no -elif test $pkg_failed = untried; then - HAVE_GTK=no -else - GTK_CFLAGS=$pkg_cv_GTK_CFLAGS - GTK_LIBS=$pkg_cv_GTK_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_GTK=yes -fi - -# decide on tray icon -BUILD_TRAYICON=yes -if test "x$HAVE_PYTHON_H" = "xno" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: Python headers missing, not building tray icon" >&5 -$as_echo "$as_me: Python headers missing, not building tray icon" >&6;} - BUILD_TRAYICON=no -fi -if test "x$HAVE_GTK" = "xno" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: GTK+ 2 development files missing, not building tray icon" >&5 -$as_echo "$as_me: GTK+ 2 development files missing, not building tray icon" >&6;} - BUILD_TRAYICON=no -fi - -if test "x$BUILD_TRAYICON" = "xyes" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: Building tray icon" >&5 -$as_echo "$as_me: Building tray icon" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYGTK" >&5 -$as_echo_n "checking for PYGTK... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$PYGTK_CFLAGS"; then - pkg_cv_PYGTK_CFLAGS="$PYGTK_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pygtk-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pygtk-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PYGTK_CFLAGS=`$PKG_CONFIG --cflags "pygtk-2.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$PYGTK_LIBS"; then - pkg_cv_PYGTK_LIBS="$PYGTK_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pygtk-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pygtk-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PYGTK_LIBS=`$PKG_CONFIG --libs "pygtk-2.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried + echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir -if test $pkg_failed = yes; then + pkgpyexecdir=\${pyexecdir}/$PACKAGE -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - PYGTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pygtk-2.0"` - else - PYGTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pygtk-2.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$PYGTK_PKG_ERRORS" >&5 - as_fn_error "Package requirements (pygtk-2.0) were not met: -$PYGTK_PKG_ERRORS + fi -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables PYGTK_CFLAGS -and PYGTK_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables PYGTK_CFLAGS -and PYGTK_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } -else - PYGTK_CFLAGS=$pkg_cv_PYGTK_CFLAGS - PYGTK_LIBS=$pkg_cv_PYGTK_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pygtk codegen" >&5 -$as_echo_n "checking for pygtk codegen... " >&6; } - PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYGTK_CODEGEN" >&5 -$as_echo "$PYGTK_CODEGEN" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pygtk defsdir" >&5 -$as_echo_n "checking for pygtk defsdir... " >&6; } - PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for headers required to compile python extensions" >&5 +$as_echo_n "checking for headers required to compile python extensions... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYGTK_DEFSDIR" >&5 -$as_echo "$PYGTK_DEFSDIR" >&6; } -fi + py_prefix=`$PYTHON -c "import sys; print sys.prefix"` + py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` + PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" + + if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" + fi - if test "x$BUILD_TRAYICON" = "xyes"; then - BUILD_TRAYICON_TRUE= - BUILD_TRAYICON_FALSE='#' + + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } +HAVE_PYTHON_H=yes else - BUILD_TRAYICON_TRUE='#' - BUILD_TRAYICON_FALSE= + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + + as_fn_error $? "You need to install the Python development packages." "$LINENO" 5 + fi +rm -f conftest.err conftest.i conftest.$ac_ext +CPPFLAGS="$save_CPPFLAGS" +as_save_PYTHONPATH=$PYTHONPATH +PYTHONPATH=$srcdir:$PYTHONPATH +export PYTHONPATH + +PYTHONPATH=$as_save_PYTHONPATH +export PYTHONPATH # Extract the first word of "Xvfb", so it can be a program name with args. set dummy Xvfb; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_XVFB+set}" = set; then : +if ${ac_cv_prog_XVFB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$XVFB"; then @@ -13181,7 +13569,7 @@ set dummy epydoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_EPYDOC+set}" = set; then : +if ${ac_cv_prog_EPYDOC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$EPYDOC"; then @@ -13246,7 +13634,7 @@ set dummy pychecker; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PYCHECKER+set}" = set; then : +if ${ac_cv_prog_PYCHECKER+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PYCHECKER"; then @@ -13290,145 +13678,6 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module twisted" >&5 -$as_echo_n "checking for python module twisted... " >&6; } - - prog=" -import sys - -try: - - import twisted - - sys.exit(0) -except ImportError, e: - raise SystemExit(*e.args) -except SystemExit, e: - if not e.args or (e.args[0] != 0 and not isinstance(e.args[0], str)): - raise SystemExit('Unknown error') - raise -except Exception, e: - print ' Error while trying to import twisted:' - print ' %r: %s' % (e, e) - sys.exit(1)" - -if $PYTHON -c "$prog" 1>&5 2>&6 -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Twisted >= 2.0.1" >&5 -$as_echo_n "checking for Twisted >= 2.0.1... " >&6; } - prog=" -import sys -import twisted.copyright -minver = '2.0.1' -if twisted.copyright.version < minver: - sys.exit(1) -sys.exit(0) -" - if $PYTHON -c "$prog" 1>&5 2>&5 - then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5 -$as_echo "too old" >&6; } - as_fn_error "You need at least version 2.0.1 of Twisted" "$LINENO" 5 - fi - - -else - as_fn_error "You need at least version 2.0.1 of Twisted" "$LINENO" 5 - -fi - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module twisted.names" >&5 -$as_echo_n "checking for python module twisted.names... " >&6; } - - prog=" -import sys - -try: - - import twisted.names - - sys.exit(0) -except ImportError, e: - raise SystemExit(*e.args) -except SystemExit, e: - if not e.args or (e.args[0] != 0 and not isinstance(e.args[0], str)): - raise SystemExit('Unknown error') - raise -except Exception, e: - print ' Error while trying to import twisted.names:' - print ' %r: %s' % (e, e) - sys.exit(1)" - -if $PYTHON -c "$prog" 1>&5 2>&6 -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - - -else - as_fn_error "twisted.names not found. - -Your distribution appears to have separated twisted.names from the rest -of twisted. Please install the package providing twisted.names and try -again." "$LINENO" 5 - -fi - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module twisted.web" >&5 -$as_echo_n "checking for python module twisted.web... " >&6; } - - prog=" -import sys - -try: - - import twisted.web - - sys.exit(0) -except ImportError, e: - raise SystemExit(*e.args) -except SystemExit, e: - if not e.args or (e.args[0] != 0 and not isinstance(e.args[0], str)): - raise SystemExit('Unknown error') - raise -except Exception, e: - print ' Error while trying to import twisted.web:' - print ' %r: %s' % (e, e) - sys.exit(1)" - -if $PYTHON -c "$prog" 1>&5 2>&6 -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - - -else - as_fn_error "twisted.web not found. - -Your distribution appears to have separated twisted.web from the rest -of twisted. Please install the package providing twisted.web and try -again." "$LINENO" 5 - -fi - - - - # Check whether --with-cortado_prefix was given. if test "${with_cortado_prefix+set}" = set; then : withval=$with_cortado_prefix; @@ -13469,7 +13718,7 @@ ac_config_files="$ac_config_files misc/flumotion-verify-config" -ac_config_files="$ac_config_files Makefile bin/Makefile common/Makefile data/Makefile data/glade/Makefile data/image/Makefile data/image/16x16/Makefile data/image/24x24/Makefile data/image/wizard/Makefile data/flumotion-admin.desktop flumotion/Makefile flumotion/admin/Makefile flumotion/admin/assistant/Makefile flumotion/admin/command/Makefile flumotion/admin/gtk/Makefile flumotion/admin/rrdmon/Makefile flumotion/admin/text/Makefile flumotion/common/Makefile flumotion/component/Makefile flumotion/component/base/Makefile flumotion/component/bouncers/Makefile flumotion/component/effects/Makefile flumotion/component/effects/colorbalance/Makefile flumotion/component/effects/volume/Makefile flumotion/component/encoders/Makefile flumotion/component/combiners/Makefile flumotion/component/combiners/composite/Makefile flumotion/component/combiners/switch/Makefile flumotion/component/consumers/Makefile flumotion/component/consumers/disker/Makefile flumotion/component/consumers/gdp/Makefile flumotion/component/consumers/httpstreamer/Makefile flumotion/component/consumers/preview/Makefile flumotion/component/consumers/shout2/Makefile flumotion/component/converters/Makefile flumotion/component/converters/pipeline/Makefile flumotion/component/converters/overlay/Makefile flumotion/component/misc/Makefile flumotion/component/misc/httpserver/Makefile flumotion/component/misc/porter/Makefile flumotion/component/misc/repeater/Makefile flumotion/component/muxers/Makefile flumotion/component/plugs/Makefile flumotion/component/plugs/cortado/Makefile flumotion/component/plugs/cortado/cortado_location.py flumotion/component/producers/Makefile flumotion/component/producers/audiotest/Makefile flumotion/component/producers/bttv/Makefile flumotion/component/producers/firewire/Makefile flumotion/component/producers/gdp/Makefile flumotion/component/producers/icecast/Makefile flumotion/component/producers/ivtv/Makefile flumotion/component/producers/pipeline/Makefile flumotion/component/producers/playlist/Makefile flumotion/component/producers/rtsp/Makefile flumotion/component/producers/screencast/Makefile flumotion/component/producers/soundcard/Makefile flumotion/component/producers/videotest/Makefile flumotion/component/producers/webcam/Makefile flumotion/component/producers/looper/Makefile flumotion/component/producers/unixdomain/Makefile flumotion/configure/Makefile flumotion/configure/installed.py flumotion/configure/uninstalled.py flumotion/extern/Makefile flumotion/extern/fdpass/Makefile flumotion/extern/pytrayicon/Makefile flumotion/job/Makefile flumotion/launch/Makefile flumotion/manager/Makefile flumotion/monitor/Makefile flumotion/monitor/nagios/Makefile flumotion/project/Makefile flumotion/service/Makefile flumotion/scenario/Makefile flumotion/scenario/live/Makefile flumotion/scenario/ondemand/Makefile flumotion/scenario/steps/Makefile flumotion/test/Makefile flumotion/tester/Makefile flumotion/twisted/Makefile flumotion/ui/Makefile flumotion/worker/Makefile flumotion/worker/checks/Makefile conf/Makefile doc/Makefile doc/reference/Makefile doc/man/Makefile pkgconfig/Makefile pkgconfig/flumotion.pc pkgconfig/flumotion-uninstalled.pc tests/Makefile tests/integration/Makefile flumotion.spec po/Makefile.in" +ac_config_files="$ac_config_files Makefile bin/Makefile common/Makefile data/Makefile data/glade/Makefile data/image/Makefile data/image/16x16/Makefile data/image/24x24/Makefile data/image/36x36/Makefile data/image/wizard/Makefile data/flumotion-admin.desktop flumotion/Makefile flumotion/admin/Makefile flumotion/admin/assistant/Makefile flumotion/admin/command/Makefile flumotion/admin/gtk/Makefile flumotion/admin/rrdmon/Makefile flumotion/admin/text/Makefile flumotion/common/Makefile flumotion/component/Makefile flumotion/component/base/Makefile flumotion/component/bouncers/Makefile flumotion/component/bouncers/algorithms/Makefile flumotion/component/common/Makefile flumotion/component/common/fgdp/Makefile flumotion/component/effects/Makefile flumotion/component/effects/audioconvert/Makefile flumotion/component/effects/audioresync/Makefile flumotion/component/effects/colorbalance/Makefile flumotion/component/effects/deinterlace/Makefile flumotion/component/effects/videorate/Makefile flumotion/component/effects/videoscale/Makefile flumotion/component/effects/volume/Makefile flumotion/component/encoders/Makefile flumotion/component/combiners/Makefile flumotion/component/combiners/composite/Makefile flumotion/component/combiners/switch/Makefile flumotion/component/consumers/Makefile flumotion/component/consumers/disker/Makefile flumotion/component/consumers/fgdp/Makefile flumotion/component/consumers/httpstreamer/Makefile flumotion/component/consumers/pipeline/Makefile flumotion/component/consumers/preview/Makefile flumotion/component/consumers/shout2/Makefile flumotion/component/converters/Makefile flumotion/component/converters/pipeline/Makefile flumotion/component/converters/overlay/Makefile flumotion/component/converters/video/Makefile flumotion/component/decoders/Makefile flumotion/component/decoders/generic/Makefile flumotion/component/misc/Makefile flumotion/component/misc/httpserver/Makefile flumotion/component/misc/httpserver/httpcached/Makefile flumotion/component/misc/porter/Makefile flumotion/component/misc/repeater/Makefile flumotion/component/muxers/Makefile flumotion/component/plugs/Makefile flumotion/component/plugs/cortado/Makefile flumotion/component/plugs/cortado/cortado_location.py flumotion/component/plugs/html5/Makefile flumotion/component/producers/Makefile flumotion/component/producers/audiotest/Makefile flumotion/component/producers/bttv/Makefile flumotion/component/producers/blackmagic/Makefile flumotion/component/producers/firewire/Makefile flumotion/component/producers/fgdp/Makefile flumotion/component/producers/icecast/Makefile flumotion/component/producers/ivtv/Makefile flumotion/component/producers/pipeline/Makefile flumotion/component/producers/playlist/Makefile flumotion/component/producers/rtsp/Makefile flumotion/component/producers/screencast/Makefile flumotion/component/producers/soundcard/Makefile flumotion/component/producers/videotest/Makefile flumotion/component/producers/webcam/Makefile flumotion/component/producers/looper/Makefile flumotion/component/producers/unixdomain/Makefile flumotion/configure/Makefile flumotion/configure/installed.py flumotion/configure/uninstalled.py flumotion/extern/Makefile flumotion/extern/fdpass/Makefile flumotion/job/Makefile flumotion/launch/Makefile flumotion/manager/Makefile flumotion/monitor/Makefile flumotion/monitor/nagios/Makefile flumotion/project/Makefile flumotion/service/Makefile flumotion/scenario/Makefile flumotion/scenario/live/Makefile flumotion/scenario/ondemand/Makefile flumotion/scenario/loadflow/Makefile flumotion/scenario/steps/Makefile flumotion/test/Makefile flumotion/tester/Makefile flumotion/twisted/Makefile flumotion/ui/Makefile flumotion/worker/Makefile flumotion/worker/checks/Makefile conf/Makefile doc/Makefile doc/reference/Makefile doc/man/Makefile pkgconfig/Makefile pkgconfig/flumotion.pc pkgconfig/flumotion-uninstalled.pc tests/Makefile tests/integration/Makefile flumotion.spec po/Makefile.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -13535,10 +13784,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -13590,6 +13850,7 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -13613,35 +13874,31 @@ fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi ac_config_commands="$ac_config_commands po/stamp-it" -if test -z "${BUILD_TRAYICON_TRUE}" && test -z "${BUILD_TRAYICON_FALSE}"; then - as_fn_error "conditional \"BUILD_TRAYICON\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_EPYDOC_TRUE}" && test -z "${HAVE_EPYDOC_FALSE}"; then - as_fn_error "conditional \"HAVE_EPYDOC\" was never defined. + as_fn_error $? "conditional \"HAVE_EPYDOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then - as_fn_error "conditional \"BUILD_DOCS\" was never defined. + as_fn_error $? "conditional \"BUILD_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PYCHECKER_TRUE}" && test -z "${HAVE_PYCHECKER_FALSE}"; then - as_fn_error "conditional \"HAVE_PYCHECKER\" was never defined. + as_fn_error $? "conditional \"HAVE_PYCHECKER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -13742,6 +13999,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -13787,19 +14045,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -13995,7 +14253,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -14048,8 +14306,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by flumotion $as_me 0.6.1, which was -generated by GNU Autoconf 2.64. Invocation command line was +This file was extended by flumotion $as_me 0.9.1, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14085,6 +14343,7 @@ -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -14098,16 +14357,18 @@ Configuration commands: $config_commands -Report bugs to the package provider." +Report bugs to . +flumotion home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -flumotion config.status 0.6.1 -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +flumotion config.status 0.9.1 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14125,11 +14386,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -14143,12 +14409,15 @@ ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -14159,7 +14428,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -14225,131 +14494,153 @@ sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + # Quote evaled strings. -for var in SED \ +for var in SHELL \ +ECHO \ +SED \ GREP \ EGREP \ FGREP \ @@ -14362,8 +14653,13 @@ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -14373,14 +14669,14 @@ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -14396,7 +14692,6 @@ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -14404,12 +14699,13 @@ libname_spec \ library_names_spec \ soname_spec \ +install_override_mode \ finish_eval \ old_striplib \ striplib; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -14431,14 +14727,15 @@ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -14446,12 +14743,6 @@ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' @@ -14507,6 +14798,7 @@ "data/image/Makefile") CONFIG_FILES="$CONFIG_FILES data/image/Makefile" ;; "data/image/16x16/Makefile") CONFIG_FILES="$CONFIG_FILES data/image/16x16/Makefile" ;; "data/image/24x24/Makefile") CONFIG_FILES="$CONFIG_FILES data/image/24x24/Makefile" ;; + "data/image/36x36/Makefile") CONFIG_FILES="$CONFIG_FILES data/image/36x36/Makefile" ;; "data/image/wizard/Makefile") CONFIG_FILES="$CONFIG_FILES data/image/wizard/Makefile" ;; "data/flumotion-admin.desktop") CONFIG_FILES="$CONFIG_FILES data/flumotion-admin.desktop" ;; "flumotion/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/Makefile" ;; @@ -14520,8 +14812,16 @@ "flumotion/component/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/Makefile" ;; "flumotion/component/base/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/base/Makefile" ;; "flumotion/component/bouncers/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/bouncers/Makefile" ;; + "flumotion/component/bouncers/algorithms/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/bouncers/algorithms/Makefile" ;; + "flumotion/component/common/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/common/Makefile" ;; + "flumotion/component/common/fgdp/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/common/fgdp/Makefile" ;; "flumotion/component/effects/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/effects/Makefile" ;; + "flumotion/component/effects/audioconvert/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/effects/audioconvert/Makefile" ;; + "flumotion/component/effects/audioresync/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/effects/audioresync/Makefile" ;; "flumotion/component/effects/colorbalance/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/effects/colorbalance/Makefile" ;; + "flumotion/component/effects/deinterlace/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/effects/deinterlace/Makefile" ;; + "flumotion/component/effects/videorate/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/effects/videorate/Makefile" ;; + "flumotion/component/effects/videoscale/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/effects/videoscale/Makefile" ;; "flumotion/component/effects/volume/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/effects/volume/Makefile" ;; "flumotion/component/encoders/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/encoders/Makefile" ;; "flumotion/component/combiners/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/combiners/Makefile" ;; @@ -14529,26 +14829,33 @@ "flumotion/component/combiners/switch/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/combiners/switch/Makefile" ;; "flumotion/component/consumers/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/consumers/Makefile" ;; "flumotion/component/consumers/disker/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/consumers/disker/Makefile" ;; - "flumotion/component/consumers/gdp/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/consumers/gdp/Makefile" ;; + "flumotion/component/consumers/fgdp/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/consumers/fgdp/Makefile" ;; "flumotion/component/consumers/httpstreamer/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/consumers/httpstreamer/Makefile" ;; + "flumotion/component/consumers/pipeline/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/consumers/pipeline/Makefile" ;; "flumotion/component/consumers/preview/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/consumers/preview/Makefile" ;; "flumotion/component/consumers/shout2/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/consumers/shout2/Makefile" ;; "flumotion/component/converters/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/converters/Makefile" ;; "flumotion/component/converters/pipeline/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/converters/pipeline/Makefile" ;; "flumotion/component/converters/overlay/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/converters/overlay/Makefile" ;; + "flumotion/component/converters/video/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/converters/video/Makefile" ;; + "flumotion/component/decoders/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/decoders/Makefile" ;; + "flumotion/component/decoders/generic/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/decoders/generic/Makefile" ;; "flumotion/component/misc/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/misc/Makefile" ;; "flumotion/component/misc/httpserver/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/misc/httpserver/Makefile" ;; + "flumotion/component/misc/httpserver/httpcached/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/misc/httpserver/httpcached/Makefile" ;; "flumotion/component/misc/porter/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/misc/porter/Makefile" ;; "flumotion/component/misc/repeater/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/misc/repeater/Makefile" ;; "flumotion/component/muxers/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/muxers/Makefile" ;; "flumotion/component/plugs/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/plugs/Makefile" ;; "flumotion/component/plugs/cortado/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/plugs/cortado/Makefile" ;; "flumotion/component/plugs/cortado/cortado_location.py") CONFIG_FILES="$CONFIG_FILES flumotion/component/plugs/cortado/cortado_location.py" ;; + "flumotion/component/plugs/html5/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/plugs/html5/Makefile" ;; "flumotion/component/producers/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/producers/Makefile" ;; "flumotion/component/producers/audiotest/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/producers/audiotest/Makefile" ;; "flumotion/component/producers/bttv/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/producers/bttv/Makefile" ;; + "flumotion/component/producers/blackmagic/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/producers/blackmagic/Makefile" ;; "flumotion/component/producers/firewire/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/producers/firewire/Makefile" ;; - "flumotion/component/producers/gdp/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/producers/gdp/Makefile" ;; + "flumotion/component/producers/fgdp/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/producers/fgdp/Makefile" ;; "flumotion/component/producers/icecast/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/producers/icecast/Makefile" ;; "flumotion/component/producers/ivtv/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/producers/ivtv/Makefile" ;; "flumotion/component/producers/pipeline/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/component/producers/pipeline/Makefile" ;; @@ -14565,7 +14872,6 @@ "flumotion/configure/uninstalled.py") CONFIG_FILES="$CONFIG_FILES flumotion/configure/uninstalled.py" ;; "flumotion/extern/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/extern/Makefile" ;; "flumotion/extern/fdpass/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/extern/fdpass/Makefile" ;; - "flumotion/extern/pytrayicon/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/extern/pytrayicon/Makefile" ;; "flumotion/job/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/job/Makefile" ;; "flumotion/launch/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/launch/Makefile" ;; "flumotion/manager/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/manager/Makefile" ;; @@ -14576,6 +14882,7 @@ "flumotion/scenario/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/scenario/Makefile" ;; "flumotion/scenario/live/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/scenario/live/Makefile" ;; "flumotion/scenario/ondemand/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/scenario/ondemand/Makefile" ;; + "flumotion/scenario/loadflow/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/scenario/loadflow/Makefile" ;; "flumotion/scenario/steps/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/scenario/steps/Makefile" ;; "flumotion/test/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/test/Makefile" ;; "flumotion/tester/Makefile") CONFIG_FILES="$CONFIG_FILES flumotion/tester/Makefile" ;; @@ -14596,7 +14903,7 @@ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -14618,9 +14925,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -14628,12 +14936,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -14667,24 +14976,24 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && - echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && + echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 rm -f conf$$files.sh { @@ -14692,18 +15001,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -14711,7 +15020,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -14725,7 +15034,7 @@ t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -14739,7 +15048,7 @@ t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -14759,7 +15068,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init @@ -14797,21 +15106,29 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -14829,7 +15146,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -14848,7 +15165,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -14857,7 +15174,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -14883,8 +15200,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -15022,26 +15339,27 @@ " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then - $AWK -f "$tmp/subs.awk" + $AWK -f "$ac_tmp/subs.awk" else - $AWK -f "$tmp/subs.awk" | $SHELL -fi >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + $AWK -f "$ac_tmp/subs.awk" | $SHELL +fi \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -15285,7 +15603,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -15333,6 +15652,12 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + # The host system. host_alias=$host_alias host=$host @@ -15382,9 +15707,11 @@ # turn newlines into spaces. NL2SP=$lt_lt_NL2SP -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP @@ -15392,13 +15719,30 @@ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -15407,6 +15751,9 @@ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + # A C compiler. LTCC=$lt_CC @@ -15425,14 +15772,14 @@ # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO +# The name of the directory that contains temporary libtool files. +objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD @@ -15440,6 +15787,9 @@ # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -15496,6 +15846,9 @@ # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds @@ -15535,6 +15888,10 @@ # The linker used to build libraries. LD=$lt_LD +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds @@ -15547,12 +15904,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -15639,9 +15996,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -15657,6 +16011,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -15689,212 +16046,169 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -15924,7 +16238,7 @@ "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES" if test ! -f "po/Makefile"; then - as_fn_error "po/Makefile is not ready." "$LINENO" 5 + as_fn_error $? "po/Makefile is not ready." "$LINENO" 5 fi mv "po/Makefile" "po/Makefile.tmp" sed '/^POTFILES =/,/[^\\]$/ { @@ -15945,7 +16259,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -15966,7 +16280,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 @@ -15975,7 +16289,11 @@ echo -echo "Building documentation: $enable_docs" +echo " $PACKAGE_STRING ($PACKAGE_VERSION_RELEASE)" +echo +echo " Building documentation: $enable_docs" +echo " pychecker: $PYCHECKER" +echo " epydoc: $EPYDOC" echo echo "Now type \"make\" to build flumotion" diff -Nru flumotion-0.6.1/configure.ac flumotion-0.9.1/configure.ac --- flumotion-0.6.1/configure.ac 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/configure.ac 2011-09-11 08:09:03.000000000 +0000 @@ -1,35 +1,40 @@ --*- mode: m4 -*- +dnl initialize autoconf +dnl when going to/from release please remove/add the nano (fourth number) +dnl releases only do Wall, cvs and prerelease does Werror too + +AC_INIT(flumotion, m4_esyscmd([ test -z "$VERSION" && VERSION=0.9.1; + common/version-gen $VERSION .tarball-version]), + [flumotion-devel@lists.fluendo.com], + [flumotion], [http://www.flumotion.net/]) -m4_define([flu_major_version], [0]) -m4_define([flu_minor_version], [6]) -m4_define([flu_micro_version], [1]) -m4_define([flu_extra_version], [0]) -m4_define([flu_version], [flu_major_version.flu_minor_version.flu_micro_version]) - -AC_INIT(flumotion, [flu_version]) +dnl initialize automake AM_INIT_AUTOMAKE([-Wno-portability]) -AS_VERSION(flumotion, FLUMOTION, - flu_major_version, - flu_minor_version, - flu_micro_version, - flu_extra_version) -AC_SUBST(RELEASE, $FLUMOTION_RELEASE) +dnl define PACKAGE_VERSION_* variables +AS_VERSION +AC_SUBST(PACKAGE_VERSION_SPEC, `echo $VERSION | tr '-' '_'`) +AS_NANO AC_SUBST_FILE(AUTHORS) AUTHORS=$srcdir/AUTHORS dnl keep in sync with flumotion/common/boot.py and -dnl flumotion.spec.in -AC_SUBST(PYGTK_010_REQ, 2.8.4) -AC_SUBST(PYGST_010_REQ, 0.10.0) -AC_SUBST(GST_010_REQ, 0.10.0.1) +AC_SUBST(PYGTK_010_REQ, 2.10.0) +AC_SUBST(PYCAIRO_010_REQ, 1.2.0) +AC_SUBST(PYGST_010_REQ, 0.10.4) +AC_SUBST(GST_010_REQ, 0.10.11) GST_010_SUPPORTED=true +dnl Start date used to autogenrate ChangeLog from 'git log' +AC_SUBST(GIT_LOG_START_COMMIT, "e504f6baf852066b47c96b74d9f7f1c78313a841") + dnl Add parameters for aclocal AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common") +dnl for rerunning libtoolize +AC_CONFIG_MACRO_DIR([m4]) + dnl set up gettext dnl the version check needs to stay here because autopoint greps for it AM_GNU_GETTEXT_VERSION([0.11.5]) @@ -73,57 +78,9 @@ PYTHONPATH=$srcdir:$PYTHONPATH export PYTHONPATH -dnl check for pygtk -AS_PYTHON_IMPORT(pygtk,,AC_MSG_ERROR([pygtk not found or too old]),, - [from flumotion.common import boot; boot.init_gobject()]) - -dnl check for gstreamer and gst-python -AS_PYTHON_IMPORT(pygst,,AC_MSG_ERROR([gst-python not found or too old]),, - [from flumotion.common import boot; boot.init_gobject(); boot.init_gst()]) - -dnl check for kiwi -AS_PYTHON_IMPORT(kiwi,,AC_MSG_ERROR([kiwi not found or too old]),, - [from flumotion.common import boot; boot.init_kiwi()]) - PYTHONPATH=$as_save_PYTHONPATH export PYTHONPATH -PKG_CHECK_MODULES(GTK, gtk+-2.0, HAVE_GTK=yes, HAVE_GTK=no) - -# decide on tray icon -BUILD_TRAYICON=yes -if test "x$HAVE_PYTHON_H" = "xno" -then - AC_MSG_NOTICE([Python headers missing, not building tray icon]) - BUILD_TRAYICON=no -fi -if test "x$HAVE_GTK" = "xno" -then - AC_MSG_NOTICE([GTK+ 2 development files missing, not building tray icon]) - BUILD_TRAYICON=no -fi - -if test "x$BUILD_TRAYICON" = "xyes" -then - AC_MSG_NOTICE([Building tray icon]) - - PKG_CHECK_MODULES(PYGTK, pygtk-2.0) - dnl check stuff we can generate the tray icon with - AC_MSG_CHECKING(for pygtk codegen) - PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py" - dnl PYGTK_CODEGEN="$PYTHON \$(top_srcdir)/codegen/codegen.py" - AC_SUBST(PYGTK_CODEGEN) - AC_MSG_RESULT($PYGTK_CODEGEN) - - AC_MSG_CHECKING(for pygtk defsdir) - PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` - AC_SUBST(PYGTK_DEFSDIR) - AC_MSG_RESULT($PYGTK_DEFSDIR) -fi - -AM_CONDITIONAL(BUILD_TRAYICON, test "x$BUILD_TRAYICON" = "xyes") - - dnl XVFB can be used for documentation building and testing because dnl some things need to import gtk AC_CHECK_PROG(XVFB, Xvfb, yes, no) @@ -153,33 +110,6 @@ AC_CHECK_PROG(PYCHECKER, pychecker, yes, no) AM_CONDITIONAL(HAVE_PYCHECKER, test "x$PYCHECKER" = "xyes") -dnl check for Twisted -AS_PYTHON_IMPORT(twisted, - [ - AC_MSG_CHECKING(for Twisted >= 2.0.1) - prog=" -import sys -import twisted.copyright -minver = '2.0.1' -if twisted.copyright.version < minver: - sys.exit(1) -sys.exit(0) -" - if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC - then - AC_MSG_RESULT(found) - else - AC_MSG_RESULT(too old) - AC_MSG_ERROR([You need at least version 2.0.1 of Twisted]) - fi - ] - , - AC_MSG_ERROR([You need at least version 2.0.1 of Twisted]) -) - -TWISTED_MODULE([twisted.names]) -TWISTED_MODULE([twisted.web]) - dnl Cortado AC_ARG_WITH(cortado_prefix, AC_HELP_STRING(--with-cortado-prefix=, where cortado can be found)) @@ -213,6 +143,7 @@ data/image/Makefile data/image/16x16/Makefile data/image/24x24/Makefile +data/image/36x36/Makefile data/image/wizard/Makefile data/flumotion-admin.desktop flumotion/Makefile @@ -226,8 +157,16 @@ flumotion/component/Makefile flumotion/component/base/Makefile flumotion/component/bouncers/Makefile +flumotion/component/bouncers/algorithms/Makefile +flumotion/component/common/Makefile +flumotion/component/common/fgdp/Makefile flumotion/component/effects/Makefile +flumotion/component/effects/audioconvert/Makefile +flumotion/component/effects/audioresync/Makefile flumotion/component/effects/colorbalance/Makefile +flumotion/component/effects/deinterlace/Makefile +flumotion/component/effects/videorate/Makefile +flumotion/component/effects/videoscale/Makefile flumotion/component/effects/volume/Makefile flumotion/component/encoders/Makefile flumotion/component/combiners/Makefile @@ -235,26 +174,33 @@ flumotion/component/combiners/switch/Makefile flumotion/component/consumers/Makefile flumotion/component/consumers/disker/Makefile -flumotion/component/consumers/gdp/Makefile +flumotion/component/consumers/fgdp/Makefile flumotion/component/consumers/httpstreamer/Makefile +flumotion/component/consumers/pipeline/Makefile flumotion/component/consumers/preview/Makefile flumotion/component/consumers/shout2/Makefile flumotion/component/converters/Makefile flumotion/component/converters/pipeline/Makefile flumotion/component/converters/overlay/Makefile +flumotion/component/converters/video/Makefile +flumotion/component/decoders/Makefile +flumotion/component/decoders/generic/Makefile flumotion/component/misc/Makefile flumotion/component/misc/httpserver/Makefile +flumotion/component/misc/httpserver/httpcached/Makefile flumotion/component/misc/porter/Makefile flumotion/component/misc/repeater/Makefile flumotion/component/muxers/Makefile flumotion/component/plugs/Makefile flumotion/component/plugs/cortado/Makefile flumotion/component/plugs/cortado/cortado_location.py +flumotion/component/plugs/html5/Makefile flumotion/component/producers/Makefile flumotion/component/producers/audiotest/Makefile flumotion/component/producers/bttv/Makefile +flumotion/component/producers/blackmagic/Makefile flumotion/component/producers/firewire/Makefile -flumotion/component/producers/gdp/Makefile +flumotion/component/producers/fgdp/Makefile flumotion/component/producers/icecast/Makefile flumotion/component/producers/ivtv/Makefile flumotion/component/producers/pipeline/Makefile @@ -271,7 +217,6 @@ flumotion/configure/uninstalled.py flumotion/extern/Makefile flumotion/extern/fdpass/Makefile -flumotion/extern/pytrayicon/Makefile flumotion/job/Makefile flumotion/launch/Makefile flumotion/manager/Makefile @@ -282,6 +227,7 @@ flumotion/scenario/Makefile flumotion/scenario/live/Makefile flumotion/scenario/ondemand/Makefile +flumotion/scenario/loadflow/Makefile flumotion/scenario/steps/Makefile flumotion/test/Makefile flumotion/tester/Makefile @@ -303,7 +249,11 @@ ) echo -echo "Building documentation: $enable_docs" +echo " $PACKAGE_STRING ($PACKAGE_VERSION_RELEASE)" +echo +echo " Building documentation: $enable_docs" +echo " pychecker: $PYCHECKER" +echo " epydoc: $EPYDOC" echo echo "Now type \"make\" to build flumotion" diff -Nru flumotion-0.6.1/COPYING flumotion-0.9.1/COPYING --- flumotion-0.6.1/COPYING 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/COPYING 2011-09-11 08:09:03.000000000 +0000 @@ -1,13 +1,8 @@ Flumotion - a streaming media server -Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). +Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +Copyright (C) 2010,2011 Flumotion Services, S.A. All rights reserved. -This software is available under two license agreements. - -The first license agreement is the GPL version 2. -See "LICENSE.GPL" in the root of this distribution. - -The second license is the Flumotion Advanced Commercial License Agreement. -This license agreement is available to licensees holding valid -Flumotion Advanced licenses. -See "LICENSE.Flumotion" in the root of this distribution. +This software is distributed under the terms of the GNU Lesser General +Public License version 2.1 as published by the Free Software Foundation. +See "LICENSE.LGPL" in the source distribution for more information. diff -Nru flumotion-0.6.1/data/cortado-template.html flumotion-0.9.1/data/cortado-template.html --- flumotion-0.6.1/data/cortado-template.html 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/cortado-template.html 2011-09-11 08:09:03.000000000 +0000 @@ -14,13 +14,13 @@ } } if (!_have_java) { - window.location = "http://www.flumotion.com/java/"; + window.location = "http://www.java.com/getjava/"; } } } function objectLoadError () { - window.location = "http://www.flumotion.com/java/"; + window.location = "http://www.java.com/getjava/"; } diff -Nru flumotion-0.6.1/data/glade/admin.glade flumotion-0.9.1/data/glade/admin.glade --- flumotion-0.6.1/data/glade/admin.glade 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/glade/admin.glade 2011-09-11 08:09:03.000000000 +0000 @@ -1,128 +1,88 @@ - - - + - - - Flumotion Administration - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER - False - 720 - 576 - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 0 - - - - 6 - True - True - 360 - - - - True - True - 320 - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_ETCHED_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - True - False - False - True - False - False - False - - - - - True - False - - - - - - True - flumotion.admin.gtk.componentview.ComponentView - 0 - 0 - Wed, 13 Jun 2007 11:04:16 GMT - - - False - True - - - - - False - True - - - - - - 120 - flumotion.admin.gtk.message.MessagesView - 0 - 0 - Sun, 29 Jan 2006 19:57:06 GMT - - - True - True - - - - - 0 - True - True - - - - - - True - True - - - 0 - False - False - - - - - - + + + + Flumotion Administration + center + 720 + 576 + + + True + + + True + True + 6 + vertical + 360 + + + True + True + 320 + + + True + True + automatic + automatic + etched-in + + + True + True + True + + + + + False + True + + + + + True + flumotion.admin.gtk.componentview.ComponentView + + + True + False + + + + + True + False + + + + + flumotion.admin.gtk.message.MessagesView + + + False + False + + + + + 0 + + + + + True + + + False + False + 1 + + + + + diff -Nru flumotion-0.6.1/data/glade/consumption-wizard.glade flumotion-0.9.1/data/glade/consumption-wizard.glade --- flumotion-0.6.1/data/glade/consumption-wizard.glade 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/glade/consumption-wizard.glade 2011-09-11 08:09:03.000000000 +0000 @@ -1,354 +1,32 @@ - - - + - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 6 - - - - True - True - S_tream over HTTP - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - False - 0 - - - - True - False - 0 - - - - True - True - Audio & Video - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - True - Audio only - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - - - - True - True - Video only - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - - - 24 - True - True - - - - - 0 - False - False - - - - - - True - True - S_ave to disk - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - - - - True - False - 0 - - - - True - False - 0 - - - - True - False - True - Audio & Video - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - False - True - Audio only - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - - - - True - False - True - Video only - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - - - 24 - True - True - - - - - 0 - False - False - - - - - - True - True - Stream to _Icecast2 - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - - - - True - False - 0 - - - - True - False - 0 - - - - True - False - True - Audio & Video - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - False - False - - - - - - True - False - True - Audio only - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - - - - True - False - True - Video only - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - - - - 24 - True - True - - - - - 0 - False - False - - - - - - + + + + window1 + + + True + True + automatic + automatic + + + True + queue + none + + + True + 6 + + + + + + + + + + diff -Nru flumotion-0.6.1/data/glade/disker-wizard.glade flumotion-0.9.1/data/glade/disker-wizard.glade --- flumotion-0.6.1/data/glade/disker-wizard.glade 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/glade/disker-wizard.glade 1970-01-01 00:00:00.000000000 +0000 @@ -1,344 +0,0 @@ - - - - - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 0 - - - - True - 3 - 2 - False - 6 - 6 - - - - True - 2 - 3 - False - 6 - 7 - - - - True - True - - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - True - - True - GTK_RELIEF_NORMAL - True - False - False - True - has_time - - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - False - True - - - 2 - 3 - 0 - 1 - fill - fill - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 12 0 100 1 10 10 - - - 1 - 2 - 0 - 1 - - - - - - - True - False - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 10 0 100 1 10 10 - - - 1 - 2 - 1 - 2 - - - - - - - True - False - False - True - - - 2 - 3 - 1 - 2 - fill - fill - - - - - 1 - 2 - 1 - 2 - - - - - - - - True - 0 - 0.5 - 0 - 1 - 0 - 0 - 0 - 0 - - - - True - True - _Rotate entry every: - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - - - 0 - 1 - 1 - 2 - fill - fill - - - - - - True - True - Record at startup - True - GTK_RELIEF_NORMAL - True - True - False - True - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 0 - - - - True - True - True - True - 0 - /tmp - True - * - False - - - 0 - True - True - - - - - - True - True - _Select - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - - - - - - True - _Choose location: - True - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - 2 - 0 - 1 - fill - - - - - 0 - False - False - - - - - - - diff -Nru flumotion-0.6.1/data/glade/httpstreamer-wizard.glade flumotion-0.9.1/data/glade/httpstreamer-wizard.glade --- flumotion-0.6.1/data/glade/httpstreamer-wizard.glade 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/glade/httpstreamer-wizard.glade 1970-01-01 00:00:00.000000000 +0000 @@ -1,366 +0,0 @@ - - - - - - window1 - - - True - - - True - 3 - - - True - 2 - 6 - 6 - - - True - 0 - _Mount point: - True - mount_point - - - GTK_FILL - - - - - - True - 0 - 0 - - - True - True - * - 24 - / - - - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - - - False - False - - - - - True - flumotion.scenario.steps.httpstreamersteps.PlugPluginArea - - - False - False - 1 - - - - - True - True - True - True - - - True - 6 - 4 - 6 - 6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - 20 - - - True - True - - localhost.localdomain - - - - - 4 - 5 - 6 - GTK_FILL - GTK_FILL - - - - - True - True - Public hostname: - True - 0 - True - - - - 4 - 5 - GTK_FILL - - - - - - True - 0 - Mbit/s - - - 2 - 3 - 2 - 3 - GTK_FILL - - - - - - True - 0 - clients - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - True - User limit: - True - 0 - True - - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - 0 - - - True - True - 500 1 16384 1 10 10 - 1 - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 1 - - - - - - 1 - 2 - 3 - 4 - GTK_FILL - GTK_FILL - - - - - True - 1 - - - True - True - 10 0 1000 1 10 10 - 1 - 2 - - - - - 1 - 2 - 2 - 3 - GTK_FILL - GTK_FILL - - - - - True - 0 - 0 - - - True - True - 8800 1024 65535 1 10 10 - 1 - True - - - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 0 - 0 - - - True - True - Send buffered data to new clients. This reduces the delay before playback starts, but increases the latency. - Bu_rst on connect - True - 0 - True - - - - - 3 - 4 - GTK_FILL - GTK_FILL - - - - - True - 0 - 0 - - - True - True - Bandwidth limit: - True - 0 - True - - - - - - 2 - 3 - GTK_FILL - GTK_FILL - - - - - True - 0 - _Port: - True - port - - - GTK_FILL - - - - - - - - True - _Advanced settings - True - - - label_item - - - - - False - 2 - - - - - - diff -Nru flumotion-0.6.1/data/glade/loadflow-wizard.glade flumotion-0.9.1/data/glade/loadflow-wizard.glade --- flumotion-0.6.1/data/glade/loadflow-wizard.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/data/glade/loadflow-wizard.glade 2011-09-11 08:09:03.000000000 +0000 @@ -0,0 +1,76 @@ + + + + + + window1 + + + True + 6 + + + True + + + True + 0 + _File name: + True + filename + + + False + False + 6 + + + + + True + True + False + + + False + False + 6 + 1 + + + + + True + True + _Select... + True + 0 + + + + False + False + 6 + 2 + + + + + False + False + 6 + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/data/glade/Makefile.am flumotion-0.9.1/data/glade/Makefile.am --- flumotion-0.6.1/data/glade/Makefile.am 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/glade/Makefile.am 2011-09-11 08:09:03.000000000 +0000 @@ -17,17 +17,15 @@ sectionwizard.glade \ audio-encoder-wizard.glade \ consumption-wizard.glade \ - disker-wizard.glade \ encoding-wizard.glade \ - httpstreamer-wizard.glade \ license-wizard.glade \ + loadflow-wizard.glade \ ondemand-wizard.glade \ overlay-wizard.glade \ overview-wizard.glade \ production-wizard.glade \ scenario-wizard.glade \ select-producers-wizard.glade \ - shout2-wizard.glade \ summary-wizard.glade \ welcome-wizard.glade diff -Nru flumotion-0.6.1/data/glade/Makefile.in flumotion-0.9.1/data/glade/Makefile.in --- flumotion-0.6.1/data/glade/Makefile.in 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/data/glade/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -41,14 +41,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -99,6 +98,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -108,18 +108,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -167,6 +160,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -184,16 +178,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -201,7 +197,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -216,6 +211,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -248,7 +244,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -287,17 +282,15 @@ sectionwizard.glade \ audio-encoder-wizard.glade \ consumption-wizard.glade \ - disker-wizard.glade \ encoding-wizard.glade \ - httpstreamer-wizard.glade \ license-wizard.glade \ + loadflow-wizard.glade \ ondemand-wizard.glade \ overlay-wizard.glade \ overview-wizard.glade \ production-wizard.glade \ scenario-wizard.glade \ select-producers-wizard.glade \ - shout2-wizard.glade \ summary-wizard.glade \ welcome-wizard.glade diff -Nru flumotion-0.6.1/data/glade/ondemand-wizard.glade flumotion-0.9.1/data/glade/ondemand-wizard.glade --- flumotion-0.6.1/data/glade/ondemand-wizard.glade 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/glade/ondemand-wizard.glade 2011-09-11 08:09:03.000000000 +0000 @@ -25,6 +25,7 @@ False False + 0 @@ -34,17 +35,11 @@ True - 3 + 4 3 6 6 - - - - - - True @@ -58,6 +53,7 @@ False + 0 @@ -110,7 +106,6 @@ True _Select... True - 0 @@ -173,86 +168,9 @@ - - True - True - 0 - True - - - - True - <b>Log requests to a file (apache log):</b> - True - - - - - False - False - 2 - - - - + True - 12 - - - True - 3 - 6 - 6 - - - True - False - True - _Select... - True - 0 - - - - 2 - 3 - - - - - - - 100 - True - False - True - True - File in the worker where the logs will be saved. - * - /tmp/access.log - - - - 1 - 2 - - - - - - True - 0 - _File name: - True - path - - - GTK_FILL - - - - - + flumotion.ui.plugarea.WizardPlugArea False diff -Nru flumotion-0.6.1/data/glade/sectionwizard.glade flumotion-0.9.1/data/glade/sectionwizard.glade --- flumotion-0.6.1/data/glade/sectionwizard.glade 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/glade/sectionwizard.glade 2011-09-11 08:09:03.000000000 +0000 @@ -1,369 +1,265 @@ - - - + - - - Flumotion Configuration Assistant - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 760 - 470 - 760 - 470 - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - - - - - True - False - 0 - - - - True - False - 0 - - - - True - True - False - - - - True - False - 0 - - - - 6 - True - False - 0 - - - - True - This should be a huge title - True - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 6 - 6 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - gtk-refresh - 4 - 1 - 0 - 6 - 6 - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 6 - 12 - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - 0 - False - False - - - - - - - 0 - False - True - - - - - - True - True - False - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - False - 0 - - - - 12 - True - False - 12 - - - - True - False - 0 - - - - - - - 0 - True - True - - - - - - True - False - 0 - - - 0 - False - True - - - - - 0 - True - True - - - - - - - - - 0 - True - True - - - - - - True - True - False - - - - True - False - 0 - - - - 12 - True - GTK_BUTTONBOX_START - 0 - - - - True - True - True - gtk-help - True - GTK_RELIEF_NORMAL - True - - - - - - 0 - True - True - - - - - - 12 - True - GTK_BUTTONBOX_END - 12 - - - - True - True - gtk-go-back - True - GTK_RELIEF_NORMAL - True - - - - - - - True - True - True - True - gtk-go-forward - True - True - GTK_RELIEF_NORMAL - True - - - - - - 0 - True - True - - - - - - - 0 - False - False - GTK_PACK_END - - - - - - True - - - 0 - False - True - GTK_PACK_END - - - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 12 - 12 - 12 - - - - 80 - flumotion.admin.gtk.message.MessagesView - 0 - 0 - Wed, 08 Jun 2005 14:37:07 GMT - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - + + + + 760 + 470 + Flumotion Configuration Assistant + 760 + 470 + dialog + + + + True + + + True + vertical + + + True + + + True + vertical + + + True + 6 + + + True + 6 + 6 + This should be a huge title + True + True + + + False + False + 0 + + + + + True + 1 + 0 + 6 + 6 + gtk-refresh + + + 1 + + + + + 0 + + + + + True + 6 + 12 + 12 + + + True + 0 + + + + + False + False + 1 + + + + + + + False + 0 + + + + + True + + + True + 0 + none + + + True + vertical + + + True + 12 + 12 + + + True + vertical + + + + + + 0 + + + + + True + vertical + + + False + 1 + + + + + 0 + + + + + + + + + 1 + + + + + True + 12 + 12 + 12 + + + flumotion.admin.gtk.message.MessagesView + + + + + False + 4 + + + + + True + + + False + end + 3 + + + + + True + + + True + + + True + 12 + start + + + gtk-help + True + True + True + False + True + + + + False + False + 0 + + + + + 0 + + + + + True + 12 + 12 + end + + + gtk-go-back + True + True + False + True + + + + False + False + 0 + + + + + gtk-go-forward + True + True + True + True + False + True + True + + + + False + False + 1 + + + + + 1 + + + + + + + False + False + end + 2 + + + + + 0 + + + + + diff -Nru flumotion-0.6.1/data/glade/shout2-wizard.glade flumotion-0.9.1/data/glade/shout2-wizard.glade --- flumotion-0.6.1/data/glade/shout2-wizard.glade 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/glade/shout2-wizard.glade 1970-01-01 00:00:00.000000000 +0000 @@ -1,386 +0,0 @@ - - - - - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - False - - - - True - False - 0 - - - - True - 7 - 2 - False - 6 - 12 - - - - True - Server _Port: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - port - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - _Mount point: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - mount_point - - - 0 - 1 - 2 - 3 - fill - - - - - - - 100 - True - True - True - True - 0 - /demo.ogg - True - * - False - - - 1 - 2 - 2 - 3 - - - - - - - True - P_assword: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - password - - - 0 - 1 - 3 - 4 - fill - - - - - - - True - True - True - False - 0 - hackme - True - * - False - - - 1 - 2 - 3 - 4 - - - - - - - True - Server _Hostname: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - ip - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - True - True - True - 0 - 127.0.0.1 - True - * - False - This is the IP address of the existing Icecast server which will receive the stream. - - - 1 - 2 - 0 - 1 - - - - - - - True - _Name: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - short_name - - - 0 - 1 - 4 - 5 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 4 - 5 - - - - - - - True - _Description: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - description - - - 0 - 1 - 5 - 6 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 5 - 6 - - - - - - - True - Associated _URL: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - url - - - 0 - 1 - 6 - 7 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - This is an informative URL which will be associated with the stream. For instance, it may be a descriptive HTML page. - - - 1 - 2 - 6 - 7 - - - - - - - True - 0 - 0.5 - 0 - 1 - 0 - 0 - 0 - 0 - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 8000 1024 65535 1 10 10 - This is the network port on which the existing Icecast server is listening for the stream. - - - - - 1 - 2 - 1 - 2 - fill - fill - - - - - 0 - False - False - - - - - - - diff -Nru flumotion-0.6.1/data/image/16x16/Makefile.in flumotion-0.9.1/data/image/16x16/Makefile.in --- flumotion-0.6.1/data/image/16x16/Makefile.in 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/data/image/16x16/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -41,14 +41,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -99,6 +98,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -108,18 +108,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -167,6 +160,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -184,16 +178,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -201,7 +197,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -216,6 +211,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -248,7 +244,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/data/image/24x24/cc.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/data/image/24x24/cc.png differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/data/image/24x24/fluendo.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/data/image/24x24/fluendo.png differ diff -Nru flumotion-0.6.1/data/image/24x24/Makefile.am flumotion-0.9.1/data/image/24x24/Makefile.am --- flumotion-0.6.1/data/image/24x24/Makefile.am 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/image/24x24/Makefile.am 2011-09-11 08:09:03.000000000 +0000 @@ -1,6 +1,9 @@ imagedir = $(pkgdatadir)/image/24x24 image_DATA = \ - wizard.png + cc.png \ + fluendo.png \ + wizard.png \ + xiph.png EXTRA_DIST = $(image_DATA) diff -Nru flumotion-0.6.1/data/image/24x24/Makefile.in flumotion-0.9.1/data/image/24x24/Makefile.in --- flumotion-0.6.1/data/image/24x24/Makefile.in 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/data/image/24x24/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -41,14 +41,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -99,6 +98,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -108,18 +108,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -167,6 +160,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -184,16 +178,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -201,7 +197,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -216,6 +211,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -248,7 +244,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -270,7 +265,10 @@ top_srcdir = @top_srcdir@ imagedir = $(pkgdatadir)/image/24x24 image_DATA = \ - wizard.png + cc.png \ + fluendo.png \ + wizard.png \ + xiph.png EXTRA_DIST = $(image_DATA) all: all-am Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/data/image/24x24/xiph.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/data/image/24x24/xiph.png differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/data/image/36x36/cc.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/data/image/36x36/cc.png differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/data/image/36x36/fluendo.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/data/image/36x36/fluendo.png differ diff -Nru flumotion-0.6.1/data/image/36x36/Makefile.am flumotion-0.9.1/data/image/36x36/Makefile.am --- flumotion-0.6.1/data/image/36x36/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/data/image/36x36/Makefile.am 2011-09-11 08:09:03.000000000 +0000 @@ -0,0 +1,8 @@ +imagedir = $(pkgdatadir)/image/36x36 + +image_DATA = \ + cc.png \ + fluendo.png \ + xiph.png + +EXTRA_DIST = $(image_DATA) diff -Nru flumotion-0.6.1/data/image/36x36/Makefile.in flumotion-0.9.1/data/image/36x36/Makefile.in --- flumotion-0.6.1/data/image/36x36/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/data/image/36x36/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -0,0 +1,484 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = data/image/36x36 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(imagedir)" +DATA = $(image_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +imagedir = $(pkgdatadir)/image/36x36 +image_DATA = \ + cc.png \ + fluendo.png \ + xiph.png + +EXTRA_DIST = $(image_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/image/36x36/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu data/image/36x36/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-imageDATA: $(image_DATA) + @$(NORMAL_INSTALL) + test -z "$(imagedir)" || $(MKDIR_P) "$(DESTDIR)$(imagedir)" + @list='$(image_DATA)'; test -n "$(imagedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(imagedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(imagedir)" || exit $$?; \ + done + +uninstall-imageDATA: + @$(NORMAL_UNINSTALL) + @list='$(image_DATA)'; test -n "$(imagedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(imagedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(imagedir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(imagedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-imageDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-imageDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-imageDATA install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-imageDATA + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/data/image/36x36/xiph.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/data/image/36x36/xiph.png differ diff -Nru flumotion-0.6.1/data/image/Makefile.am flumotion-0.9.1/data/image/Makefile.am --- flumotion-0.6.1/data/image/Makefile.am 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/image/Makefile.am 2011-09-11 08:09:03.000000000 +0000 @@ -1,4 +1,4 @@ -SUBDIRS = wizard 16x16 24x24 +SUBDIRS = wizard 16x16 24x24 36x36 image_DATA = \ flumotion.png \ diff -Nru flumotion-0.6.1/data/image/Makefile.in flumotion-0.9.1/data/image/Makefile.in --- flumotion-0.6.1/data/image/Makefile.in 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/data/image/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -41,14 +41,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -139,6 +138,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -148,18 +148,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -207,6 +200,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -224,16 +218,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -241,7 +237,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -256,6 +251,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -288,7 +284,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -308,7 +303,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = wizard 16x16 24x24 +SUBDIRS = wizard 16x16 24x24 36x36 image_DATA = \ flumotion.png \ mood-happy.png \ @@ -387,7 +382,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -412,7 +407,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/data/image/wizard/Makefile.am flumotion-0.9.1/data/image/wizard/Makefile.am --- flumotion-0.6.1/data/image/wizard/Makefile.am 2009-09-09 11:37:20.000000000 +0000 +++ flumotion-0.9.1/data/image/wizard/Makefile.am 2011-09-11 08:09:03.000000000 +0000 @@ -1,20 +1,24 @@ -image_DATA = \ - consumption.png \ - firewire.png \ - flow.png \ - licenses.png \ - looper.png \ - kcmdevices.png \ - overlay.png \ - placeholder.png \ - soundcard.png \ - source.png \ - summary.png \ - testsource.png \ - tv.png \ - webcam.png \ - widget_doc.png \ - wizard.png \ +image_DATA = \ + consumption.png \ + firewire.png \ + flow.png \ + licenses.png \ + looper.png \ + kcmdevices.png \ + overlay.png \ + pattern_black.png \ + pattern_blink.png \ + pattern_smpte.png \ + pattern_snow.png \ + placeholder.png \ + soundcard.png \ + source.png \ + summary.png \ + testsource.png \ + tv.png \ + webcam.png \ + widget_doc.png \ + wizard.png \ xiphfish.png imagedir = $(pkgdatadir)/image/wizard diff -Nru flumotion-0.6.1/data/image/wizard/Makefile.in flumotion-0.9.1/data/image/wizard/Makefile.in --- flumotion-0.6.1/data/image/wizard/Makefile.in 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/data/image/wizard/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -41,14 +41,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -99,6 +98,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -108,18 +108,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -167,6 +160,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -184,16 +178,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -201,7 +197,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -216,6 +211,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -248,7 +244,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -269,22 +264,26 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ image_DATA = \ - consumption.png \ - firewire.png \ - flow.png \ - licenses.png \ - looper.png \ - kcmdevices.png \ - overlay.png \ - placeholder.png \ - soundcard.png \ - source.png \ - summary.png \ - testsource.png \ - tv.png \ - webcam.png \ - widget_doc.png \ - wizard.png \ + consumption.png \ + firewire.png \ + flow.png \ + licenses.png \ + looper.png \ + kcmdevices.png \ + overlay.png \ + pattern_black.png \ + pattern_blink.png \ + pattern_smpte.png \ + pattern_snow.png \ + placeholder.png \ + soundcard.png \ + source.png \ + summary.png \ + testsource.png \ + tv.png \ + webcam.png \ + widget_doc.png \ + wizard.png \ xiphfish.png imagedir = $(pkgdatadir)/image/wizard Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/data/image/wizard/pattern_black.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/data/image/wizard/pattern_black.png differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/data/image/wizard/pattern_blink.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/data/image/wizard/pattern_blink.png differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/data/image/wizard/pattern_smpte.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/data/image/wizard/pattern_smpte.png differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/data/image/wizard/pattern_snow.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/data/image/wizard/pattern_snow.png differ diff -Nru flumotion-0.6.1/data/Makefile.in flumotion-0.9.1/data/Makefile.in --- flumotion-0.6.1/data/Makefile.in 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/data/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -42,14 +42,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -144,6 +143,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -153,18 +153,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -212,6 +205,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -229,16 +223,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -246,7 +242,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -261,6 +256,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -293,7 +289,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -506,7 +501,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -531,7 +526,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/debian/changelog flumotion-0.9.1/debian/changelog --- flumotion-0.6.1/debian/changelog 2011-09-11 08:37:11.000000000 +0000 +++ flumotion-0.9.1/debian/changelog 2011-09-11 08:13:49.000000000 +0000 @@ -1,85 +1,142 @@ -flumotion (0.6.1-1.1) unstable; urgency=low +flumotion (0.9.1-1flu1~natty1) natty; urgency=low - * Non-maintainer upload. - * debian/patches - - (Number 20): New. Fix configure file to detect correctly twisted > - 9.x. This fixes a FTBFS with twisted 10.x. Patch thanks to Ubuntu - Fabrice (FTBFS; Closes: #573691). - - -- Jari Aalto Tue, 19 Oct 2010 13:07:31 +0300 - -flumotion (0.6.1-1) unstable; urgency=low - - [ Marc-André Lureau ] - * New upstream release "El Agüelo" - - Updated patch 10_preserve-umask. - - Removed 61_revno6676.patch. - - Removed 60_fix-epydoc-30.patch. - - Fix bashism in make-dummy-cert; closes: #530971. - closes: #473781. - * debian/control: - - Added python-kiwi build-dep. - - Updated XS-Python-Version to 2.4 - - Added Vcs-* fields. - - Updated gtk version dependencies. - * debian/flumotion.postinst: - - Added configuration upgrade from to 0.5.3 and 0.6.0 - * debian/NEWS: - - Mention the configuration upgrade again. - - [ Loic Minier ] - * Depend on python-openssl instead of python-pyopenssl; closes: #494900. - * Don't upgrade configuration on first installation. - * Bump up Standards-Version to 3.8.0. - * Don't hardcode path to make-ssl-cert in postinst. - * Merge 0.4.2-3.1 NMU. - * Create /var/run/flumotion in init script as /var/run might be a tmpfs; - closes: #487100. - * Merge 0.4.2-3.1ubuntu1 upload from Ubuntu. - - /var/run changes implemented differently in Debian. - - [ Loïc Minier ] - * Add missing libxml-parser-perl build-dep for intltool. - * Suggest hal. - * Add /var/lib/flumotion/rrd dir and let /var/lib/flumotion be owned by - flumotion. - * Build-dep on python-twisted-conf for SSH console. - * Build-dep on python-dateutil per .spec file for misc components e.g. - eventscalendar, icalbouncer etc. - * Don't install /var/run/flumotion - * Bump up Standards-Version to 3.8.3. - * Add Marc-André Lureau to uploaders; thanks! - - -- Marc-André Lureau Tue, 22 Dec 2009 14:10:55 +0100 - -flumotion (0.4.2-3.1ubuntu1) intrepid; urgency=low - - * debian/patches/61_revno6676.patch: - - Do not raise an exception when signalling a pid for liveness run - by another user, patch from upstream trac (LP: #209290). - * debian/flumotion.init: - - Create /var/run/flumotion if it does not exist (LP: #241118). - * debian/control: - - Update Maintainer field as per spec. + * New upstream release! + + -- Xavier Queralt Thu, 8 Sep 2011 17:30:21 +0200 + +flumotion (0.8.0-1flu1~lucid1) lucid; urgency=low + + * New upstream release! + + -- Xavier Queralt Fri, 10 Sep 2010 13:30:21 +0200 + +flumotion (0.7.0.3-1flu1~lucid1) lucid; urgency=low + + * New pre-release + + -- Xavier Queralt Tue, 31 Aug 2010 17:30:21 +0200 + +flumotion (0.7.0.2-1flu1~lucid1) lucid; urgency=low + + * Lucid pre-release + + -- Xavier Queralt Fri, 27 Aug 2010 12:30:21 +0200 + +flumotion (0.7.0.1-1flu1~jaunty1) jaunty; urgency=low + + * New version + + -- Arek Korbik Tue, 15 Sep 2009 12:52:46 +0200 + +flumotion (0.5.4.2-1flu1~jaunty1) jaunty; urgency=low + + * Update to 0.5.4.2 pre-release + + -- Arek Korbik Wed, 12 Aug 2009 18:08:08 +0200 + +flumotion (0.5.4.1-1flu1~jaunty1) jaunty; urgency=low + + * Jaunty release + * Change maintainer to myself + + -- Arek Korbik Wed, 12 Aug 2009 12:18:49 +0200 + +flumotion (0.5.2-1flu1~hardy4) hardy; urgency=low + + * Update to SVN 2008-05-07-2 + + -- Johan Dahlin Wed, 07 May 2008 15:31:00 -0300 + +flumotion (0.5.2-1flu1~hardy3) hardy; urgency=low + + * Update to SVN 2008-05-07 + * Fixes missing glade files. + + -- Johan Dahlin Wed, 07 May 2008 12:05:00 -0300 + +flumotion (0.5.2-1flu1~hardy2) hardy; urgency=low + + * Update to SVN 2008-05-06 + * Add the flumotion user to audio & video group. + + -- Johan Dahlin Tue, 06 May 2008 15:29:44 -0300 + +flumotion (0.5.2-1flu1~hardy1) hardy; urgency=low + + * New version + * Depend on python-kiwi, create /var/run/flumotion when starting the + script if it doesn't exist + + -- Johan Dahlin Thu, 17 Apr 2008 09:41:49 -0300 + +flumotion (0.5.1.1-1flu1~hardy3) hardy; urgency=low + + * Depend on cortado and gstreamer0.10-schroedinger + * Build-depend on python-rrd + + -- Johan Dahlin Thu, 17 Apr 2008 09:41:49 -0300 + +flumotion (0.5.1.1-1flu1~hardy2) hardy; urgency=low + + * New orig tarball + + -- Johan Dahlin Wed, 16 Apr 2008 18:57:37 -0300 + +flumotion (0.5.1.1-1flu1~hardy1) hardy; urgency=low + + * Change versioning scheme again + + -- Johan Dahlin Wed, 16 Apr 2008 18:46:48 -0300 + +flumotion (0.5.1.1-0flu1~hardy1) hardy; urgency=low + + * Hardy release + + -- Johan Dahlin Wed, 16 Apr 2008 18:40:02 -0300 + +flumotion (0.5.1.1-0flu7) hardy; urgency=low + + * Hardy release + + -- Johan Dahlin Wed, 16 Apr 2008 18:24:36 -0300 + +flumotion (0.5.1.1-0flu6) gutsy; urgency=low + + * Depends on python-rrdtool and build-depends on python-epydoc, + * Change maintainer to myself + + -- Johan Dahlin Wed, 16 Apr 2008 14:48:39 -0300 + +flumotion (0.5.1.1-0flu5) gutsy; urgency=low + + * Add a dependency of kiwi 1.9.14 and pygobject 2.12.0 + + -- Johan Dahlin Wed, 16 Apr 2008 13:26:47 -0300 + +flumotion (0.5.1.1-0flu4) gutsy; urgency=low + + * build-depends on intltool + + -- Johan Dahlin Wed, 16 Apr 2008 13:10:26 -0300 + +flumotion (0.5.1.1-0flu3) gutsy; urgency=low + + * Build for gutsy, copy files instead of symlink in autogen - -- Luca Falavigna Thu, 19 Jun 2008 15:01:53 +0000 + -- Johan Dahlin Wed, 16 Apr 2008 12:38:43 -0300 -flumotion (0.4.2-3.1) unstable; urgency=low +flumotion (0.5.1.1-0flu2) hardy; urgency=low - * Non-maintainer upload. - * Removed S from Default-Stop in LSB header in init.d script; - closes: #471093. - * Added extra files to clean to fix FTBFS if built twice in a row; - closes: #442566. + * New attempt, run maintainer-clean before and remove leftover patches in + the tree before uploading source. - -- Peter Eisentraut Sat, 05 Apr 2008 15:46:11 +0200 + -- Johan Dahlin Wed, 16 Apr 2008 11:52:26 -0300 -flumotion (0.4.2-3) unstable; urgency=medium +flumotion (0.5.1.1-0flu1) hardy; urgency=low - * New patch, 60_fix-epydoc-30, don't pass --ignore-param-mismatch to - epydoc as it breaks with the 3.0 series; from upstream r5699. + * New test release - -- Loic Minier Fri, 25 Jan 2008 17:18:28 +0100 + -- Johan Dahlin Wed, 16 Apr 2008 10:39:20 -0300 flumotion (0.4.2-2) unstable; urgency=low diff -Nru flumotion-0.6.1/debian/control flumotion-0.9.1/debian/control --- flumotion-0.6.1/debian/control 2011-09-11 08:37:11.000000000 +0000 +++ flumotion-0.9.1/debian/control 2011-09-11 08:13:49.000000000 +0000 @@ -1,52 +1,46 @@ Source: flumotion Section: net Priority: optional -Maintainer: Loic Minier -Uploaders: Marc-André Lureau +Maintainer: Xavier Queralt Build-Depends: cdbs, debhelper (>= 5.0.37.2), pkg-config, - python-dateutil, - python-twisted (>= 2.0.1), - python-twisted-conch, - python-twisted-names, - python-twisted-web, - python-gtk2-dev (>= 2.8.4), - python-glade2, - libgstreamer0.10-dev (>= 0.10.10), - libgstreamer-plugins-base0.10-dev (>= 0.10.10), - python-gst0.10 (>= 0.10.4), - python-kiwi (>= 1.9.13), + intltool (>= 0.34.2), + python-twisted (>= 2.5.0), + python-epydoc, + libgstreamer-plugins-base0.10-dev (>= 0.10.1), + python-gst0.10 (>= 0.10.1), python, + python-dev, python-central (>= 0.5), - autotools-dev, - libxml-parser-perl -Standards-Version: 3.8.3 -Vcs-Svn: svn://svn.debian.org/pkg-gstreamer/unstable/flumotion -Vcs-Browser: http://svn.debian.org/wsvn/pkg-gstreamer/unstable/flumotion -XS-Python-Version: >= 2.4 + autotools-dev +Standards-Version: 3.7.3 +XS-Python-Version: >= 2.5 Package: flumotion Architecture: any Depends: ${python:Depends}, ${misc:Depends}, ${shlibs:Depends}, - ssl-cert (>= 1.0-11), - python-twisted-core (>= 2.0.1), - python-gtk2 (>= 2.8.4), - python-glade2, - python-gst0.10 (>= 0.10.4), - python-kiwi (>= 1.9.13), - python-openssl, - python-imaging, - python-twisted-web, + adduser, gstreamer0.10-plugins-base, gstreamer0.10-plugins-good, - adduser, + gstreamer0.10-schroedinger, + gstreamer0.10-ffmpeg, + python-dateutil, + python-glade2, python-gobject, + python-gst0.10 (>= 0.10.0.1), + python-gtk2 (>= 2.4.0), + python-kiwi (>= 1.9.14), + python-cairo (>= 1.2.0), + python-openssl, + python-rrd, + python-twisted-core (>= 2.5.0), + python-twisted-web, + ssl-cert (>= 1.0-11), xsltproc Recommends: python-gnome2 -Suggests: hal XB-Python-Version: ${python:Versions} Description: Fluendo Streaming Server - manager, worker and admin Flumotion is a modern streaming media server built with a modular @@ -58,7 +52,3 @@ features intuitive graphical administration tools, making the task of setting up and manipulating audio and video streams easy for even novice system administrators. - . - Flumotion ships with a HAL policy granting the flumotion user access to - devices you might want to use for streaming; install the hal package to - use this feature. diff -Nru flumotion-0.6.1/debian/copyright flumotion-0.9.1/debian/copyright --- flumotion-0.6.1/debian/copyright 2011-09-11 08:37:11.000000000 +0000 +++ flumotion-0.9.1/debian/copyright 2011-09-11 08:13:49.000000000 +0000 @@ -13,23 +13,19 @@ License: - (Flumotion is dual-licensed by its copyright holder but only the GPL license - is relevant for Debian.) - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + it under the terms of the GNU Lesser General Public License version 2.1 + as published by the Free Software Foundation. This package 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 General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. +Public License can be found in `/usr/share/common-licenses/LGPL'. diff -Nru flumotion-0.6.1/debian/dirs flumotion-0.9.1/debian/dirs --- flumotion-0.6.1/debian/dirs 2011-09-11 08:37:11.000000000 +0000 +++ flumotion-0.9.1/debian/dirs 2011-09-11 08:13:49.000000000 +0000 @@ -1,5 +1,5 @@ /etc/flumotion/managers /etc/flumotion/workers /var/cache/flumotion -/var/lib/flumotion/rrd /var/log/flumotion +/var/run/flumotion diff -Nru flumotion-0.6.1/debian/flumotion.init flumotion-0.9.1/debian/flumotion.init --- flumotion-0.6.1/debian/flumotion.init 2011-09-11 08:37:11.000000000 +0000 +++ flumotion-0.9.1/debian/flumotion.init 2011-09-11 08:13:49.000000000 +0000 @@ -4,7 +4,7 @@ # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 +# Default-Stop: S 0 1 6 # Short-Description: Flumotion Streaming Server # Description: Flumotion is a streaming server for audio and video. # See http://www.fluendo.com for details. @@ -36,6 +36,14 @@ # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions +check_var_run_dir() { + if [ ! -d /var/run/flumotion ]; then + mkdir /var/run/flumotion + chmod 0755 /var/run/flumotion + chown flumotion:flumotion /var/run/flumotion + fi +} + user_do() { # set an umask for log files # unset HOME as otherwise flumotion uses $HOME/.flumotion as its cache @@ -57,6 +65,7 @@ return "$?" fi + check_var_run_dir list="`user_do "$DAEMON status" | cut -f1,2 -d' ' | tr ' ' @`" RETVAL="0" for line in $list; do @@ -116,12 +125,6 @@ user_do "$DAEMON list" } -# Create flumotion's home dir on startup as it might be a tmpfs -if [ ! -d /var/run/flumotion ]; then - mkdir /var/run/flumotion - chown flumotion:flumotion /var/run/flumotion -fi - case "$1" in start) shift diff -Nru flumotion-0.6.1/debian/flumotion.postinst flumotion-0.9.1/debian/flumotion.postinst --- flumotion-0.6.1/debian/flumotion.postinst 2011-09-11 08:37:11.000000000 +0000 +++ flumotion-0.9.1/debian/flumotion.postinst 2011-09-11 08:13:49.000000000 +0000 @@ -13,7 +13,7 @@ if [ "$1" = configure ] && [ "$2" = "" ]; then # Make self-signed certificate if [ ! -f /etc/flumotion/default.pem ]; then - make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/flumotion/default.pem + /usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/flumotion/default.pem fi fi @@ -23,21 +23,22 @@ --shell /usr/sbin/nologin --no-create-home --group \ --disabled-password --disabled-login \ --gecos "Flumotion Streaming Server" flumotion + adduser flumotion audio + adduser flumotion video fi chown flumotion:flumotion /var/cache/flumotion - chown -R flumotion:flumotion /var/lib/flumotion + chown flumotion:flumotion /var/run/flumotion chown flumotion:adm /var/log/flumotion if [ -d /etc/flumotion ]; then chown -R flumotion:flumotion /etc/flumotion fi fi -# Upgrade transformations have to be applied one by one... -if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl "0.4.2"; then +if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt "0.4.2"; then log_i "Saving backup of default manager configuration..." cp -av /etc/flumotion/managers/default/planet.xml \ /etc/flumotion/managers/default/planet.pre-0.4.1-backup.xml - log_i "Upgrading configuration to 0.4.1..." + log_i "Upgrading configuration..." tmpdir=$(mktemp -d -t flumotion.postinst.XXXXXXXXXX) cp -av /etc/flumotion/managers/default/planet.xml \ "$tmpdir/planet.post-0.4.1.xml" @@ -49,38 +50,6 @@ rm -rfv "$tmpdir" fi -if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl "0.5.3"; then - log_i "Saving backup of default manager configuration..." - cp -av /etc/flumotion/managers/default/planet.xml \ - /etc/flumotion/managers/default/planet.pre-0.5.3-backup.xml - log_i "Upgrading configuration to 0.5.3..." - tmpdir=$(mktemp -d -t flumotion.postinst.XXXXXXXXXX) - cp -av /etc/flumotion/managers/default/planet.xml \ - "$tmpdir/planet.post-0.5.3.xml" - xsltproc /usr/share/flumotion/upgrade-to-0.5.3.xsl \ - /etc/flumotion/managers/default/planet.xml \ - >"$tmpdir/planet.post-0.5.3.xml" - mv -fv "$tmpdir/planet.post-0.5.3.xml" \ - /etc/flumotion/managers/default/planet.xml - rm -rfv "$tmpdir" -fi - -if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl "0.6.0"; then - log_i "Saving backup of default manager configuration..." - cp -av /etc/flumotion/managers/default/planet.xml \ - /etc/flumotion/managers/default/planet.pre-0.6.0-backup.xml - log_i "Upgrading configuration to 0.6.0..." - tmpdir=$(mktemp -d -t flumotion.postinst.XXXXXXXXXX) - cp -av /etc/flumotion/managers/default/planet.xml \ - "$tmpdir/planet.post-0.6.0.xml" - xsltproc /usr/share/flumotion/upgrade-to-0.6.0.xsl \ - /etc/flumotion/managers/default/planet.xml \ - >"$tmpdir/planet.post-0.6.0.xml" - mv -fv "$tmpdir/planet.post-0.6.0.xml" \ - /etc/flumotion/managers/default/planet.xml - rm -rfv "$tmpdir" -fi - #DEBHELPER# # restart flumotion after the byte-compilation diff -Nru flumotion-0.6.1/debian/NEWS flumotion-0.9.1/debian/NEWS --- flumotion-0.6.1/debian/NEWS 2011-09-11 08:37:11.000000000 +0000 +++ flumotion-0.9.1/debian/NEWS 2011-09-11 08:13:49.000000000 +0000 @@ -1,24 +1,6 @@ flumotion (0.4.2-1) unstable; urgency=low * The format of the configuration for managers ("") changed in - versions 0.5.3 and 0.6.0. The configuration for the default manager will - be automatically upgraded *after* the normal dpkg upgrade process and a - backup of the previous version will be saved as: - /etc/flumotion/managers/default/planet.pre-0.5.3-backup.xml - and /etc/flumotion/managers/default/planet.pre-0.6.0-backup.xml - - If you need to upgrade more configuration files, you should do so manually - with the help of the provided XSLT stylesheet; you should run a command - such as the following one as root: - # su -s /bin/sh flumotion -c \ - "xsltproc /usr/share/flumotion/upgrade-to-x.x.x.xsl \ - /etc/flumotion/managers/default/planet.xml" - - -- Marc-André Lureau Wed, 09 Sep 2009 16:39:00 +0200 - -flumotion (0.4.2-1) unstable; urgency=low - - * The format of the configuration for managers ("") changed in versions 0.3.2 and 0.4.1. The configuration for the default manager will be automatically upgraded *after* the normal dpkg upgrade process and a backup of the previous version will be saved as: diff -Nru flumotion-0.6.1/debian/patches/10_preserve-umask.patch flumotion-0.9.1/debian/patches/10_preserve-umask.patch --- flumotion-0.6.1/debian/patches/10_preserve-umask.patch 2011-09-11 08:37:11.000000000 +0000 +++ flumotion-0.9.1/debian/patches/10_preserve-umask.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -diff --git a/flumotion/common/process.py b/flumotion/common/process.py -index 487e74d..b304e15 100644 ---- a/flumotion/common/process.py -+++ b/flumotion/common/process.py -@@ -111,7 +111,8 @@ def daemonize(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null', - from flumotion.common import errors - raise errors.FatalError, "Failed to change directory to %s: %s" % ( - directory, e.strerror) -- os.umask(0) -+ # DISABLED by debian/patches/10_preserve-umask.patch -+ # os.umask(0) - os.setsid() - - # do second fork diff -Nru flumotion-0.6.1/debian/patches/20_configure_twisted.patch flumotion-0.9.1/debian/patches/20_configure_twisted.patch --- flumotion-0.6.1/debian/patches/20_configure_twisted.patch 2011-09-11 08:37:11.000000000 +0000 +++ flumotion-0.9.1/debian/patches/20_configure_twisted.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -Description: Fix configure script to accept twisted version greater than 9. - Patch inspired by what has been done by upstream in 0.6.2 -Author: Fabrice Coutadeur - -diff -Nur -x '*.orig' -x '*~' flumotion-0.6.1//configure flumotion-0.6.1.new//configure ---- flumotion-0.6.1//configure 2009-09-09 11:37:51.000000000 +0000 -+++ flumotion-0.6.1.new//configure 2010-08-21 07:38:08.815443393 +0000 -@@ -13322,9 +13322,10 @@ - $as_echo_n "checking for Twisted >= 2.0.1... " >&6; } - prog=" - import sys --import twisted.copyright --minver = '2.0.1' --if twisted.copyright.version < minver: -+from twisted import version as v -+minver = (2, 0, 1) -+curver = (v.major, v.minor, v.micro) -+if curver < minver: - sys.exit(1) - sys.exit(0) - " diff -Nru flumotion-0.6.1/debian/planet.xml flumotion-0.9.1/debian/planet.xml --- flumotion-0.6.1/debian/planet.xml 2011-09-11 08:37:11.000000000 +0000 +++ flumotion-0.9.1/debian/planet.xml 2011-09-11 08:13:49.000000000 +0000 @@ -1,7 +1,7 @@ - + 127.0.0.1 %s: callRemote(%s, ', startArgs, ')', (), args, kwargs) logKwArgs = self.doLog(level, stackDepth - 1, - format, *debugArgs) + formatString, *debugArgs) if not self.remote: self.warning('Tried to callRemote(%s), but we are disconnected' @@ -126,17 +122,17 @@ return defer.fail(errors.NotConnectedError()) def callback(result): - format, debugArgs = log.getFormatArgs( + formatString, debugArgs = log.getFormatArgs( '%s <-- %s: callRemote(%s, ', startArgs, '): %s', (log.ellipsize(result), ), args, kwargs) - self.doLog(level, -1, format, *debugArgs, **logKwArgs) + self.doLog(level, -1, formatString, *debugArgs, **logKwArgs) return result def errback(failure): - format, debugArgs = log.getFormatArgs( + formatString, debugArgs = log.getFormatArgs( '%s <-- %s: callRemote(%s, ', startArgs, '): %r', (failure, ), args, kwargs) - self.doLog(level, -1, format, *debugArgs, **logKwArgs) + self.doLog(level, -1, formatString, *debugArgs, **logKwArgs) return failure d = self.remote.callRemote(name, *args, **kwargs) @@ -239,6 +235,7 @@ _pingCheckInterval = (configure.heartbeatInterval * configure.pingTimeoutMultiplier) _pingDC = None + _clock = reactor def startPinging(self, disconnect): """ @@ -246,7 +243,7 @@ @type disconnect: callable """ self.debug('startPinging') - self._lastPingback = time.time() + self._lastPingback = self._clock.seconds() if self._pingDC: self.debug("Cannot start pinging, already pinging") return @@ -257,7 +254,7 @@ def _ping(self): def pingback(result): - self._lastPingback = time.time() + self._lastPingback = self._clock.seconds() self.log('pinged, pingback at %r' % self._lastPingback) def pingFailed(failure): @@ -273,19 +270,35 @@ else: self.info('tried to ping, but disconnected yo') - self._pingDC = reactor.callLater(self._pingInterval, - self._ping) + self._pingDC = self._clock.callLater(self._pingInterval, + self._ping) + + def remoteMessageReceived(self, broker, message, args, kw): + self._lastPingback = self._clock.seconds() + return BaseMedium.remoteMessageReceived( + self, broker, message, args, kw) + + def callRemoteLogging(self, level, stackDepth, name, *args, **kwargs): + d = BaseMedium.callRemoteLogging( + self, level, stackDepth, name, *args, **kwargs) + + def cb(result): + self._lastPingback = self._clock.seconds() + return result + d.addCallback(cb) + return d def _pingCheck(self): self._pingCheckDC = None if (self.remote and - (time.time() - self._lastPingback > self._pingCheckInterval)): + ((self._clock.seconds() - self._lastPingback) > + self._pingCheckInterval)): self.info('no pingback in %f seconds, closing connection', self._pingCheckInterval) self._pingDisconnect() else: - self._pingCheckDC = reactor.callLater(self._pingCheckInterval, - self._pingCheck) + self._pingCheckDC = self._clock.callLater(self._pingCheckInterval, + self._pingCheck) def stopPinging(self): if self._pingCheckDC: @@ -300,7 +313,9 @@ if self.remote: self.remote.broker.transport.loseConnection() - def setRemoteReference(self, remote): + def setRemoteReference(self, remote, clock=reactor): + self._clock = clock + BaseMedium.setRemoteReference(self, remote) def stopPingingCb(x): diff -Nru flumotion-0.6.1/flumotion/common/messages.py flumotion-0.9.1/flumotion/common/messages.py --- flumotion-0.6.1/flumotion/common/messages.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/messages.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_messages -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """serializable translatable messages. @@ -32,7 +28,7 @@ from flumotion.common.i18n import FancyEqMixin, Translatable from flumotion.common.i18n import * -__version__ = "$Rev: 7991 $" +__version__ = "$Rev$" (ERROR, WARNING, @@ -69,14 +65,12 @@ compareAttributes = ["level", "translatables", "debug", "mid", "priority", "timestamp"] - # F0.8: remove id= in favor of mid= - - def __init__(self, level, translatable, debug=None, id=None, priority=50, - timestamp=None, mid=None): + def __init__(self, level, translatable, debug=None, mid=None, priority=50, + timestamp=None): """ Create a new message. - The id identifies this kind of message, and serves two purposes. + The mid identifies this kind of message, and serves two purposes. The first purpose is to serve as a key by which a kind of message might be removed from a set of messages. For example, a @@ -108,11 +102,6 @@ self.level = level self.translatables = [] self.debug = debug - if id: - import warnings - warnings.warn('Please use the mid kwarg instead', - DeprecationWarning, stacklevel=3) - mid = id # FIXME: untranslated is a really poor choice of id self.id = mid or translatable.untranslated() @@ -218,63 +207,3 @@ self.failed = True self.value = None pb.setUnjellyableForClass(Result, Result) - - -# F0.8: remove; only here to be able to receive platform-3 translatables -# in trunk code, because they need to be in exactly the same module -# this is a straight copy from flumotion.common.i18n for these two classes - - -class TranslatableSingular(Translatable, FancyEqMixin): - """ - I represent a translatable gettext msg in the singular form. - """ - - compareAttributes = ["domain", "format", "args"] - - def __init__(self, domain, format, *args): - """ - @param domain: the text domain for translations of this message - @param format: a format string - @param args: any arguments to the format string - """ - self.domain = domain - self.format = format - self.args = args - - def untranslated(self): - if self.args: - result = self.format % self.args - else: - result = self.format - return result -pb.setUnjellyableForClass(TranslatableSingular, TranslatableSingular) - - -class TranslatablePlural(Translatable, FancyEqMixin): - """ - I represent a translatable gettext msg in the plural form. - """ - - compareAttributes = ["domain", "singular", "plural", "count", "args"] - - def __init__(self, domain, format, *args): - """ - @param domain: the text domain for translations of this message - @param format: a (singular, plural, count) tuple - @param args: any arguments to the format string - """ - singular, plural, count = format - self.domain = domain - self.singular = singular - self.plural = plural - self.count = count - self.args = args - - def untranslated(self): - if self.args: - result = self.singular % self.args - else: - result = self.singular - return result -pb.setUnjellyableForClass(TranslatablePlural, TranslatablePlural) diff -Nru flumotion-0.6.1/flumotion/common/mimetypes.py flumotion-0.9.1/flumotion/common/mimetypes.py --- flumotion-0.6.1/flumotion/common/mimetypes.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/mimetypes.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,27 +1,23 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """convert mimetypes or launch an application based on one""" -__version__ = "$Rev: 8012 $" +__version__ = "$Rev$" _ASSOCSTR_COMMAND = 1 _ASSOCSTR_EXECUTABLE = 2 _EXTENSIONS = { @@ -36,6 +32,7 @@ 'video/x-matroska': 'mkv', 'video/x-ms-asf': 'asf', 'video/x-msvideo': 'avi', + 'video/webm': 'webm', } diff -Nru flumotion-0.6.1/flumotion/common/netutils.py flumotion-0.9.1/flumotion/common/netutils.py --- flumotion-0.6.1/flumotion/common/netutils.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/netutils.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_messages -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """miscellaneous network functions. @@ -33,7 +29,7 @@ from flumotion.common import avltree -__version__ = "$Rev: 7416 $" +__version__ = "$Rev$" # Thanks to Paul Cannon, see @@ -61,13 +57,13 @@ ptr_size = len(struct.pack('P', 0)) size = 24 + 2 * (ptr_size) max_possible = 128 # arbitrary. raise if needed. - bytes = max_possible * size + inbytes = max_possible * size s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - names = array.array('B', '\0' * bytes) + names = array.array('B', '\0' * inbytes) outbytes = struct.unpack('iP', fcntl.ioctl( s.fileno(), SIOCGIFCONF, - struct.pack('iP', bytes, names.buffer_info()[0])))[0] + struct.pack('iP', inbytes, names.buffer_info()[0])))[0] namestr = names.tostring() return [namestr[i:i+size].split('\0', 1)[0] for i in range(0, outbytes, size)] diff -Nru flumotion-0.6.1/flumotion/common/options.py flumotion-0.9.1/flumotion/common/options.py --- flumotion-0.6.1/flumotion/common/options.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/options.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_options -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """command-line parsing and options @@ -29,7 +25,7 @@ # changes to work properly from flumotion.common import boot -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" boot.USE_GOPTION_PARSER = False diff -Nru flumotion-0.6.1/flumotion/common/package.py flumotion-0.9.1/flumotion/common/package.py --- flumotion-0.6.1/flumotion/common/package.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/package.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_package -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """objects and functions used in dealing with packages @@ -32,7 +28,7 @@ from flumotion.common import log, common from flumotion.configure import configure -__version__ = "$Rev: 7927 $" +__version__ = "$Rev$" class _PatchedModuleImporter(ihooks.ModuleImporter): diff -Nru flumotion-0.6.1/flumotion/common/planet.py flumotion-0.9.1/flumotion/common/planet.py --- flumotion-0.6.1/flumotion/common/planet.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/planet.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """serializable objects from worker through manager to admin. @@ -30,7 +26,7 @@ from flumotion.twisted import flavors from flumotion.common import enum, log -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class ManagerPlanetState(flavors.StateCacheable): @@ -248,6 +244,7 @@ self.addKey('moodPending') self.addKey('workerRequested') self.addKey('config') # dictionary + self.addKey('lastKnownPid') # proxied from job state or combined with our state (mood) for k in _jobStateKeys: @@ -329,6 +326,8 @@ for m in self._jobState.get('messages'): self.remove('messages', m) + self.set('lastKnownPid', self._jobState.get('pid')) + self._jobState.removeListener(self) self._jobState = None @@ -343,7 +342,8 @@ self.setMood(moods.sleeping.value) elif self.get('mood') != moods.sad.value: log.debug('componentstate', "Shutdown was NOT requested," - " %s now lost", self.get('name')) + " %s now lost, last know pid is: %r", + self.get('name'), self.get('lastKnownPid')) self.setMood(moods.lost.value) diff -Nru flumotion-0.6.1/flumotion/common/poller.py flumotion-0.9.1/flumotion/common/poller.py --- flumotion-0.6.1/flumotion/common/poller.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/poller.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """cancellable, periodic call to a procedure @@ -27,7 +23,7 @@ from flumotion.common import log -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class Poller(object, log.Loggable): diff -Nru flumotion-0.6.1/flumotion/common/process.py flumotion-0.9.1/flumotion/common/process.py --- flumotion-0.6.1/flumotion/common/process.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/process.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_process -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """utilities for interacting with processes""" @@ -236,16 +232,25 @@ return open(path, 'w') -def deletePidFile(type, name=None): +def deletePidFile(type, name=None, force=False): """ Delete the pid file in the run directory, using the given process type and process name for the filename. + @param force: if errors due to the file not existing should be ignored + @type force: bool + @rtype: str @returns: full path to the pid file that was written """ path = _getPidPath(type, name) - os.unlink(path) + try: + os.unlink(path) + except OSError, e: + if e.errno == errno.ENOENT and force: + pass + else: + raise return path diff -Nru flumotion-0.6.1/flumotion/common/pygobject.py flumotion-0.9.1/flumotion/common/pygobject.py --- flumotion-0.6.1/flumotion/common/pygobject.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/pygobject.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_pygobject -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """pygobject helper functions @@ -29,7 +25,7 @@ import gobject -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" def gobject_set_property(object, property, value): diff -Nru flumotion-0.6.1/flumotion/common/python.py flumotion-0.9.1/flumotion/common/python.py --- flumotion-0.6.1/flumotion/common/python.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/python.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -25,23 +21,11 @@ import sys -__version__ = "$Rev: 7991 $" +__version__ = "$Rev$" # we're possibly redefining some builtins, so don't warn __pychecker__ = 'no-shadowbuiltin' -# sorted() was introduced in 2.4 -if sys.version_info[:2] < (2, 4): - - def sorted(seq, reverse=False): - seq = seq[:] - seq.sort() - if reversed: - seq = seq[::-1] - return seq -else: - sorted = sorted - # any() was introduced in 2.5 if sys.version_info[:2] < (2, 5): @@ -104,3 +88,14 @@ set = set except NameError: from sets import Set as set + +# itertools.chain.from_iterable appeared in python 2.6 +if sys.version_info[:2] < (2, 6): + + def from_iterable(iterables): + for it in iterables: + for element in it: + yield element +else: + from itertools import chain + from_iterable = chain.from_iterable diff -Nru flumotion-0.6.1/flumotion/common/reflectcall.py flumotion-0.9.1/flumotion/common/reflectcall.py --- flumotion-0.6.1/flumotion/common/reflectcall.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/reflectcall.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """getting coherent errors when calling procedures in named modules @@ -26,7 +22,7 @@ from flumotion.common import errors, log -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" def reflectCall(moduleName, methodName, *args, **kwargs): diff -Nru flumotion-0.6.1/flumotion/common/registry.py flumotion-0.9.1/flumotion/common/registry.py --- flumotion-0.6.1/flumotion/common/registry.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/registry.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_registry -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """parsing of registry, which holds component and bundle information @@ -30,6 +26,7 @@ from xml.sax import saxutils from twisted.spread import pb +from twisted.python import runtime from flumotion.common import common, log, errors, fxml, python from flumotion.common.python import makedirs @@ -37,11 +34,13 @@ from flumotion.configure import configure __all__ = ['ComponentRegistry', 'registry'] -__version__ = "$Rev: 7991 $" +__version__ = "$Rev$" # Re-enable when reading the registry cache is lighter-weight, or we # decide that it's a good idea, or something. See #799. READ_CACHE = False +# Rank used when no rank is defined in the wizard entry +FLU_RANK_NONE = 0 _VALID_WIZARD_COMPONENT_TYPES = [ 'audio-producer', @@ -49,10 +48,12 @@ 'muxer', 'audio-encoder', 'video-encoder', + 'consumer', ] _VALID_WIZARD_PLUG_TYPES = [ 'http-consumer', + 'httpserver-plug', ] @@ -495,7 +496,7 @@ "This class represents a entry in the registry" def __init__(self, componentType, type, description, feeder, - eater, accepts, provides): + eater, accepts, provides, rank=FLU_RANK_NONE): self.componentType = componentType self.type = type self.description = description @@ -503,6 +504,7 @@ self.eater = eater self.accepts = accepts self.provides = provides + self.rank = rank def __repr__(self): return '' % (self.componentType, @@ -598,7 +600,7 @@ # # - # F0.8: remove description, require _description + # F0.10: remove description, require _description componentType, baseDir, description, _description = \ self.parseAttributes(node, required=('type', 'base'), @@ -700,7 +702,7 @@ # # returns: RegistryEntryProperty - # F0.8: remove description, require _description + # F0.10: remove description, require _description attrs = self.parseAttributes(node, required=('name', 'type'), optional=('required', 'multiple', 'description', '_description')) name, propertyType, required, multiple, description, _d = attrs @@ -711,6 +713,7 @@ DeprecationWarning) if _d: description = _d + # see flumotion.common.config.parsePropertyValue allowed = ('string', 'rawstring', 'int', 'long', 'bool', 'float', 'fraction') @@ -730,7 +733,7 @@ # # returns: RegistryEntryCompoundProperty - # F0.8: remove description, require _description + # F0.10: remove description, require _description attrs = self.parseAttributes(node, required=('name', ), optional=('required', 'multiple', 'description', '_description')) name, required, multiple, description, _description = attrs @@ -741,6 +744,7 @@ DeprecationWarning) if _description: description = _description + # see flumotion.common.config.parsePropertyValue required = common.strToBool(required) multiple = common.strToBool(multiple) @@ -905,7 +909,7 @@ # # - # F0.8: make _description be required + # F0.10: make _description be required plugType, socket, description = \ self.parseAttributes(node, required=('type', 'socket'), optional=('_description', )) @@ -975,7 +979,7 @@ if node.nodeName != 'registry': # ignore silently, since this function is used to parse all # .xml files encountered - self.debug('%s does not have registry as root tag' % self.filename) + self.debug('%s does not have registry as root tag', self.filename) return # shouldn't have elements in registry fragments @@ -1166,8 +1170,8 @@ # tool so we can avoid underscores in our xml schema. attrs = self.parseAttributes(node, ('type', '_description'), - ('feeder', 'eater')) - wizardType, description, feeder, eater = attrs + ('feeder', 'eater', 'rank')) + wizardType, description, feeder, eater, rank = attrs accepts = [] provides = [] @@ -1186,7 +1190,7 @@ "'s type attribute is %s must be one of %s" % ( parent_type, ', '.join(validTypes))) - + rank = int(rank or FLU_RANK_NONE) isProducer = wizardType.endswith('-producer') isEncoder = wizardType.endswith('-encoder') isMuxer = (wizardType == 'muxer') @@ -1214,7 +1218,7 @@ raise fxml.ParserError(err) return RegistryEntryWizard(parent_type, wizardType, description, - feeder, eater, accepts, provides) + feeder, eater, accepts, provides, rank) def _parseAcceptFormat(self, node): # @@ -1286,9 +1290,9 @@ def rebuildNeeded(self, mtime): - def _rebuildNeeded(file): + def _rebuildNeeded(f): try: - if _getMTime(file) > mtime: + if _getMTime(f) > mtime: self.debug("Path %s changed since registry last " "scanned", f) return True @@ -1416,10 +1420,14 @@ w(6, '') for wizard in component.wizards: - w(6, '' % ( + rank = '' + if wizard.rank: + rank = ' rank="%d"' % wizard.rank + w(6, '' % ( wizard.type, e(wizard.description), - wizard.feeder)) + wizard.feeder, + rank)) for accept in wizard.accepts: w(8, '' % ( accept.media_type)) @@ -1510,15 +1518,26 @@ """Registry, this is normally not instantiated.""" logCategory = 'registry' - filename = os.path.join(configure.registrydir, 'registry.xml') + defaultCachePath = os.path.join(configure.registrydir, 'registry.xml') + + def __init__(self, paths=None, prefix=configure.PACKAGE, + cachePath=defaultCachePath, seconds=runtime.seconds): + if paths is not None: + self._paths = paths + else: + self._paths = self._getRegistryPathsFromEnviron() + self.prefix = prefix + self.filename = cachePath + self.seconds = seconds + self.mtime = None + self._modmtime = _getMTime(__file__) - def __init__(self): self._parser = RegistryParser() if (READ_CACHE and os.path.exists(self.filename) and os.access(self.filename, os.R_OK)): - self.info('Parsing registry: %s' % self.filename) + self.info('Parsing registry: %s', self.filename) try: self._parser.parseRegistry(self.filename) except fxml.ParserError, e: @@ -1526,8 +1545,8 @@ # ran, then downgraded again; the registry can then contain # XML keys that are not understood by this version. # This is non-fatal, and gets fixed due to a re-scan - self.warning('Could not parse registry %s.' % self.filename) - self.debug('fxml.ParserError: %s' % log.getExceptionMessage(e)) + self.warning('Could not parse registry %s.', self.filename) + self.debug('fxml.ParserError: %s', log.getExceptionMessage(e)) self.verify(force=not READ_CACHE) @@ -1548,33 +1567,36 @@ self.addFile(f) f.close() - def addRegistryPath(self, path, prefix=configure.PACKAGE): + def addRegistryPath(self, path, prefix=None): """ Add a registry path to this registry, scanning it for registry snippets. - @param path: a full path containing a 'flumotion' directory, - which will be scanned for registry files. + @param path: a full path containing a PREFIX directory, which will be + scanned for registry files. + @param prefix: directory name under path which will be scanned + (defaults to 'flumotion' and cannot be an empty string). @rtype: bool @returns: whether the path could be added """ - self.debug('path %s, prefix %s' % (path, prefix)) + prefix = prefix or self.prefix + self.debug('path %s, prefix %s', path, prefix) if not os.path.exists(path): self.warning( - "Cannot add non-existent path '%s' to registry" % path) + "Cannot add non-existent path '%s' to registry", path) return False if not os.path.exists(os.path.join(path, prefix)): self.warning("Cannot add path '%s' to registry " - "since it does not contain prefix '%s'" % (path, prefix)) + "since it does not contain prefix '%s'", path, prefix) return False # registry path was either not watched or updated, or a force was # asked, so reparse - self.info('Scanning registry path %s' % path) + self.info('Scanning registry path %s', path) registryPath = RegistryDirectory(path, prefix=prefix) files = registryPath.getFiles() - self.debug('Found %d possible registry files' % len(files)) + self.debug('Found %d possible registry files', len(files)) map(self.addFile, files) self._parser.addDirectory(registryPath) @@ -1628,48 +1650,48 @@ """ def load(): - ret = BundlerBasket() + ret = BundlerBasket(self.mtime) for b in self.getBundles(): bundleName = b.getName() - self.debug('Adding bundle %s' % bundleName) + self.debug('Adding bundle %s', bundleName) for d in b.getDirectories(): directory = d.getName() for bundleFilename in d.getFiles(): try: basedir = b.getBaseDir() except errors.NoProjectError, e: - self.warning("Could not load project %s" % e.args) + self.warning("Could not load project %s", e.args) raise fullpath = os.path.join(basedir, directory, bundleFilename.getLocation()) relative = bundleFilename.getRelative() - self.log('Adding path %s as %s to bundle %s' % ( - fullpath, relative, bundleName)) + self.log('Adding path %s as %s to bundle %s', + fullpath, relative, bundleName) try: ret.add(bundleName, fullpath, relative) except Exception, e: - self.debug("Reason: %r" % e) + self.debug("Reason: %r", e) raise RuntimeError( 'Could not add %s to bundle %s (%s)' % (fullpath, bundleName, e)) for d in b.getDependencies(): - self.log('Adding dependency of %s on %s' % (bundleName, d)) + self.log('Adding dependency of %s on %s', bundleName, d) ret.depend(bundleName, d) return ret try: return load() except Exception, e: - self.debug("Could not register bundles the first time: %s" % - log.getExceptionMessage(e)) + self.debug("Could not register bundles the first time: %s", + log.getExceptionMessage(e)) self.warning("Bundle problem, rebuilding registry") self.verify(force=True) try: return load() except Exception, e: - self.debug("Could not register bundles the second time: %s" % + self.debug("Could not register bundles the second time: %s", log.getExceptionMessage(e)) - self.error("Could not not register bundles (%s)" % + self.error("Could not not register bundles (%s)", log.getExceptionMessage(e)) def dump(self, fd): @@ -1690,21 +1712,30 @@ self._parser.clean() def rebuildNeeded(self): + if self.mtime is None: + self.log("Rebuild needed: missing mtime") + return True if not os.path.exists(self.filename): + self.log("Rebuild needed: registry file %s doesn't exists", + self.filename) return True # A bit complicated because we want to allow FLU_PROJECT_PATH to # point to nonexistent directories - registryPaths = python.set(self._getRegistryPathsFromEnviron()) + registryPaths = python.set(self._paths) oldRegistryPaths = python.set([directory.getPath() for directory in self.getDirectories()]) if registryPaths != oldRegistryPaths: if oldRegistryPaths - registryPaths: + self.log("Rebuild needed: registry paths removed") return True - if filter(os.path.exists, registryPaths - oldRegistryPaths): + f = filter(os.path.exists, registryPaths - oldRegistryPaths) + if f: + self.log("Rebuild needed: a newly added registry path doesn't " + "exists: %s", f) return True - registry_modified = _getMTime(self.filename) + registry_modified = self.mtime for d in self._parser.getDirectories(): if d.rebuildNeeded(registry_modified): return True @@ -1715,7 +1746,7 @@ if not force and not self.rebuildNeeded(): return - self.info('Saving registry to %s' % self.filename) + self.info('Saving registry to %s', self.filename) # create parent directory directory = os.path.split(self.filename)[0] @@ -1762,11 +1793,16 @@ if self.rebuildNeeded(): self.info("Rebuild of registry is needed") self.clean() - for path in self._getRegistryPathsFromEnviron(): + mtime = self.seconds() + for path in self._paths: if not self.addRegistryPath(path): self._parser.removeDirectoryByPath(path) + self.mtime = mtime self.save(True) + def isUptodate(self): + return self._modmtime >= _getMTime(__file__) + class RegistrySubsetWriter(RegistryWriter): @@ -1919,5 +1955,12 @@ if not __registry: log.debug('registry', 'instantiating registry') __registry = ComponentRegistry() + elif not __registry.isUptodate(): + # When a new version of flumotion gets installed, running managers will + # reread the xml files. Reloading the registry module is required to + # avoid inconsistencies. + log.debug('registry', 'registry module updated, reloading') + reload(sys.modules[__registry.__module__]) + __registry = ComponentRegistry() return __registry diff -Nru flumotion-0.6.1/flumotion/common/reload.py flumotion-0.9.1/flumotion/common/reload.py --- flumotion-0.6.1/flumotion/common/reload.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/reload.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """reloading of code @@ -28,7 +24,7 @@ from flumotion.common import log -__version__ = "$Rev: 7161 $" +__version__ = "$Rev$" def reloadFlumotion(): diff -Nru flumotion-0.6.1/flumotion/common/server.py flumotion-0.9.1/flumotion/common/server.py --- flumotion-0.6.1/flumotion/common/server.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/server.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """helper classes for creating a twisted server @@ -29,7 +25,7 @@ from flumotion.common import log -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class _ServerContextFactory(log.Loggable): diff -Nru flumotion-0.6.1/flumotion/common/setup.py flumotion-0.9.1/flumotion/common/setup.py --- flumotion-0.6.1/flumotion/common/setup.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/setup.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,28 +1,24 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """initalizing logging and package paths. """ -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" def setup(): diff -Nru flumotion-0.6.1/flumotion/common/signals.py flumotion-0.9.1/flumotion/common/signals.py --- flumotion-0.6.1/flumotion/common/signals.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/signals.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,32 +1,26 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_signals -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """synchronous message passing between python objects """ -import warnings - from flumotion.common import log -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class SignalMixin(object): @@ -59,13 +53,6 @@ del self.__signalConnections[signalId] - # F0.8 - - def disconnect_by_func(self, func): - warnings.warn("Please call disconnectByFunction instead", - DeprecationWarning, stacklevel=2) - self.disconnectByFunction(func) - def disconnectByFunction(self, function): self.__ensureSignals() diff -Nru flumotion-0.6.1/flumotion/common/startset.py flumotion-0.9.1/flumotion/common/startset.py --- flumotion-0.6.1/flumotion/common/startset.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/startset.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """a data structure to manage asynchronous avatar starts and shutdowns @@ -26,7 +22,7 @@ from flumotion.common import log -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" # This class was factored out of the worker's jobheaven, so sometimes diff -Nru flumotion-0.6.1/flumotion/common/testsuite.py flumotion-0.9.1/flumotion/common/testsuite.py --- flumotion-0.6.1/flumotion/common/testsuite.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/testsuite.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """testsuite base classes and helpers for diffing strings @@ -24,12 +20,36 @@ from twisted.spread import pb from twisted.internet import reactor, defer, selectreactor -from twisted.trial import unittest +from twisted.scripts import trial +from twisted.trial import unittest, util from flumotion.common import log from flumotion.configure import configure -__version__ = "$Rev: 7541 $" +__version__ = "$Rev$" + + +try: + _getConfig = trial.getConfig +except AttributeError: + # trial.getConfig() is only available when using flumotion-trial + _getConfig = dict + + +def attr(*args, **kwargs): + """Decorator that adds attributes to objects. + + It can be used to set the 'slow', 'skip', or 'todo' flags in test cases. + """ + + def wrap(func): + for name in args: + # these are just True flags: + setattr(func, name, True) + for name, value in kwargs.items(): + setattr(func, name, value) + return func + return wrap class TestCase(unittest.TestCase, log.Loggable): @@ -96,6 +116,20 @@ methodName = defaults[0] unittest.TestCase.__init__(self, methodName=methodName) + # Skip slow tests if '--skip-slow' option is enabled + if _getConfig().get('skip-slow'): + if self.getSlow() and not self.getSkip(): + self.skip = 'slow test' + + def getSlow(self): + """ + Return whether this test has been marked as slow. Checks on the + instance first, then the class, then the module, then packages. As + soon as it finds something with a C{slow} attribute, returns that. + Returns C{False} if it cannot find anything. + """ + return util.acquireAttribute(self._parents, 'slow', False) + # Loggable and TestCase both have a debug method; prefer ours def debug(self, *args, **kwargs): diff -Nru flumotion-0.6.1/flumotion/common/tz.py flumotion-0.9.1/flumotion/common/tz.py --- flumotion-0.6.1/flumotion/common/tz.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/tz.py 2011-09-11 08:09:03.000000000 +0000 @@ -0,0 +1,196 @@ +# -*- Mode:Python; test-case-name:flumotion.test.test_common_eventcalendar -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import datetime +import time + +HAS_DATEUTIL = False +try: + from dateutil import tz + HAS_DATEUTIL = True +except ImportError: + pass + + +def gettz(tzid): + """ + Gets the right timezone from the environment or the given string + """ + if not HAS_DATEUTIL: + return None + return tz.gettz(tzid) + + +class DSTTimezone(datetime.tzinfo): + """ A tzinfo class representing a DST timezone """ + + ZERO = datetime.timedelta(0) + + def __init__(self, tzid, stdname, dstname, stdoffset, dstoffset, + stdoffsetfrom, dstoffsetfrom, dststart, dstend, + stdrrule, dstrrule): + ''' + @param tzid: Timezone unique ID + @type tzid: str + @param stdname: Name of the Standard observance + @type stdname: str + @param dstname: Name of the DST observance + @type dstname: str + @param stdoffset: UTC offset for the standard observance + @type stdoffset: L{datetime.timedelta} + @param dstoffset: UTC offset for the DST observance + @type dstoffset: L{datetime.timedelta} + @param stdoffsetfrom: UTC offset which is in use when the onset of + Standard observance begins + @type stdoffsetfrom: l{datetime.timedelta} + @param dstoffsetfrom: UTC offset which is in use when the onset of + DST observance begins + @type stdoffsetfrom: L{datetime.timedelta} + @param dststart: Start of the DST observance + @type dststart: L{datetime.datetime} + @param dstend: End of the DST observance + @type dstend: L{datetime.datetime} + @param stdrrule: Recurrence rule for the standard observance + @type stdrrule: L{rrule.rrule} + @param dstrrule: Recurrence rule for the daylight observance + @type dstrrule: L{rrule.rrule} + ''' + + self._tzid = str(tzid) + self._stdname = str(stdname) + self._dstname = str(dstname) + self._stdoffset = stdoffset + self._dstoffset = dstoffset + self._stdoffsetfrom = stdoffsetfrom + self._dstoffsetfrom = dstoffsetfrom + self._dststart = dststart + self._dstend = dstend + self._stdrrule = stdrrule + self._dstrrule = dstrrule + + def __str__(self): + return self._tzid + + def tzname(self, dt): + return self._isdst(dt) and self._dstname or self._stdname + + def utcoffset(self, dt): + return self._isdst(dt) and self._dstoffset or self._stdoffset + + def fromutc(self, dt): + dt = dt.replace(tzinfo=None) + return self._isdst(dt) and \ + dt + self._dstoffsetfrom or dt + self._stdoffsetfrom + + def dst(self, dt): + if dt is None or dt.tzinfo is None: + return self.ZERO + assert dt.tzinfo is self + return self._isdst(dt) and self._dstoffset - self._stdoffset or \ + self.ZERO + + def copy(self): + # The substraction is done converting the datetime values to UTC and + # adding the utcoffset of each one (see 9.1.4 datetime Objects) + # which is done only if both datetime are 'aware' and have different + # tzinfo member, that's why we need a way to copy an instance + return DSTTimezone(self._tzid, self._stdname, self._dstname, + self._stdoffset, self._dstoffset, self._stdoffsetfrom, + self._dstoffsetfrom, self._dststart, self._dstend, + self._stdrrule, self._dstrrule) + + def _isdst(self, dt): + if self._dstoffset is None or dt.year < self._dststart.year: + return False + firstDayOfYear = datetime.datetime(dt.year, 1, 1) + start = self._dstrrule.after(firstDayOfYear, True) + end = self._stdrrule.after(firstDayOfYear) + return start <= dt.replace(tzinfo=None) < end + + +class FixedOffsetTimezone(datetime.tzinfo): + """Fixed offset in hours from UTC.""" + + def __init__(self, offset, name): + self.__offset = offset + self.__name = name + + def utcoffset(self, dt): + return self.__offset + + def tzname(self, dt): + return self.__name + + def dst(self, dt): + return datetime.timedelta(0) + + def copy(self): + return FixedOffsetTimezone(self.__offset, self.__name) + + +class LocalTimezone(datetime.tzinfo): + """A tzinfo class representing the system's idea of the local timezone""" + + EPOCHORDINAL = datetime.datetime.utcfromtimestamp(0).toordinal() + ZERO = datetime.timedelta(0) + + def __init__(self, *args): + datetime.tzinfo.__init__(self, args) + self._std_offset = datetime.timedelta(seconds=-time.timezone) + if time.daylight: + self._dst_offset = datetime.timedelta(seconds=-time.altzone) + else: + self._dst_offset = self._std_offset + self._dst_diff = self._dst_offset - self._std_offset + + def utcoffset(self, dt): + if self._isdst(dt): + return self._dst_offset + else: + return self._std_offset + + def dst(self, dt): + if self._isdst(dt): + return self._dst_diff + else: + return self.ZERO + + def tzname(self, dt): + return time.tzname[self._isdst(dt)] + + def _isdst(self, dt): + timestamp = ((dt.toordinal() - self.EPOCHORDINAL) * 86400 + + dt.hour * 3600 + + dt.minute * 60 + + dt.second) + return time.localtime(timestamp+time.timezone).tm_isdst +LOCAL = LocalTimezone() + + +class UTCTimezone(datetime.tzinfo): + """A tzinfo class representing UTC""" + ZERO = datetime.timedelta(0) + + def utcoffset(self, dt): + return self.ZERO + + def tzname(self, dt): + return "UTC" + + def dst(self, dt): + return self.ZERO +UTC = UTCTimezone() diff -Nru flumotion-0.6.1/flumotion/common/vfsgio.py flumotion-0.9.1/flumotion/common/vfsgio.py --- flumotion-0.6.1/flumotion/common/vfsgio.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/vfsgio.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """GIO backend for Virtual File System. @@ -31,7 +27,7 @@ from zope.interface import implements from flumotion.common import log -from flumotion.common.errors import AccessDeniedError +from flumotion.common.errors import AccessDeniedError, NotDirectoryError from flumotion.common.interfaces import IDirectory, IFile # gio is only imported inside nested scopes so that @@ -74,6 +70,8 @@ import gio if not os.path.exists(path): self.path = '/' + elif not os.path.isdir(path): + raise NotDirectoryError() else: self.path = os.path.abspath(path) diff -Nru flumotion-0.6.1/flumotion/common/vfsgnome.py flumotion-0.9.1/flumotion/common/vfsgnome.py --- flumotion-0.6.1/flumotion/common/vfsgnome.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/vfsgnome.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """GnomeVFS backend for Virtual File System. @@ -30,7 +26,7 @@ from zope.interface import implements from flumotion.common import log -from flumotion.common.errors import AccessDeniedError +from flumotion.common.errors import AccessDeniedError, NotDirectoryError from flumotion.common.interfaces import IDirectory, IFile # gnomevfs is only imported inside nested scopes so that @@ -66,6 +62,8 @@ import gnomevfs if not os.path.exists(path): self.path = '/' + if not os.path.isdir(path): + raise NotDirectoryError() else: self.path = os.path.abspath(path) diff -Nru flumotion-0.6.1/flumotion/common/vfs.py flumotion-0.9.1/flumotion/common/vfs.py --- flumotion-0.6.1/flumotion/common/vfs.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/vfs.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """Virtual File System API. @@ -26,7 +22,7 @@ It's designed to be used over twisted.spread and is thus using deferreds. """ -from twisted.internet.defer import succeed +from twisted.internet.defer import succeed, fail from flumotion.common import log @@ -35,6 +31,11 @@ def listDirectory(path): """List the directory called path + Raises L{flumotion.common.errors.NotDirectoryError} if directoryName is + not a directory. + + @param path: the name of the directory to list + @type path: string @returns: the directory @rtype: deferred that will fire an object implementing L{IDirectory} """ @@ -46,9 +47,12 @@ "there are no vfs backends available") backend = _backends[0] log.info('vfs', 'listing directory %s using %r' % (path, backend)) - directory = backend(path) - directory.cacheFiles() - return succeed(directory) + try: + directory = backend(path) + directory.cacheFiles() + return succeed(directory) + except Exception, e: + return fail(e) def _registerBackends(): diff -Nru flumotion-0.6.1/flumotion/common/watched.py flumotion-0.9.1/flumotion/common/watched.py --- flumotion-0.6.1/flumotion/common/watched.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/watched.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,63 +1,116 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """abstract data types with built-in notification support """ -__version__ = "$Rev: 7162 $" - - -def _make_watched(type, *mutators): - - class Watched(type): - - def __init__(self): - type.__init__(self) - self.watch_id = 0 - self.watch_procs = {} # id -> proc - - def watch(self, proc): - self.watch_id += 1 - self.watch_procs[self.watch_id] = proc - return self.watch_id - - def unwatch(self, id): - del self.watch_procs[id] - - def notify_changed(self): - for proc in self.watch_procs.values(): - proc(self) +__version__ = "$Rev$" - def mutate(method): - def do_mutate(self, *args, **kwargs): - method(self, *args, **kwargs) - self.notify_changed() - setattr(Watched, method.__name__, do_mutate) - for i in mutators: - mutate(getattr(type, i)) +class WatchedList(list): - return Watched + def __init__(self): + list.__init__(self) + self.watch_id = 0 + self.watch_procs = {} + + def append(self, o): + list.append(self, o) + self.notify_changed(o) + + def insert(self, idx, o): + list.insert(self, idx, o) + self.notify_changed(o) + + def remove(self, o): + list.remove(self, o) + self.notify_changed(o) + + def pop(self, *args): + o = list.pop(self, *args) + self.notify_changed(o) + return o + + def sort(self, *args, **kwargs): + list.sort(self, *args, **kwargs) + self.notify_changed(self) + + def reverse(self): + list.reverse(self) + self.notify_changed(self) + + def notify_changed(self, obj): + for proc in self.watch_procs.values(): + proc(obj) + + def watch(self, proc): + self.watch_id += 1 + self.watch_procs[self.watch_id] = proc + return self.watch_id + + def unwatch(self, proc_id): + del self.watch_procs[proc_id] + + +class WatchedDict(dict): + + def __init__(self): + dict.__init__(self) + self.watch_id = 0 + self.watch_procs = {} + + def __setitem__(self, key, val): + dict.__setitem__(self, key, val) + self.notify_changed((key, val)) + + def __delitem__(self, key): + val = self[key] + dict.__delitem__(self, key) + self.notify_changed((key, val)) + + def pop(self, key, *args): + if len(args) > 1: + raise TypeError('pop expected at most 2 arguments, got %d' % + (len(args) + 1)) + try: + val = dict.pop(self, key) + except KeyError: + if not len(args): + raise + val = args[0] + self.notify_changed((key, val)) + + def popitem(self): + ret = dict.popitem(self) + self.notify_changed(ret) + return ret + + def update(self, *args, **kwargs): + dict.update(self, *args, **kwargs) + self.notify_changed(self) + + def notify_changed(self, obj): + for proc in self.watch_procs.values(): + proc(obj) + + def watch(self, proc): + self.watch_id += 1 + self.watch_procs[self.watch_id] = proc + return self.watch_id -WatchedList = _make_watched(list, 'append', 'insert', 'remove', 'pop', - 'sort', 'reverse') -WatchedDict = _make_watched(dict, '__setitem__', '__delitem__', 'pop', - 'popitem', 'update') + def unwatch(self, proc_id): + del self.watch_procs[proc_id] diff -Nru flumotion-0.6.1/flumotion/common/worker.py flumotion-0.9.1/flumotion/common/worker.py --- flumotion-0.6.1/flumotion/common/worker.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/worker.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_worker -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """objects related to the state of workers. @@ -32,7 +28,7 @@ from flumotion.common.i18n import N_, gettexter from flumotion.twisted import flavors -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" T_ = gettexter() diff -Nru flumotion-0.6.1/flumotion/common/xdg.py flumotion-0.9.1/flumotion/common/xdg.py --- flumotion-0.6.1/flumotion/common/xdg.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/xdg.py 2011-09-11 08:09:03.000000000 +0000 @@ -0,0 +1,94 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_common_xdg -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +"""Simple XDG Base Directory Specification implementation. + +See http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html + +Currently only configuration files handling is implemented.""" + + +import os +from flumotion.common.python import makedirs + + +APPLICATION = 'flumotion' + + +def config_home_path(): + """ + Get the path of the config directory, taking into account the + XDG_CONFIG_HOME environment variable. + """ + + # if $HOME is unset, there's not much we can do, default to the workdir + home = os.environ.get('HOME', '') + config_home = os.environ.get('XDG_CONFIG_HOME') + if not config_home: + config_home = os.path.join(home, '.config') + return config_home + + +def config_read_path(name): + """ + Get the path of the config file with the given name, taking into account + the XDG_CONFIG_HOME and XDG_CONFIG_DIRS environment variables. + + @param name: The name of the config file + @type name: str + + @returns: full path to the file or None if it does not exist + """ + + search_path = [config_home_path()] + + config_dirs = os.environ.get('XDG_CONFIG_DIRS') + if config_dirs: + search_path.extend(config_dirs.split(':')) + + for path in search_path: + candidate = os.path.join(path, APPLICATION, name) + if os.access(candidate, os.F_OK | os.R_OK): + return candidate + return None + + +def config_write_path(name, mode='w'): + """ + Get file-like object for the config file with the given name, taking into + account the XDG_CONFIG_HOME environment variable. + Create intermidient directories and the file itself according to the XDG + Specification in case the file does not exist. + + May raise EnvironmentError if the file or directories cannot be created. + + @param name: The name of the config file + @type name: str + @param mode: The mode to use when opening the file, 'w' by default. + @type mode: str + + @returns: a file-like object + """ + + path = os.path.join(config_home_path(), APPLICATION, name) + dirname = os.path.dirname(path) + + if not os.path.exists(dirname): + # XDG spec demands mode 0700 + makedirs(dirname, 0700) + + return file(path, mode) diff -Nru flumotion-0.6.1/flumotion/common/xmlwriter.py flumotion-0.9.1/flumotion/common/xmlwriter.py --- flumotion-0.6.1/flumotion/common/xmlwriter.py 2009-09-09 11:37:22.000000000 +0000 +++ flumotion-0.9.1/flumotion/common/xmlwriter.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """xml serializer and component comparison @@ -25,17 +21,20 @@ from cStringIO import StringIO from xml.sax.saxutils import quoteattr -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class XMLWriter(object): + encoding = '\n' + def __init__(self): self._data = StringIO() self._tagStack = [] self._indent = 0 self._indentChar = ' ' self._indentUnit = 2 + self._data.write(self.encoding) # Private @@ -92,7 +91,8 @@ """Write a line to the xml. This method honors the current indentation. """ - self._data.write('%s%s\n' % (self._indentChar * self._indent, line)) + self._data.write('%s%s\n' % (self._indentChar * self._indent, + line.encode('utf8'))) def writeTag(self, tagName, attributes=None, data=None): """Writes out and closes a tag. Optionally writes data as a child node. diff -Nru flumotion-0.6.1/flumotion/component/base/admin_gtk.py flumotion-0.9.1/flumotion/component/base/admin_gtk.py --- flumotion-0.6.1/flumotion/component/base/admin_gtk.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/admin_gtk.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -39,7 +35,7 @@ from flumotion.component.base.propertiesnode import PropertiesAdminGtkNode _ = gettext.gettext -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" T_ = gettexter() # stupid pychecker diff -Nru flumotion-0.6.1/flumotion/component/base/admin_text.py flumotion-0.9.1/flumotion/component/base/admin_text.py --- flumotion-0.6.1/flumotion/component/base/admin_text.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/admin_text.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,30 +1,26 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from zope.interface import implements -from flumotion.common import errors, log +from flumotion.common import log from flumotion.twisted import flavors -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class BaseAdminText(log.Loggable): diff -Nru flumotion-0.6.1/flumotion/component/base/baseadminnode.py flumotion-0.9.1/flumotion/component/base/baseadminnode.py --- flumotion-0.6.1/flumotion/component/base/baseadminnode.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/baseadminnode.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -35,7 +31,7 @@ from flumotion.ui.fgtk import ProxyWidgetMapping _ = gettext.gettext -__version__ = "$Rev: 7522 $" +__version__ = "$Rev$" T_ = gettexter() @@ -249,19 +245,6 @@ return label def loadGladeFile(): - # F0.8 - if hasattr(self, 'glade_file'): - self.gladeFile = self.glade_file - debug = "class %r should have glade_file " \ - "changed to gladeFile" % self.__class__ - import warnings - warnings.warn(debug, DeprecationWarning) - m = messages.Warning(T_(N_( - "Internal error in component UI's '%s' tab. " - "Please file a bug against the component."), self.title), - debug=debug, mid="render-%s" % self.title) - self.addMessage(m) - if not self.gladeFile: return defer.succeed(None) diff -Nru flumotion-0.6.1/flumotion/component/base/base.xml flumotion-0.9.1/flumotion/component/base/base.xml --- flumotion-0.6.1/flumotion/component/base/base.xml 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/base.xml 2011-09-11 08:09:04.000000000 +0000 @@ -16,6 +16,7 @@ + diff -Nru flumotion-0.6.1/flumotion/component/base/component.glade flumotion-0.9.1/flumotion/component/base/component.glade --- flumotion-0.6.1/flumotion/component/base/component.glade 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/component.glade 2011-09-11 08:09:04.000000000 +0000 @@ -1,639 +1,425 @@ - - - + - - - Statistics - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 0 - - - - 6 - True - 8 - 2 - False - 0 - 0 - - - - True - <b>Component</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 2 - 0 - 1 - 6 - fill - - - - - - - True - N/A - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - PID: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - 12 - 3 - fill - - - - - - - True - True - N/A - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 3 - 4 - fill - - - - - - - True - True - N/A - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 4 - 5 - fill - - - - - - - True - True - N/A - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 5 - 6 - fill - - - - - - - True - True - N/A - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 6 - 7 - fill - - - - - - - True - True - N/A - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 7 - 8 - fill - - - - - - - True - CPU use: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 4 - 5 - 12 - 3 - fill - - - - - - - True - Running since: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 5 - 6 - 12 - 3 - fill - - - - - - - True - Uptime: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 6 - 7 - 12 - 3 - fill - - - - - - - True - Virtual memory: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 7 - 8 - 12 - 3 - fill - - - - - - - True - Type: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - 12 - 3 - fill - - - - - - - True - <b>Process</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - 9 - fill - - - - - - 0 - False - True - - - - - - 6 - 3 - 3 - False - 6 - 6 - - - - True - <b>Debug Logging</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 2 - 0 - 1 - 6 - fill - - - - - - - True - Flumotion: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - 12 - 3 - fill - - - - - - - True - GStreamer: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - 12 - 3 - fill - - - - - - - True - False - True - - - 1 - 2 - 1 - 2 - fill - fill - - - - - - True - False - True - - - 1 - 2 - 2 - 3 - fill - fill - - - - - - True - True - True - True - 0 - - True - - False - - - 2 - 3 - 1 - 2 - - - - - - - - True - True - True - True - 0 - - True - - False - - - 2 - 3 - 2 - 3 - - - - - - - 0 - True - True - - - - - - + + + + Statistics + + + True + + + True + 6 + 9 + 2 + + + True + 0 + <b>Component</b> + True + + + 2 + GTK_FILL + + 6 + + + + + True + 0 + N/A + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + True + 0 + PID: + + + 3 + 4 + GTK_FILL + + 12 + 3 + + + + + True + True + 0 + N/A + True + + + 1 + 2 + 3 + 4 + GTK_FILL + + + + + + True + True + 0 + N/A + True + + + 1 + 2 + 4 + 5 + GTK_FILL + + + + + + True + True + 0 + N/A + True + + + 1 + 2 + 5 + 6 + GTK_FILL + + + + + + True + True + 0 + N/A + True + + + 1 + 2 + 6 + 7 + GTK_FILL + + + + + + True + True + 0 + N/A + True + + + 1 + 2 + 7 + 8 + GTK_FILL + + + + + + True + 0 + CPU use: + + + 4 + 5 + GTK_FILL + + 12 + 3 + + + + + True + 0 + Running since: + + + 5 + 6 + GTK_FILL + + 12 + 3 + + + + + True + 0 + Uptime: + + + 6 + 7 + GTK_FILL + + 12 + 3 + + + + + True + 0 + Virtual memory: + + + 7 + 8 + GTK_FILL + + 12 + 3 + + + + + True + 0 + Type: + + + 1 + 2 + GTK_FILL + + 12 + 3 + + + + + True + 0 + <b>Process</b> + True + + + 2 + 3 + GTK_FILL + + 9 + + + + + 0 + N/A + True + + + 1 + 2 + 8 + 9 + GTK_FILL + + + + + + 0 + Resets count: + + + 8 + 9 + GTK_FILL + + 12 + 3 + + + + + + + + False + 0 + + + + + 6 + 3 + 4 + 6 + 6 + + + True + 0 + <b>Debug Logging</b> + True + + + 4 + GTK_FILL + + 6 + + + + + True + 0 + Flumotion: + + + 2 + 3 + GTK_FILL + + 12 + 3 + + + + + True + 0 + GStreamer: + + + 1 + 2 + GTK_FILL + + 12 + 3 + + + + + True + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + + + 1 + 2 + 2 + 3 + GTK_FILL + GTK_FILL + + + + + 100 + True + True + + + + 2 + 3 + 1 + 2 + + + + + + + 100 + True + True + + + + 2 + 3 + 2 + 3 + + + + + + + gtk-apply + True + True + True + True + + + 3 + 4 + 1 + 2 + + + + + + + gtk-apply + True + True + True + True + + + 3 + 4 + 2 + 3 + + + + + + + 1 + + + + + diff -Nru flumotion-0.6.1/flumotion/component/base/componentnode.py flumotion-0.9.1/flumotion/component/base/componentnode.py --- flumotion-0.6.1/flumotion/component/base/componentnode.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/componentnode.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -29,7 +25,7 @@ import gtk -from flumotion.common.format import formatStorage, formatTime +from flumotion.common import format as formatting from flumotion.common.i18n import gettexter from flumotion.component.base.baseadminnode import BaseAdminGtkNode from flumotion.extern.log.log import getDebug @@ -37,7 +33,7 @@ _ = gettext.gettext -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" T_ = gettexter() @@ -65,14 +61,18 @@ self.widget = self.wtree.get_widget('main-vbox') assert self.widget, "No component-widget in %s" % self.gladeFile self.gst_mask = self.wtree.get_widget('gst_mask') - self.gst_mask.connect('changed', self._on_gst_mask_changed) self.gst_label = self.wtree.get_widget('gst_label') self.flu_mask = self.wtree.get_widget('flu_mask') - self.flu_mask.connect('changed', self._on_flu_mask_changed) self.gst_profile = self.wtree.get_widget('gst_profile') self.gst_profile.connect('changed', self._on_gst_profile_changed) self.flu_profile = self.wtree.get_widget('flu_profile') self.flu_profile.connect('changed', self._on_flu_profile_changed) + self.gst_button = self.wtree.get_widget('gst_button') + self.gst_button.connect('clicked', self._on_gst_button_clicked) + self.gst_mask.connect('activate', self._on_gst_button_clicked) + self.flu_button = self.wtree.get_widget('flu_button') + self.flu_button.connect('clicked', self._on_flu_button_clicked) + self.flu_mask.connect('activate', self._on_flu_button_clicked) # pid l = self.wtree.get_widget('label-pid') @@ -87,6 +87,8 @@ self._label_component_type = self.wtree.get_widget( 'label-component-type') + self._label_resets = self.wtree.get_widget('label-resets') + self._label_resets_count = self.wtree.get_widget('label-resets-count') self.widget.show() self._prepareDebugging() @@ -122,16 +124,16 @@ gtk.Entry.set_text(self.flu_mask, profile) self.flu_mask.set_sensitive(profile is None) - def _on_flu_mask_changed(self, entry): - debug = entry.get_text() + def _on_flu_button_clicked(self, widget): + debug = self.flu_mask.get_text() if not self._debugEnabled or not self._validateMask(debug): return self.info('setting flu debug to %s for %s' % ( debug, self.state.get('name'))) self.admin.componentCallRemote(self.state, 'setFluDebug', debug) - def _on_gst_mask_changed(self, entry): - debug = entry.get_text() + def _on_gst_button_clicked(self, widget): + debug = self.gst_mask.get_text() if not self._debugEnabled or not self._validateMask(debug): return self.info('setting gst debug to %s for %s' % ( @@ -152,13 +154,14 @@ self.gst_profile.hide() self.gst_label.hide() self.gst_mask.hide() + self.gst_button.hide() self._debugEnabled = debugEnabled def _setStartTime(self, value): self._label_start_time.set_text( time.strftime("%c", time.localtime(value))) - self._label_uptime.set_text(formatTime(0)) + self._label_uptime.set_text(formatting.formatTime(0)) self._startTime = value @@ -166,10 +169,24 @@ if self._startTime is not None: runtime = value - self._startTime - self._label_uptime.set_text(formatTime(runtime)) + self._label_uptime.set_text(formatting.formatTime(runtime)) else: self._label_uptime.set_text(_("not available")) + def _setGstDebug(self, value): + self.gst_mask.set_text(value) + try: + self.gst_profile.select_item_by_data(value) + except KeyError: + self.gst_profile.select_item_by_data(None) + + def _setFluDebug(self, value): + self.flu_mask.set_text(value) + try: + self.flu_profile.select_item_by_data(value) + except KeyError: + self.flu_profile.select_item_by_data(None) + def _updateCPU(self, cpu): # given float for cpu, update the label self._label_cpu.set_text('%.2f %%' % (cpu * 100.0)) @@ -179,7 +196,13 @@ if not vsize: self._label_vsize.set_text(_('Unknown')) else: - self._label_vsize.set_text('%sB' % formatStorage(vsize)) + self._label_vsize.set_text('%sB' % formatting.formatStorage(vsize)) + + def _updateResets(self, count): + if not self._label_resets.get_property('visible'): + self._label_resets.show() + self._label_resets_count.show() + self._label_resets_count.set_text('%d restarts' % count) def setUIState(self, uiState): BaseAdminGtkNode.setUIState(self, uiState) @@ -197,10 +220,16 @@ self._updateCPU(value) elif key == 'virtual-size': self._updateVSize(value) - if key == 'start-time': + elif key == 'start-time': self._setStartTime(value) elif key == 'current-time': self._setCurrentTime(value) + elif key == 'reset-count': + self._updateResets(value) + elif key == 'flu-debug': + self._setFluDebug(value) + elif key == 'gst-debug': + self._setGstDebug(value) def stateAppend(self, object, key, value): pass diff -Nru flumotion-0.6.1/flumotion/component/base/eatersnode.py flumotion-0.9.1/flumotion/component/base/eatersnode.py --- flumotion-0.6.1/flumotion/component/base/eatersnode.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/eatersnode.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -29,13 +25,13 @@ import gtk -from flumotion.common.format import formatStorage, formatTime, formatTimeStamp +from flumotion.common import format as formatting from flumotion.common.i18n import gettexter from flumotion.component.base.baseadminnode import BaseAdminGtkNode from flumotion.component.base.statewatcher import StateWatcher _ = gettext.gettext -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" T_ = gettexter() @@ -74,7 +70,7 @@ self.labels['eater-name'].set_markup(_('Eater %s') % value) def _setEaterBytesReadCurrent(self, state, value): - txt = value and (formatStorage(value) + _('Byte')) or '' + txt = value and (formatting.formatStorage(value) + _('Byte')) or '' self.labels['bytes-read-current'].set_text(txt) self._updateConnectionTime() self._updateDisconnectionTime() @@ -88,24 +84,24 @@ if value > 0: self._expander_discont_current.show() elif key == 'time-timestamp-discont': - text = formatTimeStamp(time.localtime(value)) + text = formatting.formatTimeStamp(time.localtime(value)) self.labels['timestamp-discont-time-current'].set_text(text) if value is not None: self._vbox_timestamp_discont_current.show() elif key == 'last-timestamp-discont': - text = formatTime(value, fractional=9) + text = formatting.formatTime(value, fractional=9) self.labels['timestamp-discont-last-current'].set_text(text) if value > 0.0: self._vbox_timestamp_discont_current.show() elif key == 'total-timestamp-discont': - text = formatTime(value, fractional=9) + text = formatting.formatTime(value, fractional=9) self.labels['timestamp-discont-total-current'].set_text(text) if value > 0.0: self._vbox_timestamp_discont_current.show() elif key == 'timestamp-timestamp-discont': if value is None: return - text = formatTime(value, fractional=9) + text = formatting.formatTime(value, fractional=9) self.labels['timestamp-discont-timestamp-current'].set_text(text) # offsets elif key == 'count-offset-discont': @@ -113,7 +109,7 @@ if value > 0: self._expander_discont_current.show() elif key == 'time-offset-discont': - text = formatTimeStamp(time.localtime(value)) + text = formatting.formatTimeStamp(time.localtime(value)) self.labels['offset-discont-time-current'].set_text(text) if value is not None: self._vbox_offset_discont_current.show() @@ -145,7 +141,7 @@ def _setEaterTotalTimestampDiscont(self, state, value): if value is None: return - text = formatTime(value, fractional=9) + text = formatting.formatTime(value, fractional=9) self.labels['timestamp-discont-total'].set_text(text) if value > 0.0: self._vbox_timestamp_discont_total.show() @@ -167,7 +163,7 @@ def _setEaterLastConnect(self, state, value): if value: - text = formatTimeStamp(time.localtime(value)) + text = formatting.formatTimeStamp(time.localtime(value)) self.labels['connected-since'].set_text(text) self._table_connected.show() self._table_disconnected.hide() @@ -191,14 +187,14 @@ def _updateConnectionTime(self): if self._lastConnect: - text = formatTime(time.time() - self._lastConnect) + text = formatting.formatTime(time.time() - self._lastConnect) self.labels['connection-time'].set_text(text) # FIXME: add a timeout to update this ? def _updateDisconnectionTime(self): if self._lastDisconnect: - text = formatTime(time.time() - self._lastDisconnect) + text = formatting.formatTime(time.time() - self._lastDisconnect) self.labels['disconnection-time'].set_text(text) def addEater(self, uiState, state): diff -Nru flumotion-0.6.1/flumotion/component/base/effectsnode.py flumotion-0.9.1/flumotion/component/base/effectsnode.py --- flumotion-0.6.1/flumotion/component/base/effectsnode.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/effectsnode.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ diff -Nru flumotion-0.6.1/flumotion/component/base/feedersnode.py flumotion-0.9.1/flumotion/component/base/feedersnode.py --- flumotion-0.6.1/flumotion/component/base/feedersnode.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/feedersnode.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -29,13 +25,13 @@ import gtk from flumotion.common import common -from flumotion.common.format import formatStorage, formatTime, formatTimeStamp +from flumotion.common import format as formatting from flumotion.common.i18n import gettexter from flumotion.component.base.baseadminnode import BaseAdminGtkNode from flumotion.component.base.statewatcher import StateWatcher _ = gettext.gettext -__version__ = "$Rev: 7965 $" +__version__ = "$Rev$" T_ = gettexter() @@ -82,7 +78,7 @@ % (value, )) def setFeederClientBytesReadCurrent(self, state, value): - txt = value and (formatStorage(value) + _('Byte')) or '' + txt = value and (formatting.formatStorage(value) + _('Byte')) or '' self.labels['bytes-read-current'].set_text(txt) self.updateConnectionTime() self.updateDisconnectionTime() @@ -96,7 +92,7 @@ self.updateDisconnectionTime() def setFeederClientBytesReadTotal(self, state, value): - txt = value and (formatStorage(value) + _('Byte')) or '' + txt = value and (formatting.formatStorage(value) + _('Byte')) or '' self.labels['bytes-read-total'].set_text(txt) def setFeederClientBuffersDroppedTotal(self, state, value): @@ -110,21 +106,21 @@ def setFeederClientLastConnect(self, state, value): if value: - text = formatTimeStamp(time.localtime(value)) + text = formatting.formatTimeStamp(time.localtime(value)) self.labels['connected-since'].set_text(text) self._lastConnect = value self.updateConnectionTime() def setFeederClientLastDisconnect(self, state, value): if value: - text = formatTimeStamp(time.localtime(value)) + text = formatting.formatTimeStamp(time.localtime(value)) self.labels['disconnected-since'].set_text(text) self._lastDisconnect = value self.updateDisconnectionTime() def setFeederClientLastActivity(self, state, value): if value: - text = formatTimeStamp(time.localtime(value)) + text = formatting.formatTimeStamp(time.localtime(value)) self.labels['last-activity'].set_text(text) def setFeederClientFD(self, state, value): @@ -140,14 +136,14 @@ def updateConnectionTime(self): if self._lastConnect: - text = formatTime(time.time() - self._lastConnect) + text = formatting.formatTime(time.time() - self._lastConnect) self.labels['connection-time'].set_text(text) # FIXME: add a timeout to update this ? def updateDisconnectionTime(self): if self._lastDisconnect: - text = formatTime(time.time() - self._lastDisconnect) + text = formatting.formatTime(time.time() - self._lastDisconnect) self.labels['disconnection-time'].set_text(text) def addFeeder(self, uiState, state): diff -Nru flumotion-0.6.1/flumotion/component/base/http.py flumotion-0.9.1/flumotion/component/base/http.py --- flumotion-0.6.1/flumotion/component/base/http.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/http.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,40 +1,35 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_http -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import struct import socket -from twisted.web import http, server -from twisted.web import resource as web_resource +from twisted.web import http from twisted.internet import reactor, defer -from twisted.python import reflect, failure +from twisted.python import failure from flumotion.configure import configure from flumotion.common import errors from flumotion.twisted.credentials import cryptChallenge -from flumotion.common import common, log, keycards +from flumotion.common import log, keycards #__all__ = ['HTTPStreamingResource', 'MultifdSinkStreamer'] -__version__ = "$Rev: 8058 $" +__version__ = "$Rev$" HTTP_SERVER_NAME = 'FlumotionHTTPServer' @@ -57,86 +52,32 @@ ### flumotion.common.keycards or related -class Issuer(log.Loggable): +class HTTPGenericIssuer(log.Loggable): """ - I am a base class for all Issuers. - An issuer issues keycards of a given class based on an object - (incoming HTTP request, ...) - """ - - def issue(self, *args, **kwargs): - """ - Return a keycard, or None, based on the given arguments. - """ - raise NotImplementedError - - -class HTTPGenericIssuer(Issuer): - """ - I create L{flumotion.common.keycards.Keycard} based on just a - standard HTTP request. Useful for authenticating based on - server-side checks such as time, rather than client credentials. + I create L{flumotion.common.keycards.Keycard} based on an + HTTP request. Useful for authenticating based on + server-side checks such as time, as well as client credentials + such as HTTP Auth, get parameters, IP address and token. """ def issue(self, request): keycard = keycards.KeycardGeneric() - self.debug("Asking for authentication, generic HTTP") - return keycard - - -class HTTPAuthIssuer(Issuer): - """ - I create L{flumotion.common.keycards.KeycardUACPP} keycards based on - an incoming L{twisted.protocols.http.Request} request's standard - HTTP authentication information. - """ - - def issue(self, request): - # for now, we're happy with a UACPP keycard; the password arrives - # plaintext anyway - keycard = keycards.KeycardUACPP( - request.getUser(), - request.getPassword(), request.getClientIP()) - self.debug('Asking for authentication, user %s, password %s, ip %s' % ( - keycard.username, keycard.password, keycard.address)) - return keycard - - -class HTTPTokenIssuer(Issuer): - """ - I create L{flumotion.common.keycards.KeycardToken} keycards based on - an incoming L{twisted.protocols.http.Request} request's GET "token" - parameter. - """ - - def issue(self, request): - if not 'token' in request.args.keys(): - return None - + keycard.username = request.getUser() + keycard.password = request.getPassword() + keycard.address = request.getClientIP() # args can have lists as values, if more than one specified - token = request.args['token'] + token = request.args.get('token', '') if not isinstance(token, str): token = token[0] - - keycard = keycards.KeycardToken(token, - request.getClientIP(), request.path) + keycard.token = token + keycard.arguments = request.args + keycard.path = request.path + self.debug("Asking for authentication, generic HTTP") return keycard -class HTTPGetArgumentsIssuer(Issuer): - """ - I create L{flumotion.common.keycards.KeycardHTTPGetArguments} - keycards based on an incoming L{twisted.protocols.http.Request}. - """ - - def issue(self, request): - arguments = request.args - address = request.getClientIP() - path = request.path - return keycards.KeycardHTTPGetArguments(arguments, address, path) - - BOUNCER_SOCKET = 'flumotion.component.bouncers.plug.BouncerPlug' +BUS_SOCKET = 'flumotion.component.plugs.bus.BusPlug' class HTTPAuthentication(log.Loggable): @@ -158,11 +99,14 @@ self._fdToDurationCall = {} # request fd -> IDelayedCall # for duration self._domain = None # used for auth challenge and on keycard - self._issuer = HTTPAuthIssuer() # issues keycards; default for compat + self._issuer = HTTPGenericIssuer() # issues keycards;default for compat self.bouncerName = None self.setRequesterId(component.getName()) self._defaultDuration = None # default duration to use if the keycard # doesn't specify one. + self._allowDefault = False # whether failures communicating with + # the bouncer should result in HTTP 500 + # or with allowing the connection self._pendingCleanups = [] self._keepAlive = None @@ -170,6 +114,7 @@ and self.component.plugs[BOUNCER_SOCKET]): assert len(self.component.plugs[BOUNCER_SOCKET]) == 1 self.plug = self.component.plugs[BOUNCER_SOCKET][0] + self.plug.set_expire_function(self.expireKeycards) else: self.plug = None @@ -229,19 +174,8 @@ def setDefaultDuration(self, defaultDuration): self._defaultDuration = defaultDuration - def setIssuerClass(self, issuerClass): - # FIXME: in the future, we want to make this pluggable and have it - # look up somewhere ? - if issuerClass == 'HTTPTokenIssuer': - self._issuer = HTTPTokenIssuer() - elif issuerClass == 'HTTPGetArgumentsIssuer': - self._issuer = HTTPGetArgumentsIssuer() - elif issuerClass == 'HTTPAuthIssuer': - self._issuer = HTTPAuthIssuer() - elif issuerClass == 'HTTPGenericIssuer': - self._issuer = HTTPGenericIssuer() - else: - raise ValueError("issuerClass %s not accepted" % issuerClass) + def setAllowDefault(self, allowDefault): + self._allowDefault = allowDefault def authenticate(self, request): """ @@ -312,7 +246,7 @@ self._removeKeycard(fd) def _removeKeycard(self, fd): - if self.bouncerName and fd in self._fdToKeycard: + if (self.bouncerName or self.plug) and fd in self._fdToKeycard: keycard = self._fdToKeycard[fd] del self._fdToKeycard[fd] del self._idToKeycard[keycard.id] @@ -339,6 +273,7 @@ Expire a client's connection associated with the keycard Id. """ keycard = self._idToKeycard[keycardId] + fd = keycard._fd self.debug('[fd %5d] expiring client' % fd) @@ -357,8 +292,9 @@ try: self.expireKeycard(keycardId) expired += 1 - except: - pass + except KeyError, e: + self.warn("Failed to expire keycard %r: %s", + keycardId, log.getExceptionMessage(e)) return expired ### resource.Resource methods @@ -382,7 +318,7 @@ if request.method == 'GET': fd = request.transport.fileno() - if self.bouncerName: + if self.bouncerName or self.plug: # the request was finished before the callback was executed if fd == -1: self.debug('Request interrupted before authentification ' @@ -408,16 +344,20 @@ return None def _authenticatedErrback(self, failure, request): - failure.trap(errors.UnknownComponentError, - errors.NotAuthenticatedError) + failure.trap(errors.NotAuthenticatedError) self._handleUnauthorized(request, http.UNAUTHORIZED) return failure def _defaultErrback(self, failure, request): - if failure.check(errors.UnknownComponentError, - errors.NotAuthenticatedError) is None: - # If something else went wrong, we want to disconnect the client - # and give them a 500 Internal Server Error. + if failure.check(errors.NotAuthenticatedError) is None: + # If something else went wrong, we want to either disconnect the + # client and give them a 500 Internal Server Error or just allow + # them, depending on the configuration. + self.debug("Authorization request failed: %s", + log.getFailureMessage(failure)) + if self._allowDefault: + self.debug("Authorization failed, but allowing anyway") + return None self._handleUnauthorized(request, http.INTERNAL_SERVER_ERROR) return failure @@ -426,6 +366,7 @@ (request.getClientIP(), code)) request.setHeader('content-type', 'text/html') request.setHeader('server', HTTP_SERVER_VERSION) + request.setHeader('Connection', 'close') if self._domain and code == http.UNAUTHORIZED: request.setHeader('WWW-Authenticate', 'Basic realm="%s"' % self._domain) diff -Nru flumotion-0.6.1/flumotion/component/base/__init__.py flumotion-0.9.1/flumotion/component/base/__init__.py --- flumotion-0.6.1/flumotion/component/base/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/__init__.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ Base classes for components and their UIs. """ -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/base/Makefile.am flumotion-0.9.1/flumotion/component/base/Makefile.am --- flumotion-0.6.1/flumotion/component/base/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/Makefile.am 2011-09-11 08:09:03.000000000 +0000 @@ -16,6 +16,7 @@ effectsnode.py \ feedersnode.py \ http.py \ + multiple.py \ propertiesnode.py \ scheduler.py \ statewatcher.py \ diff -Nru flumotion-0.6.1/flumotion/component/base/Makefile.in flumotion-0.9.1/flumotion/component/base/Makefile.in --- flumotion-0.6.1/flumotion/component/base/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/Makefile.in 2011-09-11 08:09:19.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -290,6 +285,7 @@ effectsnode.py \ feedersnode.py \ http.py \ + multiple.py \ propertiesnode.py \ scheduler.py \ statewatcher.py \ diff -Nru flumotion-0.6.1/flumotion/component/base/multiple.py flumotion-0.9.1/flumotion/component/base/multiple.py --- flumotion-0.6.1/flumotion/component/base/multiple.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/multiple.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,159 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gettext +import gtk +import locale +import os + +from flumotion.common import log +from flumotion.common import format as formatting + +from flumotion.common.errors import SleepingComponentError +from flumotion.common.i18n import getLL, gettexter +from flumotion.common.planet import moods + +_ = gettext.gettext +__version__ = "$Rev$" +T_ = gettexter() + +# stupid pychecker +dir(locale) + + +class ComponentOverview(gtk.Expander, log.Loggable): + + def __init__(self, label): + self.total_mem = 0.0 + self.num_cpus = 1 + gtk.Expander.__init__(self, '%s'%label) + self.set_use_markup(True) + table = gtk.Table(2, 2) + cpu_label = gtk.Label('cpu') + cpu_label.set_alignment(0, 1) + mem_label = gtk.Label('mem') + mem_label.set_alignment(0, 1) + table.attach(cpu_label, 0, 1, 0, 1, gtk.FILL, 0, 2, 2) + table.attach(mem_label, 0, 1, 1, 2, gtk.FILL, 0, 2, 2) + self.cpu = gtk.ProgressBar() + self.cpu.set_text(_('Unknown')) + table.attach(self.cpu, 1, 2, 0, 1, gtk.EXPAND|gtk.FILL, + gtk.EXPAND|gtk.FILL, 2, 2) + self.mem = gtk.ProgressBar() + self.mem.set_text(_('Unknown')) + table.attach(self.mem, 1, 2, 1, 2, gtk.EXPAND|gtk.FILL, + gtk.EXPAND|gtk.FILL, 2, 2) + self.add(table) + self.set_expanded(True) + + def update_cpu(self, fraction): + if not fraction: + fraction = 0 + self.cpu.set_fraction(fraction/self.num_cpus) + self.cpu.set_text('%.2f %%'%(fraction * 100)) + + def update_mem(self, size): + if not size: + size = _('Unknown') + fraction = 0 + else: + fraction = size / self.total_mem + size = '%sB' % formatting.formatStorage(size) + + self.mem.set_text(size) + self.mem.set_fraction(fraction) + + def set_total_memory(self, total_mem): + self.total_mem = float(total_mem) + + def set_num_cpus(self, num): + self.num_cpus = num + + +class MultipleComponentsAdminGtk(log.Loggable): + """ + I am a view of multiple components' properties. + """ + + logCategory = "admingtk" + gettextDomain = None + + def __init__(self, multistate, admin): + """ + @type multistate: {f.a.g.c.MultipleAdminComponentStates} + @param multistate: state of component this is a UI for + @type admin: L{flumotion.admin.admin.AdminModel} + @param admin: the admin model that interfaces with the manager for us + """ + self.widget = gtk.ScrolledWindow() + self.widget.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) + self.widget.set_border_width(0) + self.widget.set_shadow_type(gtk.SHADOW_NONE) + vbox = gtk.VBox(spacing=6) + vbox.set_border_width(12) + self._debugEnabled = False + self.multistate = multistate + self.name = 'multiple_components' + self.admin = admin + self.debug('creating admin gtk for state %r' % multistate) + self.uiStates = [] + self._stateValues = dict() + + for state in multistate.getComponentStates(): + co = ComponentOverview(state.get('name')) + vbox.pack_start(co, False, True) + vbox.pack_start(gtk.HSeparator(), False, True) + if state.get('mood') in [moods.lost.value, + moods.sleeping.value, + moods.sad.value]: + co.set_expanded(False) + continue + d = admin.componentCallRemote(state, 'getUIState') + d.addCallback(self.setUIState, co) + d.addErrback(lambda failure: failure.trap(SleepingComponentError)) + + self.widget.add_with_viewport(vbox) + vbox.show_all() + + def cleanup(self): + for uiState in self.uiStates: + uiState.removeListener(self) + + def setUIState(self, state, widget): + self.debug('starting listening to state %r', state) + state.addListener(self, set_=self.stateSet) + self.uiStates.append(state) + self._stateValues[state] = widget + widget.set_total_memory(state.get('total-memory', 0)) + widget.set_num_cpus(state.get('num-cpus', 1)) + for key in state.keys(): + val = state.get(key) + if val is not None: + self.stateSet(state, key, state.get(key)) + + def callRemote(self, methodName, *args, **kwargs): + return self.admin.componentCallRemote(self.state, methodName, + *args, **kwargs) + + def getWidget(self): + return self.widget + + def stateSet(self, object, key, value): + if key == 'cpu-percent': + self._stateValues[object].update_cpu(value) + elif key == 'virtual-size': + self._stateValues[object].update_mem(value) diff -Nru flumotion-0.6.1/flumotion/component/base/propertiesnode.py flumotion-0.9.1/flumotion/component/base/propertiesnode.py --- flumotion-0.6.1/flumotion/component/base/propertiesnode.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/propertiesnode.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -33,13 +29,16 @@ from flumotion.component.base.baseadminnode import BaseAdminGtkNode _ = gettext.gettext -__version__ = "$Rev: 7161 $" +__version__ = "$Rev$" class PropertiesAdminGtkNode(BaseAdminGtkNode): gladeFile = os.path.join('flumotion', 'component', 'base', 'properties.glade') + uiStateHandlers = None + _properties = {} + def __init__(self, state, admin): BaseAdminGtkNode.__init__(self, state, admin, title=_("Properties")) @@ -54,12 +53,24 @@ self.widget.pack_start(self.properties, False, False) self.properties.show() - properties = self.state.get('config')['properties'] + self._reloadProperties(self.state.get('config')['properties']) + return self.widget + + # IStateListener Interface + + def stateSet(self, object, key, value): + if key == 'properties': + self._reloadProperties(value) + + ### Private methods + + def _reloadProperties(self, properties): + if properties is None: + return + self.properties.clear() propertyNames = properties.keys()[:] propertyNames.sort() for name in propertyNames: self.properties.append( Settable(name=name, value=properties[name])) - - return self.widget diff -Nru flumotion-0.6.1/flumotion/component/base/scheduler.py flumotion-0.9.1/flumotion/component/base/scheduler.py --- flumotion-0.6.1/flumotion/component/base/scheduler.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/scheduler.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,33 +1,31 @@ # -*- test-case-name: flumotion.test.test_component_base_scheduler -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + +import os import time import datetime from twisted.internet import reactor -from flumotion.common import log, eventcalendar +from flumotion.common import log, eventcalendar, tz from flumotion.component.base import watcher -__version__ = "$Rev: 7587 $" +__version__ = "$Rev$" def _timedeltaToSeconds(td): @@ -88,7 +86,7 @@ # we want to make sure we use the same when for getting old and new # instances if it wasn't specified if not when: - when = datetime.datetime.now(eventcalendar.UTC) + when = datetime.datetime.now(tz.UTC) # FIXME: convert Content lists to dicts to speed things up # because they are used as a lookup inside loops @@ -103,6 +101,7 @@ # we do comparison of instances by content, since, while the timing # information may have changed, if the content is still the same, # then the event is still considered 'active' + self._calendar = calendar for instance in oldInstances: if instance.event.content not in newInstancesContent: self.debug( @@ -117,7 +116,6 @@ instance, instance.event.content) self._eventInstanceStarted(instance) - self._calendar = calendar self._reschedule() def getPoints(self, when=None): @@ -125,10 +123,9 @@ Get all points on this scheduler's event horizon. """ if not when: - when = datetime.datetime.now(eventcalendar.LOCAL) + when = datetime.datetime.now(tz.LOCAL) self.debug('getPoints at %s', str(when)) - earliest = when + self.windowSize points = self._calendar.getPoints(when, self.windowSize) @@ -197,7 +194,7 @@ self.debug("reschedule events") self._cancelScheduledCalls() - now = datetime.datetime.now(eventcalendar.LOCAL) + now = datetime.datetime.now(tz.LOCAL) def _getNextPoints(): # get the next list of points in time that all start at the same @@ -294,11 +291,15 @@ self._parseFromFile(fileObj) - if hasattr(fileObj, 'name'): + if hasattr(fileObj, 'name') and os.path.isfile(fileObj.name): def fileChanged(filename): self.info("ics file %s changed", filename) - self._parseFromFile(open(filename, 'r')) + try: + self._parseFromFile(open(filename, 'r')) + except: + self.warning("error parsing ics file %s", filename) + raise self.watcher = watcher.FilesWatcher([fileObj.name]) fileObj.close() diff -Nru flumotion-0.6.1/flumotion/component/base/statewatcher.py flumotion-0.9.1/flumotion/component/base/statewatcher.py --- flumotion-0.6.1/flumotion/component/base/statewatcher.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/statewatcher.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. # this class is a bit of an experiment diff -Nru flumotion-0.6.1/flumotion/component/base/watcher.py flumotion-0.9.1/flumotion/component/base/watcher.py --- flumotion-0.6.1/flumotion/component/base/watcher.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/base/watcher.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,24 +1,21 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os import time @@ -26,7 +23,7 @@ from flumotion.common import log -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class BaseWatcher(log.Loggable): @@ -97,7 +94,13 @@ """ for s in self.subscribers.values(): if s[event]: - s[event](*args, **kwargs) + # Exceptions raised by subscribers need to be catched to + # continue polling for changes + try: + s[event](*args, **kwargs) + except Exception, e: + self.warning("A callback for event %s raised an error: %s" + % (event, log.getExceptionMessage(e))) # FIXME: this API has tripped up two people thus far, including its # author. make subscribe() call start() if necessary? diff -Nru flumotion-0.6.1/flumotion/component/bouncers/admin_gtk.py flumotion-0.9.1/flumotion/component/bouncers/admin_gtk.py --- flumotion-0.6.1/flumotion/component/bouncers/admin_gtk.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -26,13 +22,16 @@ from twisted.internet import defer -from flumotion.common import errors, componentui -from flumotion.twisted import flavors +from flumotion.common import errors + from flumotion.component.base.admin_gtk import BaseAdminGtk from flumotion.component.base.baseadminnode import BaseAdminGtkNode +# register serializable +from flumotion.common import componentui + _ = gettext.gettext -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" ( COLUMN_ID, COLUMN_USER, diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/base.py flumotion-0.9.1/flumotion/component/bouncers/algorithms/base.py --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/base.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/base.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,39 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + + +from flumotion.component.plugs import base + + +class BouncerAlgorithm(base.ComponentPlug): + """ + The base class for bouncer algorithm plugs. + """ + + volatile = True + + def get_namespace(self): + return self.__class__.__name__.lower() + + def authenticate(self, keycard): + raise NotImplementedError("Subclass does not implement authenticate()") + + def set_keycard_store(self, keycards): + self.keycards = keycards + + def set_expire_function(self, expire): + self.expire = expire diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/base.xml flumotion-0.9.1/flumotion/component/bouncers/algorithms/base.xml --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/base.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/base.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/icalbouncer.py flumotion-0.9.1/flumotion/component/bouncers/algorithms/icalbouncer.py --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/icalbouncer.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/icalbouncer.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,149 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_icalbouncer -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +""" +A bouncer that only lets in during an event scheduled with an ical file. +""" + +from datetime import datetime, timedelta + +from twisted.internet import defer + +from flumotion.common import keycards, messages, errors +from flumotion.common import log, documentation +from flumotion.common import eventcalendar, tz +from flumotion.common.i18n import N_, gettexter +from flumotion.component.base import scheduler +from flumotion.component.bouncers.algorithms import base + +__all__ = ['IcalBouncerAlgorithm'] +__version__ = "$Rev$" +T_ = gettexter() + + +class IcalBouncerAlgorithm(base.BouncerAlgorithm): + + logCategory = 'icalbouncer' + events = [] + maxKeyCardDuration = timedelta(days=1) + + def get_namespace(self): + return 'icalbouncer' + + def start(self, component): + self.props = self.args['properties'] + self.iCalScheduler = None + self.subscriptionToken = None + self.check_properties(component) + self.setup(component) + + def check_properties(self, component): + + def missingModule(moduleName): + m = messages.Error(T_(N_( + "To use the iCalendar bouncer you need to have " + "the '%s' module installed.\n"), moduleName), + mid='error-python-%s' % moduleName) + documentation.messageAddPythonInstall(m, moduleName) + component.addMessage(m) + + if not eventcalendar.HAS_ICALENDAR: + missingModule('icalendar') + if not eventcalendar.HAS_DATEUTIL: + missingModule('dateutil') + + def setup(self, component): + self._icsfile = self.props['file'] + + try: + handle = open(self._icsfile, 'r') + except IOError, e: + m = messages.Error(T_(N_( + "Failed to open iCalendar file '%s'. " + "Check permissions on that file."), self._icsfile), + mid='error-icalbouncer-file') + component.addMessage(m) + raise errors.ComponentSetupHandledError() + + try: + self.iCalScheduler = scheduler.ICalScheduler(handle) + except (ValueError, IndexError, KeyError), e: + m = messages.Error(T_(N_( + "Error parsing ical file '%s'."), self._icsfile), + debug=log.getExceptionMessage(e), + mid="error-icalbouncer-file") + component.addMessage(m) + raise errors.ComponentSetupHandledError() + self.subscriptionToken = \ + self.iCalScheduler.subscribe(self._do_nothing, self._eventEnded) + + def authenticate(self, keycard): + self.debug('authenticating keycard') + + # need to check if inside an event time + cal = self.iCalScheduler.getCalendar() + now = datetime.now(tz.UTC) + eventInstances = cal.getActiveEventInstances() + if not eventInstances: + keycard.state = keycards.REFUSED + self.info("failed in authentication, outside hours") + return None + last_end = now + while eventInstances: + # decorate-sort-undecorate to get the event ending last + instance = max([(ev.end, ev) for ev in eventInstances])[1] + duration = instance.end - now + + if duration > self.maxKeyCardDuration: + duration = self.maxKeyCardDuration + break + if last_end == instance.end: + break + eventInstances = cal.getActiveEventInstances(instance.end) + last_end = instance.end + + durationSecs = duration.days * 86400 + duration.seconds + keycard.duration = durationSecs + keycard.state = keycards.AUTHENTICATED + self.info("authenticated login, duration %d seconds", + durationSecs) + return keycard + + def stop(self, component): + # we might not have an iCalScheduler, if something went wrong + # during do_setup or do_check + if self.iCalScheduler: + self.iCalScheduler.cleanup() + if self.subscriptionToken: + self.iCalScheduler.unsubscribe(self.subscriptionToken) + self.subscriptionToken = None + + def _eventEnded(self, event): + self.debug("_eventEnded") + if not event.start < datetime.now(tz.UTC) < event.end: + return + cal = self.iCalScheduler.getCalendar() + eventInstances = cal.getActiveEventInstances() + if not eventInstances: + self.debug("We're now outside hours, revoking all keycards") + self._expire_all_keycards() + + def _expire_all_keycards(self): + self.expire(self.keycards.keys()) + + def _do_nothing(self, _): + pass diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/icalbouncer.xml flumotion-0.9.1/flumotion/component/bouncers/algorithms/icalbouncer.xml --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/icalbouncer.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/icalbouncer.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/__init__.py flumotion-0.9.1/flumotion/component/bouncers/algorithms/__init__.py --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,22 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +""" +Bouncer components perform authentication services for other components. +""" + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/ipbouncer.py flumotion-0.9.1/flumotion/component/bouncers/algorithms/ipbouncer.py --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/ipbouncer.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/ipbouncer.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,81 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_bouncers_ipbouncer -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +""" +A bouncer that authenticates based on the IP address of the remote side, +as seen by the bouncer. +""" + +from flumotion.common import keycards, messages, errors, log, netutils +from flumotion.common.i18n import N_, gettexter +from flumotion.component.bouncers.algorithms import base + +__all__ = ['IPBouncerAlgorithm'] +__version__ = "$Rev$" +T_ = gettexter() + + +class IPBouncerAlgorithm(base.BouncerAlgorithm): + + logCategory = 'ip-bouncer' + volatile = False + + def get_namespace(self): + return 'ipbouncer' + + def start(self, component): + self.props = self.args['properties'] + self.deny_default = self.props.get('deny-default', True) + + self.allows = netutils.RoutingTable() + self.denies = netutils.RoutingTable() + for p, t in (('allow', self.allows), ('deny', self.denies)): + for s in self.props.get(p, []): + try: + ip, mask = s.split('/') + t.addSubnet(True, ip, int(mask)) + except Exception, e: + m = messages.Error( + T_(N_("Invalid value for property %r: %s"), p, s), + log.getExceptionMessage(e), + mid='match-type') + component.addMessage(m) + raise errors.ComponentSetupHandledError() + + def authenticate(self, keycard): + ip = keycard.getData()['address'] + self.debug('authenticating keycard from requester %s', ip) + + if ip is None: + self.warning('could not get address of remote') + allowed = False + elif self.deny_default: + allowed = (self.allows.route(ip) + and not self.denies.route(ip)) + else: + allowed = (self.allows.route(ip) + or not self.denies.route(ip)) + + if not allowed: + self.info('denied login from ip address %s', + keycard.address) + return None + else: + keycard.state = keycards.AUTHENTICATED + self.debug('allowed login from ip address %s', + keycard.address) + return keycard diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/ipbouncer.xml flumotion-0.9.1/flumotion/component/bouncers/algorithms/ipbouncer.xml --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/ipbouncer.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/ipbouncer.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/Makefile.am flumotion-0.9.1/flumotion/component/bouncers/algorithms/Makefile.am --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ + include $(top_srcdir)/common/python.mk + +componentdir = $(libdir)/flumotion/python/flumotion/component/bouncers/algorithms +component_PYTHON = \ + __init__.py \ + base.py \ + icalbouncer.py \ + ipbouncer.py \ + tokentest.py + +component_DATA = base.xml ipbouncer.xml icalbouncer.xml tokentest.xml + +TAGS_FILES = $(component_PYTHON) + +clean-local: + rm -rf *.pyc *.pyo + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/Makefile.in flumotion-0.9.1/flumotion/component/bouncers/algorithms/Makefile.in --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/Makefile.in 2011-09-11 08:09:19.000000000 +0000 @@ -0,0 +1,534 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = flumotion/component/bouncers/algorithms +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +componentdir = $(libdir)/flumotion/python/flumotion/component/bouncers/algorithms +component_PYTHON = \ + __init__.py \ + base.py \ + icalbouncer.py \ + ipbouncer.py \ + tokentest.py + +component_DATA = base.xml ipbouncer.xml icalbouncer.xml tokentest.xml +TAGS_FILES = $(component_PYTHON) +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/bouncers/algorithms/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/bouncers/algorithms/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + include $(top_srcdir)/common/python.mk + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/tokentest.py flumotion-0.9.1/flumotion/component/bouncers/algorithms/tokentest.py --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/tokentest.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/tokentest.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,53 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_bouncers_ipbouncer -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +""" +A test token bouncer. +""" + +from flumotion.common import keycards +from flumotion.component.bouncers.algorithms import base + +__version__ = "$Rev$" + + +class TokenTestAlgorithm(base.BouncerAlgorithm): + + logCategory = 'tokentestbouncer' + volatile = False + + def get_namespace(self): + return 'tokentest' + + def start(self, component): + self._authtoken = self.args['properties']['authorized-token'] + + def authenticate(self, keycard): + keycard_data = keycard.getData() + self.debug('authenticating keycard from requester %s with token %s', + keycard_data['address'], keycard_data['token']) + + if keycard_data['token'] == self._authtoken: + # authenticated, so return the keycard with state authenticated + keycard.state = keycards.AUTHENTICATED + self.info('authenticated login of "%s" from ip address %s', + keycard.token, keycard.address) + return keycard + + keycard.state = keycards.REFUSED + self.info('keycard %r unauthorized, returning None', keycard) + return None diff -Nru flumotion-0.6.1/flumotion/component/bouncers/algorithms/tokentest.xml flumotion-0.9.1/flumotion/component/bouncers/algorithms/tokentest.xml --- flumotion-0.6.1/flumotion/component/bouncers/algorithms/tokentest.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/algorithms/tokentest.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/base.py flumotion-0.9.1/flumotion/component/bouncers/base.py --- flumotion-0.6.1/flumotion/component/bouncers/base.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/base.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,20 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +BOUNCER_ALGORITHM_SOCKET = ('flumotion.component.bouncers.' + 'algorithms.BouncerAlgorithm') +BOUNCER_SOCKET = 'flumotion.component.bouncers.plug.BouncerPlug' diff -Nru flumotion-0.6.1/flumotion/component/bouncers/base.xml flumotion-0.9.1/flumotion/component/bouncers/base.xml --- flumotion-0.6.1/flumotion/component/bouncers/base.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/base.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/bouncer.py flumotion-0.9.1/flumotion/component/bouncers/bouncer.py --- flumotion-0.6.1/flumotion/component/bouncers/bouncer.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/bouncer.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,735 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -""" -Base class and implementation for bouncer components, who perform -authentication services for other components. - -Bouncers receive keycards, defined in L{flumotion.common.keycards}, and -then authenticate them. - -Passing a keycard over a PB connection will copy all of the keycard's -attributes to a remote side, so that bouncer authentication can be -coupled with PB. Bouncer implementations have to make sure that they -never store sensitive data as an attribute on a keycard. - -Keycards have three states: REQUESTING, AUTHENTICATED, and REFUSED. When -a keycard is first passed to a bouncer, it has the state REQUESTING. -Bouncers should never read the 'state' attribute on a keycard for any -authentication-related purpose, since it comes from the remote side. -Typically, a bouncer will only set the 'state' attribute to -AUTHENTICATED or REFUSED once it has the information to make such a -decision. - -Authentication of keycards is performed in the authenticate() method, -which takes a keycard as an argument. The Bouncer base class' -implementation of this method will perform some common checks (e.g., is -the bouncer enabled, is the keycard of the correct type), and then -dispatch to the do_authenticate method, which is expected to be -overridden by subclasses. - -Implementations of do_authenticate should eventually return a keycard -with the state AUTHENTICATED or REFUSED. It is acceptable for this -method to return either a keycard or a deferred that will eventually -return a keycard. - -FIXME: Currently, a return value of 'None' is treated as rejecting the -keycard. This is unintuitive. - -Challenge-response authentication may be implemented in -do_authenticate(), by returning a keycard still in the state REQUESTING -but with extra attributes annotating the keycard. The remote side would -then be expected to set a response on the card, resubmit, at which point -authentication could be performed. The exact protocol for this depends -on the particular keycard class and set of bouncers that can -authenticate that keycard class. - -It is expected that a bouncer implementation keeps references on the -currently active set of authenticated keycards. These keycards can then -be revoked at any time by the bouncer, which will be effected through an -'expireKeycard' call. When the code that requested the keycard detects -that the keycard is no longer necessary, it should notify the bouncer -via calling 'removeKeycardId'. - -The above process is leak-prone, however; if for whatever reason, the -remote side is unable to remove the keycard, the keycard will never be -removed from the bouncer's state. For that reason there is a more robust -method: if the keycard has a 'ttl' attribute, then it will be expired -automatically after 'keycard.ttl' seconds have passed. The remote side -is then responsible for periodically telling the bouncer which keycards -are still valid via the 'keepAlive' call, which resets the TTL on the -given set of keycards. - -Note that with automatic expiry via the TTL attribute, it is still -preferred, albeit not strictly necessary, that callers of authenticate() -call removeKeycardId when the keycard is no longer used. -""" - -import random -import time - -from twisted.internet import defer, reactor - -from flumotion.common import interfaces, keycards, errors, python -from flumotion.common.poller import Poller -from flumotion.common.componentui import WorkerComponentUIState - -from flumotion.component import component -from flumotion.twisted import flavors, credentials - -__all__ = ['Bouncer'] -__version__ = "$Rev: 7990 $" - -EXPIRE_BLOCK_SIZE = 100 - - -class BouncerMedium(component.BaseComponentMedium): - - logCategory = 'bouncermedium' - - def remote_authenticate(self, keycard): - """ - Authenticates the given keycard. - - @type keycard: L{flumotion.common.keycards.Keycard} - """ - return self.comp.authenticate(keycard) - - def remote_keepAlive(self, issuerName, ttl): - """ - Resets the expiry timeout for keycards issued by issuerName. - - @param issuerName: the issuer for which keycards should be kept - alive; that is to say, keycards with the - attribute 'issuerName' set to this value will - have their ttl values reset. - @type issuerName: str - @param ttl: the new expiry timeout - @type ttl: number - """ - return self.comp.keepAlive(issuerName, ttl) - - def remote_removeKeycardId(self, keycardId): - try: - self.comp.removeKeycardId(keycardId) - # FIXME: at least have an exception name please - except KeyError: - self.warning('Could not remove keycard id %s' % keycardId) - - def remote_expireKeycardId(self, keycardId): - """ - Called by bouncer views to expire keycards. - """ - return self.comp.expireKeycardId(keycardId) - - def remote_expireKeycardIds(self, keycardIds): - """ - Called by bouncer views to expire multiple keycards. - """ - return self.comp.expireKeycardIds(keycardIds) - - def remote_setEnabled(self, enabled): - return self.comp.setEnabled(enabled) - - def remote_getEnabled(self): - return self.comp.getEnabled() - - -class Bouncer(component.BaseComponent): - """ - I am the base class for all bouncers. - - @cvar keycardClasses: tuple of all classes of keycards this bouncer can - authenticate, in order of preference - @type keycardClasses: tuple of L{flumotion.common.keycards.Keycard} - class objects - """ - keycardClasses = () - componentMediumClass = BouncerMedium - logCategory = 'bouncer' - - KEYCARD_EXPIRE_INTERVAL = 2 * 60 # expire every 2 minutes - - def init(self): - self._idCounter = 0 - self._idFormat = time.strftime('%Y%m%d%H%M%S-%%d') - self._keycards = {} # keycard id -> Keycard - - self._expirer = Poller(self._expire, - self.KEYCARD_EXPIRE_INTERVAL, - start=False) - self.enabled = True - - def setDomain(self, name): - self.domain = name - - def getDomain(self): - return self.domain - - def typeAllowed(self, keycard): - """ - Verify if the keycard is an instance of a Keycard class specified - in the bouncer's keycardClasses variable. - """ - return isinstance(keycard, self.keycardClasses) - - def setEnabled(self, enabled): - - def callAndPassthru(result, method, *args): - method(*args) - return result - - if not enabled and self.enabled: - # If we were enabled and are being set to disabled, eject the warp - # core^w^w^w^wexpire all existing keycards - self.enabled = False - self._expirer.stop() - d = self.expireAllKeycards() - d.addCallback(callAndPassthru, self.on_disabled) - return d - self.enabled = enabled - d = defer.succeed(0) - d.addCallback(callAndPassthru, self.on_enabled) - return d - - def getEnabled(self): - return self.enabled - - def do_stop(self): - return self.setEnabled(False) - - def authenticate(self, keycard): - if not self.typeAllowed(keycard): - self.warning('keycard %r is not an allowed keycard class', keycard) - return None - - if not self.do_validate(keycard): - self.warning('keycard %r is not a valid keycard instance', keycard) - return None - - if self.enabled: - if not self._expirer.running and hasattr(keycard, 'ttl'): - self.debug('installing keycard timeout poller') - self._expirer.start() - return defer.maybeDeferred(self.do_authenticate, keycard) - else: - self.debug("Bouncer disabled, refusing authentication") - return None - - def do_expireKeycards(self, elapsed): - """ - Override to expire keycards managed by sub-classes. - - @param elapsed: time in second since the last expiration call. - @type elapsed: int - @returns: if there is more keycard to expire. If False is returned, - the expirer poller MAY be stopped. - @rtype: bool - """ - for k in self._keycards.values(): - if hasattr(k, 'ttl'): - k.ttl -= elapsed - if k.ttl <= 0: - self.expireKeycardId(k.id) - return len(self._keycards) > 0 - - def do_validate(self, keycard): - """ - Override to check keycards before authentication steps. - Should return True if the keycard is valid, False otherwise. - #FIXME: This belong to the base bouncer class - - @param keycard: the keycard that should be validated - before authentication - @type keycard: flumotion.common.keycards.Keycard - @returns: True if the keycard is accepted, False otherwise - @rtype: bool - """ - return True - - def do_authenticate(self, keycard): - """ - Must be overridden by subclasses. - - Authenticate the given keycard. - Return the keycard with state AUTHENTICATED to authenticate, - with state REQUESTING to continue the authentication process, - or REFUSED to deny the keycard or a deferred which should - have the same eventual value. - - FIXME: Currently, a return value of 'None' is treated - as rejecting the keycard. This is unintuitive. - - FIXME: in fact, for authentication sessions like challenge/response, - returning a keycard with state REFUSED instead of None - will not work properly and may enter in an asynchronous infinit loop. - """ - raise NotImplementedError("authenticate not overridden") - - def on_keycardAdded(self, keycard): - """ - Override to update sub-class specific data related to keycards. - Called when the base bouncer accepts and references a new keycard. - """ - - def on_keycardRemoved(self, keycard): - """ - Override to cleanup sub-class specific data related to keycards. - Called when the base bouncer has cleanup his references to a keycard. - """ - - def on_enabled(self): - """ - Override to initialize sub-class specific data - when the bouncer is enabled. - """ - - def on_disabled(self): - """ - Override to cleanup sub-class specific data - when the bouncer is disabled. - """ - - def hasKeycard(self, keycard): - return keycard in self._keycards.values() - - def generateKeycardId(self): - # FIXME: what if it already had one ? - # FIXME: deal with wraparound ? - keycardId = self._idFormat % self._idCounter - self._idCounter += 1 - return keycardId - - def addKeycard(self, keycard): - """ - Adds a keycard to the bouncer. - Can be called with the same keycard more than one time. - If the keycard has already been added successfully, - adding it again will succeed and return True. - - @param keycard: the keycard to add. - @return: if the bouncer accepts the keycard. - """ - # give keycard an id and store it in our hash - if keycard.id in self._keycards: - # already in there - return True - - keycardId = self.generateKeycardId() - keycard.id = keycardId - - if hasattr(keycard, 'ttl') and keycard.ttl <= 0: - self.log('immediately expiring keycard %r', keycard) - return False - - self._addKeycard(keycard) - return True - - def removeKeycard(self, keycard): - if not keycard.id in self._keycards: - raise KeyError - - del self._keycards[keycard.id] - self.on_keycardRemoved(keycard) - - self.info("removed keycard with id %s" % keycard.id) - - def removeKeycardId(self, keycardId): - self.debug("removing keycard with id %s" % keycardId) - if not keycardId in self._keycards: - raise KeyError - - keycard = self._keycards[keycardId] - self.removeKeycard(keycard) - - def keepAlive(self, issuerName, ttl): - for k in self._keycards.itervalues(): - if hasattr(k, 'issuerName') and k.issuerName == issuerName: - k.ttl = ttl - - def expireAllKeycards(self): - return self.expireKeycardIds(self._keycards.keys()) - - def expireKeycardId(self, keycardId): - self.log("expiring keycard with id %r", keycardId) - if not keycardId in self._keycards: - raise KeyError - - keycard = self._keycards[keycardId] - self.removeKeycardId(keycardId) - - if self.medium: - return self.medium.callRemote('expireKeycard', - keycard.requesterId, keycard.id) - else: - return defer.succeed(None) - - def expireKeycardIds(self, keycardIds): - self.log("expiring keycards with id %r", keycardIds) - d = defer.Deferred() - self._expireNextKeycardBlock(0, keycardIds, d) - return d - - def _expireNextKeycardBlock(self, total, keycardIds, finished): - keycardBlock = keycardIds[:EXPIRE_BLOCK_SIZE] - keycardIds = keycardIds[EXPIRE_BLOCK_SIZE:] - idByReq = {} - - for keycardId in keycardBlock: - if keycardId in self._keycards: - keycard = self._keycards[keycardId] - requesterId = keycard.requesterId - idByReq.setdefault(requesterId, []).append(keycardId) - self.removeKeycardId(keycardId) - - if not (idByReq and self.medium): - finished.callback(total) - return - - defs = [self.medium.callRemote('expireKeycards', rid, ids) - for rid, ids in idByReq.items()] - dl = defer.DeferredList(defs, consumeErrors=True) - - def countExpirations(results, total): - return sum([v for s, v in results if s and v]) + total - - dl.addCallback(countExpirations, total) - dl.addCallback(self._expireNextKeycardBlock, keycardIds, finished) - - def _addKeycard(self, keycard): - """ - Adds a keycard without checking. - Used by sub-class knowing what they do. - """ - self._keycards[keycard.id] = keycard - self.on_keycardAdded(keycard) - - self.debug("added keycard with id %s, ttl %r", keycard.id, - getattr(keycard, 'ttl', None)) - - def _expire(self): - if not self.do_expireKeycards(self._expirer.timeout): - if self._expirer.running: - self.debug('no more keycards, removing timeout poller') - self._expirer.stop() - - -class AuthSessionBouncer(Bouncer): - """ - I am a bouncer that handle pending authentication sessions. - I am storing the last keycard of an authenticating session. - """ - - def init(self): - # Keycards pending to be authenticated - self._sessions = {} # keycard id -> (ttl, data) - - def on_disabled(self): - # Removing all pending authentication - self._sessions.clear() - - def do_extractKeycardInfo(self, keycard, oldData): - """ - Extracts session info from a keycard. - Used by updateAuthSession to store session info. - Must be overridden by subclasses. - """ - raise NotImplementedError() - - def hasAuthSession(self, keycard): - """ - Tells if a keycard is related to a pending authentication session. - It basically check if the id of the keycard is known. - - @param keycard: the keycard to check - @type keycard: flumotion.common.keycards.Keycard - @returns: if a pending authentication session associated - with the specified keycard exists. - - @rtype: bool - """ - return (keycard.id is not None) and (keycard.id in self._sessions) - - def getAuthSessionInfo(self, keycard): - """ - @return: the last updated keycard for the authentication session - associated with the specified keycard - @rtype: flumotion.common.keycards.Keycard or None - """ - data = keycard.id and self._sessions.get(keycard.id, None) - return data and data[1] - - def startAuthSession(self, keycard): - """ - Starts an authentication session with a keycard. - The keycard id will be generated and set. - The session info will be extracted from the keycard - by calling the method do_extractKeycardInfo, and can - be retrieved by calling getAuthSessionInfo. - - If a the keycard already have and id, and there is - an authentication session with this id, the session info - is updated from the keycard, and it return True. - - @param keycard: the keycard to update from. - @type keycard: flumotion.common.keycards.Keycard - @return: if the bouncer accepts the keycard. - """ - # Check if there is already an authentication session - if self.hasAuthSession(keycard): - # Updating the authentication session data - self._updateInfoFromKeycard(keycard) - return True - - if keycard.id: - self.warning("keycard %r already has an id, but no " - "authentication session", keycard) - keycard.state = keycards.REFUSED - return False - - if hasattr(keycard, 'ttl') and keycard.ttl <= 0: - self.log('immediately expiring keycard %r', keycard) - keycard.state = keycards.REFUSED - return False - - # Generate an id for the authentication session - keycardId = self.generateKeycardId() - keycard.id = keycardId - - self._updateInfoFromKeycard(keycard) - - self.debug("started authentication session with with id %s, ttl %r", - keycard.id, getattr(keycard, 'ttl', None)) - return True - - def updateAuthSession(self, keycard): - """ - Updates an authentication session with the last keycard. - The session info will be extracted from the keycard - by calling the method do_extractKeycardInfo, and can - be retrieved by calling getAuthSessionInfo. - - @param keycard: the keycard to update from. - @type keycard: flumotion.common.keycards.Keycard - """ - # Check if there is already an authentication session - if self.hasAuthSession(keycard): - # Updating the authentication session data - self._updateInfoFromKeycard(keycard) - else: - keycard.state = keycards.REFUSED - - def cancelAuthSession(self, keycard): - """ - Cancels the authentication session associated - with the specified keycard. - Used when doing challenge/response authentication. - @raise KeyError: when there is no session associated with the keycard. - """ - keycard.state = keycards.REFUSED - del self._sessions[keycard.id] - - def confirmAuthSession(self, keycard): - """ - Confirms the authentication session represented - by the specified keycard is authenticated. - This will add the specified keycard to the - bouncer keycard list like addKeycard would do - but without changing the keycard id. - The authentication session data is cleaned up. - - If the bouncer already have a keycard with the same id, - the authentication is confirmed but the bouncer keycard - is NOT updated. FIXME: is it what we want ? ? ? - - @param keycard: the keycard to add to the bouncer list. - @type keycard: flumotion.common.keycards.Keycard - @return: if the bouncer accepts the keycard. - """ - keycardId = keycard.id - - if keycardId not in self._sessions: - self.warning("unknown authentication session, or pending keycard " - "expired for id %s", keycardId) - keycard.state = keycards.REFUSED - return False - - del self._sessions[keycardId] - - # Check if there already an authenticated keycard with the same id - if keycardId in self._keycards: - self.debug("confirming an authentication session we already " - "know about with id %s", keycardId) - keycard.state = keycards.AUTHENTICATED - return True - - # check if the keycard already expired - if hasattr(keycard, 'ttl') and keycard.ttl <= 0: - self.log('immediately expiring keycard %r', keycard) - keycard.state = keycards.REFUSED - return False - - keycard.state = keycards.AUTHENTICATED - self._addKeycard(keycard) - return True - - def updateAuthSessionInfo(self, keycard, data): - """ - Updates the authentication session data. - Can be used bu subclasses to modify the data directly. - """ - ttl, _oldData = self._sessions.get(keycard.id, (None, None)) - if ttl is None: - ttl = getattr(keycard, 'ttl', None) - self._sessions[keycard.id] = (ttl, data) - - def do_expireKeycards(self, elapsed): - cont = Bouncer.do_expireKeycards(self, elapsed) - for id, (ttl, data) in self._sessions.items(): - if ttl is not None: - ttl -= elapsed - self._sessions[id] = (ttl, data) - if ttl <= 0: - del self._sessions[id] - - return cont and len(self._sessions) > 0 - - def _updateInfoFromKeycard(self, keycard): - oldData = self.getAuthSessionInfo(keycard) - newData = self.do_extractKeycardInfo(keycard, oldData) - self.updateAuthSessionInfo(keycard, newData) - - -class TrivialBouncer(Bouncer): - """ - A very trivial bouncer implementation. - - Useful as a concrete bouncer class for which all users are - accepted whenever the bouncer is enabled. - """ - keycardClasses = (keycards.KeycardGeneric, ) - - def do_authenticate(self, keycard): - if self.addKeycard(keycard): - keycard.state = keycards.AUTHENTICATED - else: - keycard.state = keycards.REFUSED - return keycard - - -class ChallengeResponseBouncer(AuthSessionBouncer): - """ - A base class for Challenge-Response bouncers - """ - - challengeResponseClasses = () - - def init(self): - self._checker = None - self._challenges = {} - self._db = {} - - def setChecker(self, checker): - self._checker = checker - - def addUser(self, user, salt, *args): - self._db[user] = salt - self._checker.addUser(user, *args) - - def do_extractKeycardInfo(self, keycard, oldData): - return getattr(keycard, 'challenge', None) - - def _requestAvatarIdCallback(self, PossibleAvatarId, keycard): - if not self.hasAuthSession(keycard): - # The session expired - keycard.state = keycards.REFUSED - return None - - # authenticated, so return the keycard with state authenticated - if not keycard.avatarId: - keycard.avatarId = PossibleAvatarId - self.info('authenticated login of "%s"' % keycard.avatarId) - self.debug('keycard %r authenticated, id %s, avatarId %s' % ( - keycard, keycard.id, keycard.avatarId)) - self.confirmAuthSession(keycard) - keycard.state = keycards.AUTHENTICATED - return keycard - - def _requestAvatarIdErrback(self, failure, keycard): - if not self.hasAuthSession(keycard): - # The session expired - keycard.state = keycards.REFUSED - return None - - failure.trap(errors.NotAuthenticatedError) - # FIXME: we want to make sure the "None" we return is returned - # as coming from a callback, ie the deferred - self.info('keycard %r refused, Unauthorized' % keycard) - self.cancelAuthSession(keycard) - keycard.state = keycards.REFUSED - return None - - def do_authenticate(self, keycard): - if isinstance(keycard, self.challengeResponseClasses): - # Check if we need to challenge it - if not self.hasAuthSession(keycard): - if not self.startAuthSession(keycard): - # Keycard refused right away - keycard.state = keycards.REFUSED - return None - self.debug('putting challenge on keycard %r' % keycard) - keycard.challenge = credentials.cryptChallenge() - if keycard.username in self._db: - keycard.salt = self._db[keycard.username] - else: - # random-ish salt, otherwise it's too obvious - string = str(random.randint(pow(10, 10), pow(10, 11))) - md = python.md5() - md.update(string) - keycard.salt = md.hexdigest()[:2] - self.debug("user not found, inventing bogus salt") - self.debug("salt %s, storing challenge for id %s" - % (keycard.salt, keycard.id)) - self.updateAuthSession(keycard) - return keycard - else: - # Check if the challenge has been tampered with - challenge = self.getAuthSessionInfo(keycard) - if challenge != keycard.challenge: - self.info('keycard %r refused, challenge tampered with' - % keycard) - self.cancelAuthSession(keycard) - keycard.state = keycards.REFUSED - return None - else: - # Not a challenge/response authentication. - # creating a temporary session to have a keycard id - if not self.startAuthSession(keycard): - # Keycard refused right away - keycard.state = keycards.REFUSED - return None - - # use the checker - self.debug('submitting keycard %r to checker' % keycard) - d = self._checker.requestAvatarId(keycard) - d.addCallback(self._requestAvatarIdCallback, keycard) - d.addErrback(self._requestAvatarIdErrback, keycard) - return d diff -Nru flumotion-0.6.1/flumotion/component/bouncers/bouncer.xml flumotion-0.9.1/flumotion/component/bouncers/bouncer.xml --- flumotion-0.6.1/flumotion/component/bouncers/bouncer.xml 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/bouncer.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru flumotion-0.6.1/flumotion/component/bouncers/combinator.py flumotion-0.9.1/flumotion/component/bouncers/combinator.py --- flumotion-0.6.1/flumotion/component/bouncers/combinator.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/combinator.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,271 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +""" +A bouncer-algorithm combinator, using the pyparsing module and a simple logic +expression language. +""" + +try: + import pyparsing +except ImportError: + pyparsing = None + +from twisted.internet import defer + +from flumotion.common import keycards, log + + +class ParseException(Exception): + """ + Error parsing combination specification. + + @cvar line: Line that triggered the error. + @type line: string + """ + + +class CombinatorNode(object, log.Loggable): + + logCategory = "combinatornode" + + +class NotNode(CombinatorNode): + + logCategory = "notnode" + + def __init__(self, tokens): + self.child = tokens[0][1] + self.debug("creating combinator node using %r", self.child) + + def evaluate(self, keycard, context): + d = self.child.evaluate(keycard, context) + return d.addCallback(lambda (res, volatile): (not res, volatile)) + + def synchronous_evaluate(self, context): + return not self.child.synchronous_evaluate(context) + + +class AndNode(CombinatorNode): + + logCategory = "andnode" + + def __init__(self, tokens): + self.children = tokens[0][0::2] + self.debug("creating combinator node using %r", self.children) + + def evaluate(self, keycard, context): + results = [(True, False)] + + d = defer.Deferred() + + for child in self.children: + d.addCallback(self.set_result, keycard, + child, results, context) + + def decide_result(_): + # nonvolatile False is nonvolatile False + if results[-1] == (False, False): + return False, False + + assert len(results) - 1 == len(self.children) + + result, volatile = True, False + for res, vol in results: + if not res: + assert vol + result = False + if vol: + volatile = True + return result, volatile + + d.addCallback(decide_result) + d.callback(None) + return d + + def set_result(self, _, keycard, child, results, context): + self.log("processing results %r", results) + + # nonvolatile False is instant failure + if results[-1] == (False, False): + return + + d = child.evaluate(keycard, context) + return d.addCallback(lambda (res, volatile): + results.append((res, volatile))) + + def synchronous_evaluate(self, context): + for child in self.children: + if not child.synchronous_evaluate(context): + return False + return True + + +class OrNode(CombinatorNode): + + logCategory = "ornode" + + def __init__(self, tokens): + self.children = tokens[0][0::2] + self.debug("creating combinator node using %r", self.children) + + def evaluate(self, keycard, context): + results = [(False, False)] + + d = defer.Deferred() + + for child in self.children: + d.addCallback(self.set_result, keycard, + child, results, context) + + def decide_result(_): + # nonvolatile True is nonvolatile True + if results[-1] == (True, False): + return True, False + + assert len(results) - 1 == len(self.children) + + result, volatile = False, False + for res, vol in results: + if res: + assert vol + result = True + if vol: + volatile = True + return result, volatile + + d.addCallback(decide_result) + d.callback(None) + return d + + def set_result(self, _, keycard, child, results, context): + self.log("processing results %r", results) + + # nonvolatile True is instant success + if results[-1] == (True, False): + return + + d = child.evaluate(keycard, context) + return d.addCallback(lambda (res, volatile): + results.append((res, volatile))) + + def synchronous_evaluate(self, context): + for child in self.children: + if child.synchronous_evaluate(context): + return True + return False + + +class AlgorithmNode(CombinatorNode): + + logCategory = "algorithmnode" + + def __init__(self, name, call_function, volatile): + self.debug("creating combinator node %r", name) + self.name = name + self.call_function = call_function + self.volatile = volatile + + def get_state_and_reset(self, keycard, context): + ret = bool(keycard and keycard.state == keycards.AUTHENTICATED) + self.debug("node %r got response from algorithm for keycard %r: %r", + self.name, keycard, ret) + if keycard: + keycard.state = keycards.REQUESTING + context[self.name] = ret + return ret, self.result_volatile(ret) + + def evaluate(self, keycard, context): + self.log("node %r evaluating %r in context %r", + self.name, keycard, context) + if self.name in context: + self.log("node %r found value in context: %r", + self.name, context[self.name]) + result = context[self.name] + return defer.succeed((result, self.result_volatile(result))) + self.debug("node %r calling algorithm with keycard %r", + self.name, keycard) + d = defer.maybeDeferred(self.call_function, keycard) + return d.addCallback(self.get_state_and_reset, context) + + def result_volatile(self, result): + # failures are always nonvolatile + if not result: + return False + # success can be volatile depending on the bouncer + return self.volatile + + def synchronous_evaluate(self, context): + self.debug("node %r evaluating synchronously in context %r", + self.name, context) + return context[self.name] + + +class AlgorithmCombinator(log.Loggable): + + logCategory = 'combinator' + + def __init__(self, algorithms): + self.algorithms = algorithms # name -> algorithm class + + def call_algorithm(self, name, keycard): + return self.algorithms[name].authenticate(keycard) + + def create_combination(self, combination_spec): + if pyparsing is None: + self.create_fake_combination() + return + + parser = self.create_parser(self.call_algorithm) + try: + self.combination = parser.parseString(combination_spec)[0] + except pyparsing.ParseException, e: + raise ParseException(e.line) + + def create_fake_combination(self): + self.combination = AndNode([[]]) + self.combination.children = [ + AlgorithmNode(name, algorithm.authenticate, algorithm.volatile) + for name, algorithm in self.algorithms.items()] + + def evaluate(self, keycard, context): + d = self.combination.evaluate(keycard, context) + return d.addCallback(lambda (ret, volatile): ret) + + def synchronous_evaluate(self, context): + return self.combination.synchronous_evaluate(context) + + def create_parser(self, call_function): + + def create_algorithm_node(tokens): + name = tokens[0] + algorithm = self.algorithms[name] + ret = AlgorithmNode(name, + algorithm.authenticate, + algorithm.volatile) + return ret + + algorithm = pyparsing.oneOf(self.algorithms.keys()) + algorithm.setParseAction(create_algorithm_node) + + openended_expr = pyparsing.operatorPrecedence( + algorithm, + [("not", 1, pyparsing.opAssoc.RIGHT, NotNode), + ("or", 2, pyparsing.opAssoc.LEFT, OrNode), + ("and", 2, pyparsing.opAssoc.LEFT, AndNode)]) + + return openended_expr + pyparsing.StringEnd() diff -Nru flumotion-0.6.1/flumotion/component/bouncers/component.py flumotion-0.9.1/flumotion/component/bouncers/component.py --- flumotion-0.6.1/flumotion/component/bouncers/component.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/component.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,100 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. +""" +Base class and implementation for bouncer components, who perform +authentication services for other components. + +Bouncers receive keycards, defined in L{flumotion.common.keycards}, and +then authenticate them. + +Passing a keycard over a PB connection will copy all of the keycard's +attributes to a remote side, so that bouncer authentication can be +coupled with PB. Bouncer implementations have to make sure that they +never store sensitive data as an attribute on a keycard. + +Keycards have three states: REQUESTING, AUTHENTICATED, and REFUSED. When +a keycard is first passed to a bouncer, it has the state REQUESTING. +Bouncers should never read the 'state' attribute on a keycard for any +authentication-related purpose, since it comes from the remote side. +Typically, a bouncer will only set the 'state' attribute to +AUTHENTICATED or REFUSED once it has the information to make such a +decision. + +Authentication of keycards is performed in the authenticate() method, +which takes a keycard as an argument. The Bouncer base class' +implementation of this method will perform some common checks (e.g., is +the bouncer enabled, is the keycard of the correct type), and then +dispatch to the do_authenticate method, which is expected to be +overridden by subclasses. + +Implementations of do_authenticate should eventually return a keycard +with the state AUTHENTICATED or REFUSED. It is acceptable for this +method to return either a keycard or a deferred that will eventually +return a keycard. + +FIXME: Currently, a return value of 'None' is treated as rejecting the +keycard. This is unintuitive. + +Challenge-response authentication may be implemented in +do_authenticate(), by returning a keycard still in the state REQUESTING +but with extra attributes annotating the keycard. The remote side would +then be expected to set a response on the card, resubmit, at which point +authentication could be performed. The exact protocol for this depends +on the particular keycard class and set of bouncers that can +authenticate that keycard class. + +It is expected that a bouncer implementation keeps references on the +currently active set of authenticated keycards. These keycards can then +be revoked at any time by the bouncer, which will be effected through an +'expireKeycard' call. When the code that requested the keycard detects +that the keycard is no longer necessary, it should notify the bouncer +via calling 'removeKeycardId'. + +The above process is leak-prone, however; if for whatever reason, the +remote side is unable to remove the keycard, the keycard will never be +removed from the bouncer's state. For that reason there is a more robust +method: if the keycard has a 'ttl' attribute, then it will be expired +automatically after 'keycard.ttl' seconds have passed. The remote side +is then responsible for periodically telling the bouncer which keycards +are still valid via the 'keepAlive' call, which resets the TTL on the +given set of keycards. + +Note that with automatic expiry via the TTL attribute, it is still +preferred, albeit not strictly necessary, that callers of authenticate() +call removeKeycardId when the keycard is no longer used. +""" -# Headers in this file shall remain intact. +import random +import time + +from twisted.internet import defer, reactor + +from flumotion.common import keycards, errors, python, poller +from flumotion.common.componentui import WorkerComponentUIState from flumotion.component import component +from flumotion.twisted import credentials __all__ = ['Bouncer'] -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" + +# How many keycards to expire in a single synchronous deferred expiration call. +EXPIRE_BLOCK_SIZE = 100 class BouncerMedium(component.BaseComponentMedium): @@ -64,45 +136,604 @@ """ return self.comp.expireKeycardId(keycardId) + def remote_expireKeycardIds(self, keycardIds): + """ + Called by bouncer views to expire multiple keycards. + """ + return self.comp.expireKeycardIds(keycardIds) + def remote_setEnabled(self, enabled): return self.comp.setEnabled(enabled) - -BOUNCER_SOCKET = 'flumotion.component.bouncers.plug.BouncerPlug' + def remote_getEnabled(self): + return self.comp.getEnabled() class Bouncer(component.BaseComponent): """ - I am the base class for all bouncers. + I am the base class for all bouncer components. + + @cvar keycardClasses: tuple of all classes of keycards this bouncer can + authenticate, in order of preference + @type keycardClasses: tuple of L{flumotion.common.keycards.Keycard} + class objects """ + keycardClasses = () componentMediumClass = BouncerMedium logCategory = 'bouncer' + KEYCARD_EXPIRE_INTERVAL = 2 * 60 # expire every 2 minutes + def init(self): - self.plug = None + self._idCounter = 0 + self._idFormat = time.strftime('%Y%m%d%H%M%S-%%d') + self._keycards = {} # keycard id -> Keycard + + self._expirer = poller.Poller(self._expire, + self.KEYCARD_EXPIRE_INTERVAL, + start=False) + self.enabled = True - def do_setup(self): - assert len(self.plugs[BOUNCER_SOCKET]) == 1 - self.plug = self.plugs[BOUNCER_SOCKET][0] - - def setMedium(self, medium): - component.BaseComponent.setMedium(self, medium) - self.plug.setMedium(self.medium) + def setDomain(self, name): + self.domain = name - def authenticate(self, keycard): - return self.plug.authenticate(keycard) + def getDomain(self): + return self.domain + + def typeAllowed(self, keycard): + """ + Verify if the keycard is an instance of a Keycard class specified + in the bouncer's keycardClasses variable. + """ + return isinstance(keycard, self.keycardClasses) def setEnabled(self, enabled): - self.plug.setEnabled(enabled) + + def callAndPassthru(result, method, *args): + method(*args) + return result + + if not enabled and self.enabled: + # If we were enabled and are being set to disabled, eject the warp + # core^w^w^w^wexpire all existing keycards + self.enabled = False + self._expirer.stop() + d = self.expireAllKeycards() + d.addCallback(callAndPassthru, self.on_disabled) + return d + self.enabled = enabled + d = defer.succeed(0) + d.addCallback(callAndPassthru, self.on_enabled) + return d + + def getEnabled(self): + return self.enabled + + def do_stop(self): + return self.setEnabled(False) + + def authenticate(self, keycard): + if not self.typeAllowed(keycard): + self.warning('keycard %r is not an allowed keycard class', keycard) + return None + + if not self.do_validate(keycard): + self.warning('keycard %r is not a valid keycard instance', keycard) + return None + + if self.enabled: + if not self._expirer.running and hasattr(keycard, 'ttl'): + self.debug('installing keycard timeout poller') + self._expirer.start() + return defer.maybeDeferred(self.do_authenticate, keycard) + else: + self.debug("Bouncer disabled, refusing authentication") + return None + + def do_expireKeycards(self, elapsed): + """ + Override to expire keycards managed by sub-classes. + + @param elapsed: time in second since the last expiration call. + @type elapsed: int + @returns: if there is more keycard to expire. If False is returned, + the expirer poller MAY be stopped. + @rtype: bool + """ + for k in self._keycards.values(): + if hasattr(k, 'ttl'): + k.ttl -= elapsed + if k.ttl <= 0: + self.expireKeycardId(k.id) + return len(self._keycards) > 0 + + def do_validate(self, keycard): + """ + Override to check keycards before authentication steps. + Should return True if the keycard is valid, False otherwise. + #FIXME: This belong to the base bouncer class + + @param keycard: the keycard that should be validated + before authentication + @type keycard: flumotion.common.keycards.Keycard + @returns: True if the keycard is accepted, False otherwise + @rtype: bool + """ + return True + + def do_authenticate(self, keycard): + """ + Must be overridden by subclasses. + + Authenticate the given keycard. + Return the keycard with state AUTHENTICATED to authenticate, + with state REQUESTING to continue the authentication process, + or REFUSED to deny the keycard or a deferred which should + have the same eventual value. + + FIXME: Currently, a return value of 'None' is treated + as rejecting the keycard. This is unintuitive. + + FIXME: in fact, for authentication sessions like challenge/response, + returning a keycard with state REFUSED instead of None + will not work properly and may enter in an asynchronous infinit loop. + """ + raise NotImplementedError("authenticate not overridden") + + def on_keycardAdded(self, keycard): + """ + Override to update sub-class specific data related to keycards. + Called when the base bouncer accepts and references a new keycard. + """ + + def on_keycardRemoved(self, keycard): + """ + Override to cleanup sub-class specific data related to keycards. + Called when the base bouncer has cleanup his references to a keycard. + """ + + def on_enabled(self): + """ + Override to initialize sub-class specific data + when the bouncer is enabled. + """ + + def on_disabled(self): + """ + Override to cleanup sub-class specific data + when the bouncer is disabled. + """ def hasKeycard(self, keycard): - return self.plug.hasKeycard(keycard) + return keycard in self._keycards.values() + + def generateKeycardId(self): + # FIXME: what if it already had one ? + # FIXME: deal with wraparound ? + keycardId = self._idFormat % self._idCounter + self._idCounter += 1 + return keycardId + + def addKeycard(self, keycard): + """ + Adds a keycard to the bouncer. + Can be called with the same keycard more than one time. + If the keycard has already been added successfully, + adding it again will succeed and return True. + + @param keycard: the keycard to add. + @return: if the bouncer accepts the keycard. + """ + # give keycard an id and store it in our hash + if keycard.id in self._keycards: + # already in there + return True + + keycardId = self.generateKeycardId() + keycard.id = keycardId + + if hasattr(keycard, 'ttl') and keycard.ttl <= 0: + self.log('immediately expiring keycard %r', keycard) + return False + + self._addKeycard(keycard) + return True def removeKeycard(self, keycard): - self.plug.removeKeycard(keycard) + if not keycard.id in self._keycards: + raise KeyError + + del self._keycards[keycard.id] + self.on_keycardRemoved(keycard) + + self.info("removed keycard with id %s" % keycard.id) - def removeKeycardId(self, id): - self.plug.removeKeycardId(id) + def removeKeycardId(self, keycardId): + self.debug("removing keycard with id %s" % keycardId) + if not keycardId in self._keycards: + raise KeyError + + keycard = self._keycards[keycardId] + self.removeKeycard(keycard) def keepAlive(self, issuerName, ttl): - self.plug.keepAlive(issuerName, ttl) + for k in self._keycards.itervalues(): + if hasattr(k, 'issuerName') and k.issuerName == issuerName: + k.ttl = ttl + + def expireAllKeycards(self): + return self.expireKeycardIds(self._keycards.keys()) + + def expireKeycardId(self, keycardId): + self.log("expiring keycard with id %r", keycardId) + if not keycardId in self._keycards: + raise KeyError + + keycard = self._keycards[keycardId] + self.removeKeycardId(keycardId) + + if self.medium: + return self.medium.callRemote('expireKeycard', + keycard.requesterId, keycard.id) + else: + return defer.succeed(None) + + def expireKeycardIds(self, keycardIds): + self.log("expiring keycards with id %r", keycardIds) + d = defer.Deferred() + self._expireNextKeycardBlock(0, keycardIds, d) + return d + + def _expireNextKeycardBlock(self, total, keycardIds, finished): + # We can't expire all keycards in a single blocking call because + # there might be so many that the component goes lost. + # This call will trigger expiring all keycards by chunking them + # across separate deferreds. + + keycardBlock = keycardIds[:EXPIRE_BLOCK_SIZE] + keycardIds = keycardIds[EXPIRE_BLOCK_SIZE:] + idByReq = {} + + for keycardId in keycardBlock: + if keycardId in self._keycards: + keycard = self._keycards[keycardId] + requesterId = keycard.requesterId + idByReq.setdefault(requesterId, []).append(keycardId) + self.removeKeycardId(keycardId) + + if not (idByReq and self.medium): + # instead of serializing each block by chaining deferreds, which + # can trigger maximum recursion depth, we just callback once + # on the passed-in deferred + finished.callback(total) + return + + defs = [self.medium.callRemote('expireKeycards', rid, ids) + for rid, ids in idByReq.items()] + dl = defer.DeferredList(defs, consumeErrors=True) + + def countExpirations(results, total): + return sum([v for s, v in results if s and v]) + total + + dl.addCallback(countExpirations, total) + dl.addCallback(self._expireNextKeycardBlock, keycardIds, finished) + + def _addKeycard(self, keycard): + """ + Adds a keycard without checking. + Used by sub-class knowing what they do. + """ + self._keycards[keycard.id] = keycard + self.on_keycardAdded(keycard) + + self.debug("added keycard with id %s, ttl %r", keycard.id, + getattr(keycard, 'ttl', None)) + + def _expire(self): + if not self.do_expireKeycards(self._expirer.timeout): + if self._expirer.running: + self.debug('no more keycards, removing timeout poller') + self._expirer.stop() + + +class AuthSessionBouncer(Bouncer): + """ + I am a bouncer that handle pending authentication sessions. + I am storing the last keycard of an authenticating session. + """ + + def init(self): + # Keycards pending to be authenticated + self._sessions = {} # keycard id -> (ttl, data) + + def on_disabled(self): + # Removing all pending authentication + self._sessions.clear() + + def do_extractKeycardInfo(self, keycard, oldData): + """ + Extracts session info from a keycard. + Used by updateAuthSession to store session info. + Must be overridden by subclasses. + """ + raise NotImplementedError() + + def hasAuthSession(self, keycard): + """ + Tells if a keycard is related to a pending authentication session. + It basically check if the id of the keycard is known. + + @param keycard: the keycard to check + @type keycard: flumotion.common.keycards.Keycard + @returns: if a pending authentication session associated + with the specified keycard exists. + + @rtype: bool + """ + return (keycard.id is not None) and (keycard.id in self._sessions) + + def getAuthSessionInfo(self, keycard): + """ + @return: the last updated keycard for the authentication session + associated with the specified keycard + @rtype: flumotion.common.keycards.Keycard or None + """ + data = keycard.id and self._sessions.get(keycard.id, None) + return data and data[1] + + def startAuthSession(self, keycard): + """ + Starts an authentication session with a keycard. + The keycard id will be generated and set. + The session info will be extracted from the keycard + by calling the method do_extractKeycardInfo, and can + be retrieved by calling getAuthSessionInfo. + + If a the keycard already have and id, and there is + an authentication session with this id, the session info + is updated from the keycard, and it return True. + + @param keycard: the keycard to update from. + @type keycard: flumotion.common.keycards.Keycard + @return: if the bouncer accepts the keycard. + """ + # Check if there is already an authentication session + if self.hasAuthSession(keycard): + # Updating the authentication session data + self._updateInfoFromKeycard(keycard) + return True + + if keycard.id: + self.warning("keycard %r already has an id, but no " + "authentication session", keycard) + keycard.state = keycards.REFUSED + return False + + if hasattr(keycard, 'ttl') and keycard.ttl <= 0: + self.log('immediately expiring keycard %r', keycard) + keycard.state = keycards.REFUSED + return False + + # Generate an id for the authentication session + keycardId = self.generateKeycardId() + keycard.id = keycardId + + self._updateInfoFromKeycard(keycard) + + self.debug("started authentication session with with id %s, ttl %r", + keycard.id, getattr(keycard, 'ttl', None)) + return True + + def updateAuthSession(self, keycard): + """ + Updates an authentication session with the last keycard. + The session info will be extracted from the keycard + by calling the method do_extractKeycardInfo, and can + be retrieved by calling getAuthSessionInfo. + + @param keycard: the keycard to update from. + @type keycard: flumotion.common.keycards.Keycard + """ + # Check if there is already an authentication session + if self.hasAuthSession(keycard): + # Updating the authentication session data + self._updateInfoFromKeycard(keycard) + else: + keycard.state = keycards.REFUSED + + def cancelAuthSession(self, keycard): + """ + Cancels the authentication session associated + with the specified keycard. + Used when doing challenge/response authentication. + @raise KeyError: when there is no session associated with the keycard. + """ + keycard.state = keycards.REFUSED + del self._sessions[keycard.id] + + def confirmAuthSession(self, keycard): + """ + Confirms the authentication session represented + by the specified keycard is authenticated. + This will add the specified keycard to the + bouncer keycard list like addKeycard would do + but without changing the keycard id. + The authentication session data is cleaned up. + + If the bouncer already have a keycard with the same id, + the authentication is confirmed but the bouncer keycard + is NOT updated. FIXME: is it what we want ? ? ? + + @param keycard: the keycard to add to the bouncer list. + @type keycard: flumotion.common.keycards.Keycard + @return: if the bouncer accepts the keycard. + """ + keycardId = keycard.id + + if keycardId not in self._sessions: + self.warning("unknown authentication session, or pending keycard " + "expired for id %s", keycardId) + keycard.state = keycards.REFUSED + return False + + del self._sessions[keycardId] + + # Check if there already an authenticated keycard with the same id + if keycardId in self._keycards: + self.debug("confirming an authentication session we already " + "know about with id %s", keycardId) + keycard.state = keycards.AUTHENTICATED + return True + + # check if the keycard already expired + if hasattr(keycard, 'ttl') and keycard.ttl <= 0: + self.log('immediately expiring keycard %r', keycard) + keycard.state = keycards.REFUSED + return False + + keycard.state = keycards.AUTHENTICATED + self._addKeycard(keycard) + return True + + def updateAuthSessionInfo(self, keycard, data): + """ + Updates the authentication session data. + Can be used bu subclasses to modify the data directly. + """ + ttl, _oldData = self._sessions.get(keycard.id, (None, None)) + if ttl is None: + ttl = getattr(keycard, 'ttl', None) + self._sessions[keycard.id] = (ttl, data) + + def do_expireKeycards(self, elapsed): + cont = Bouncer.do_expireKeycards(self, elapsed) + for sessionId, (ttl, data) in self._sessions.items(): + if ttl is not None: + ttl -= elapsed + self._sessions[sessionId] = (ttl, data) + if ttl <= 0: + del self._sessions[sessionId] + + return cont and len(self._sessions) > 0 + + def _updateInfoFromKeycard(self, keycard): + oldData = self.getAuthSessionInfo(keycard) + newData = self.do_extractKeycardInfo(keycard, oldData) + self.updateAuthSessionInfo(keycard, newData) + + +class TrivialBouncer(Bouncer): + """ + A very trivial bouncer implementation. + + Useful as a concrete bouncer class for which all users are + accepted whenever the bouncer is enabled. + """ + keycardClasses = (keycards.KeycardGeneric, ) + + def do_authenticate(self, keycard): + if self.addKeycard(keycard): + keycard.state = keycards.AUTHENTICATED + else: + keycard.state = keycards.REFUSED + return keycard + + +class ChallengeResponseBouncer(AuthSessionBouncer): + """ + A base class for Challenge-Response bouncers + """ + + challengeResponseClasses = () + + def init(self): + self._checker = None + self._challenges = {} + self._db = {} + + def setChecker(self, checker): + self._checker = checker + + def addUser(self, user, salt, *args): + self._db[user] = salt + self._checker.addUser(user, *args) + + def do_extractKeycardInfo(self, keycard, oldData): + return getattr(keycard, 'challenge', None) + + def _requestAvatarIdCallback(self, PossibleAvatarId, keycard): + if not self.hasAuthSession(keycard): + # The session expired + keycard.state = keycards.REFUSED + return None + + # authenticated, so return the keycard with state authenticated + if not keycard.avatarId: + keycard.avatarId = PossibleAvatarId + self.info('authenticated login of "%s"' % keycard.avatarId) + self.debug('keycard %r authenticated, id %s, avatarId %s' % ( + keycard, keycard.id, keycard.avatarId)) + self.confirmAuthSession(keycard) + keycard.state = keycards.AUTHENTICATED + return keycard + + def _requestAvatarIdErrback(self, failure, keycard): + if not self.hasAuthSession(keycard): + # The session expired + keycard.state = keycards.REFUSED + return None + + failure.trap(errors.NotAuthenticatedError) + # FIXME: we want to make sure the "None" we return is returned + # as coming from a callback, ie the deferred + self.info('keycard %r refused, Unauthorized' % keycard) + self.cancelAuthSession(keycard) + keycard.state = keycards.REFUSED + return None + + def do_authenticate(self, keycard): + if isinstance(keycard, self.challengeResponseClasses): + # Check if we need to challenge it + if not self.hasAuthSession(keycard): + if not self.startAuthSession(keycard): + # Keycard refused right away + keycard.state = keycards.REFUSED + return None + self.debug('putting challenge on keycard %r' % keycard) + keycard.challenge = credentials.cryptChallenge() + if keycard.username in self._db: + keycard.salt = self._db[keycard.username] + else: + # random-ish salt, otherwise it's too obvious + string = str(random.randint(pow(10, 10), pow(10, 11))) + md = python.md5() + md.update(string) + keycard.salt = md.hexdigest()[:2] + self.debug("user not found, inventing bogus salt") + self.debug("salt %s, storing challenge for id %s" + % (keycard.salt, keycard.id)) + self.updateAuthSession(keycard) + return keycard + else: + # Check if the challenge has been tampered with + challenge = self.getAuthSessionInfo(keycard) + if challenge != keycard.challenge: + self.info('keycard %r refused, challenge tampered with' + % keycard) + self.cancelAuthSession(keycard) + keycard.state = keycards.REFUSED + return None + else: + # Not a challenge/response authentication. + # creating a temporary session to have a keycard id + if not self.startAuthSession(keycard): + # Keycard refused right away + keycard.state = keycards.REFUSED + return None + + # use the checker + self.debug('submitting keycard %r to checker' % keycard) + d = self._checker.requestAvatarId(keycard) + d.addCallback(self._requestAvatarIdCallback, keycard) + d.addErrback(self._requestAvatarIdErrback, keycard) + return d diff -Nru flumotion-0.6.1/flumotion/component/bouncers/component.xml flumotion-0.9.1/flumotion/component/bouncers/component.xml --- flumotion-0.6.1/flumotion/component/bouncers/component.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/component.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/deprecated.xml flumotion-0.9.1/flumotion/component/bouncers/deprecated.xml --- flumotion-0.6.1/flumotion/component/bouncers/deprecated.xml 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/deprecated.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff -Nru flumotion-0.6.1/flumotion/component/bouncers/htpasswdcrypt.py flumotion-0.9.1/flumotion/component/bouncers/htpasswdcrypt.py --- flumotion-0.6.1/flumotion/component/bouncers/htpasswdcrypt.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/htpasswdcrypt.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_htpasswdcrypt -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -25,19 +21,17 @@ import random -from twisted.python import components from twisted.internet import defer -from flumotion.common import interfaces, keycards, log, errors -from flumotion.component import component -from flumotion.component.bouncers import bouncer +from flumotion.common import keycards, log, errors +from flumotion.component.bouncers import component as bcomponent from flumotion.twisted import credentials, checkers __all__ = ['HTPasswdCrypt'] -__version__ = "$Rev: 7990 $" +__version__ = "$Rev$" -class HTPasswdCrypt(bouncer.ChallengeResponseBouncer): +class HTPasswdCrypt(bcomponent.ChallengeResponseBouncer): logCategory = 'htpasswdcrypt' # challenger type first, because it's more secure thus preferable diff -Nru flumotion-0.6.1/flumotion/component/bouncers/htpasswdcrypt.xml flumotion-0.9.1/flumotion/component/bouncers/htpasswdcrypt.xml --- flumotion-0.6.1/flumotion/component/bouncers/htpasswdcrypt.xml 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/htpasswdcrypt.xml 2011-09-11 08:09:04.000000000 +0000 @@ -25,8 +25,7 @@ - - + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/icalbouncer.py flumotion-0.9.1/flumotion/component/bouncers/icalbouncer.py --- flumotion-0.6.1/flumotion/component/bouncers/icalbouncer.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/icalbouncer.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,120 +1,31 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_icalbouncer -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ A bouncer that only lets in during an event scheduled with an ical file. """ -from datetime import datetime - -from twisted.internet import defer - -from flumotion.common import keycards, messages, errors -from flumotion.common import log, documentation -from flumotion.common import eventcalendar -from flumotion.common.i18n import N_, gettexter -from flumotion.component.base import scheduler -from flumotion.component.bouncers import bouncer -from flumotion.common.keycards import KeycardGeneric +from flumotion.component.bouncers import multibouncer +from flumotion.component.bouncers.algorithms import icalbouncer __all__ = ['IcalBouncer'] -__version__ = "$Rev: 8156 $" -T_ = gettexter() +__version__ = "$Rev$" -class IcalBouncer(bouncer.Bouncer): +class IcalBouncer(multibouncer.StaticMultiBouncer): - logCategory = 'icalbouncer' - keycardClasses = (KeycardGeneric, ) - events = [] - - def init(self): - self.iCalScheduler = None - - def check_properties(self, properties, addMessage): - - def missingModule(moduleName): - m = messages.Error(T_(N_( - "To use the iCalendar bouncer you need to have " - "the '%s' module installed.\n"), moduleName), - mid='error-python-%s' % moduleName) - documentation.messageAddPythonInstall(m, moduleName) - addMessage(m) - - if not eventcalendar.HAS_ICALENDAR: - missingModule('icalendar') - if not eventcalendar.HAS_DATEUTIL: - missingModule('dateutil') - - def do_setup(self): - props = self.config['properties'] - self._icsfile = props['file'] - - try: - handle = open(self._icsfile, 'r') - except IOError, e: - m = messages.Error(T_(N_( - "Failed to open iCalendar file '%s'. " - "Check permissions on that file."), self._icsfile), - mid='error-icalbouncer-file') - self.addMessage(m) - return defer.fail(errors.ComponentSetupHandledError()) - - try: - self.iCalScheduler = scheduler.ICalScheduler(handle) - except (ValueError, IndexError, KeyError), e: - m = messages.Error(T_(N_( - "Error parsing ical file '%s'."), self._icsfile), - debug=log.getExceptionMessage(e), - mid="error-icalbouncer-file") - self.addMessage(m) - return defer.fail(errors.ComponentSetupHandledError()) - - return True - - def do_authenticate(self, keycard): - self.debug('authenticating keycard') - - # need to check if inside an event time - # FIXME: think of a strategy for handling overlapping events - cal = self.iCalScheduler.getCalendar() - eventInstances = cal.getActiveEventInstances() - if eventInstances: - instance = eventInstances[0] - now = datetime.now(eventcalendar.UTC) - end = instance.end - duration = end - now - durationSecs = duration.days * 86400 + duration.seconds - keycard.duration = durationSecs - if self.addKeycard(keycard): - keycard.state = keycards.AUTHENTICATED - self.info("authenticated login, duration %d seconds", - durationSecs) - return keycard - keycard.state = keycards.REFUSED - self.info("failed in authentication, outside hours") - return None - - def do_stop(self): - # we might not have an iCalScheduler, if something went wrong - # during do_setup or do_check - if self.iCalScheduler: - self.iCalScheduler.cleanup() + algorithmClasses = icalbouncer.IcalBouncerAlgorithm diff -Nru flumotion-0.6.1/flumotion/component/bouncers/icalbouncer.xml flumotion-0.9.1/flumotion/component/bouncers/icalbouncer.xml --- flumotion-0.6.1/flumotion/component/bouncers/icalbouncer.xml 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/icalbouncer.xml 2011-09-11 08:09:04.000000000 +0000 @@ -18,11 +18,10 @@ - + - - - + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/__init__.py flumotion-0.9.1/flumotion/component/bouncers/__init__.py --- flumotion-0.6.1/flumotion/component/bouncers/__init__.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ Bouncer components perform authentication services for other components. """ -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/bouncers/ipbouncer.py flumotion-0.9.1/flumotion/component/bouncers/ipbouncer.py --- flumotion-0.6.1/flumotion/component/bouncers/ipbouncer.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/ipbouncer.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_bouncers_ipbouncer -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -24,67 +20,13 @@ as seen by the bouncer. """ -from twisted.internet import defer - -from flumotion.common import keycards, messages, errors, log, netutils -from flumotion.common.i18n import N_, gettexter -from flumotion.common.keycards import KeycardUACPP -from flumotion.component.bouncers import bouncer +from flumotion.component.bouncers import multibouncer +from flumotion.component.bouncers.algorithms import ipbouncer __all__ = ['IPBouncer'] -__version__ = "$Rev: 7408 $" -T_ = gettexter() - +__version__ = "$Rev$" -class IPBouncer(bouncer.Bouncer): - logCategory = 'ip-bouncer' - keycardClasses = (keycards.KeycardUACPCC, keycards.KeycardUACPP) +class IPBouncer(multibouncer.StaticMultiBouncer): - def do_setup(self): - conf = self.config - props = conf['properties'] - - self.deny_default = props.get('deny-default', True) - - self.allows = netutils.RoutingTable() - self.denies = netutils.RoutingTable() - for p, t in (('allow', self.allows), ('deny', self.denies)): - for s in props.get(p, []): - try: - ip, mask = s.split('/') - t.addSubnet(True, ip, int(mask)) - except Exception, e: - m = messages.Error( - T_(N_("Invalid value for property %r: %s"), p, s), - log.getExceptionMessage(e), - mid='match-type') - self.addMessage(m) - raise errors.ComponentSetupHandledError() - - return defer.succeed(None) - - def do_authenticate(self, keycard): - ip = keycard.getData()['address'] - self.debug('authenticating keycard from requester %s', ip) - - if ip is None: - self.warning('could not get address of remote') - allowed = False - elif self.deny_default: - allowed = (self.allows.route(ip) - and not self.denies.route(ip)) - else: - allowed = (self.allows.route(ip) - or not self.denies.route(ip)) - - if not allowed: - self.info('denied login from ip address %s', - keycard.address) - return None - else: - keycard.state = keycards.AUTHENTICATED - self.addKeycard(keycard) - self.debug('allowed login from ip address %s', - keycard.address) - return keycard + algorithmClasses = ipbouncer.IPBouncerAlgorithm diff -Nru flumotion-0.6.1/flumotion/component/bouncers/ipbouncer.xml flumotion-0.9.1/flumotion/component/bouncers/ipbouncer.xml --- flumotion-0.6.1/flumotion/component/bouncers/ipbouncer.xml 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/ipbouncer.xml 2011-09-11 08:09:04.000000000 +0000 @@ -27,8 +27,8 @@ - - + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/Makefile.am flumotion-0.9.1/flumotion/component/bouncers/Makefile.am --- flumotion-0.6.1/flumotion/component/bouncers/Makefile.am 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -3,19 +3,22 @@ componentdir = $(libdir)/flumotion/python/flumotion/component/bouncers component_PYTHON = \ __init__.py \ + base.py \ admin_gtk.py \ - bouncer.py \ component.py \ htpasswdcrypt.py \ icalbouncer.py \ ipbouncer.py \ saltsha256.py \ plug.py \ - tokentest.py \ - tokentestbouncer.py + tokentestbouncer.py \ + multibouncer.py \ + multibouncerplug.py \ + combinator.py -component_DATA = htpasswdcrypt.xml saltsha256.xml bouncer.glade tokentest.xml \ - ipbouncer.xml icalbouncer.xml deprecated.xml bouncer.xml +component_DATA = base.xml component.xml plug.xml htpasswdcrypt.xml \ + saltsha256.xml bouncer.glade tokentest.xml ipbouncer.xml \ + icalbouncer.xml multibouncer.xml multibouncerplug.xml TAGS_FILES = $(component_PYTHON) @@ -23,4 +26,6 @@ clean-local: rm -rf *.pyc *.pyo +SUBDIRS = algorithms + EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/bouncers/Makefile.in flumotion-0.9.1/flumotion/component/bouncers/Makefile.in --- flumotion-0.6.1/flumotion/component/bouncers/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/Makefile.in 2011-09-11 08:09:19.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -59,6 +58,13 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -84,7 +90,40 @@ "$(DESTDIR)$(componentdir)" py_compile = $(top_srcdir)/py-compile DATA = $(component_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ @@ -104,6 +143,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +153,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +205,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +223,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +242,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +256,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +289,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -276,23 +311,27 @@ componentdir = $(libdir)/flumotion/python/flumotion/component/bouncers component_PYTHON = \ __init__.py \ + base.py \ admin_gtk.py \ - bouncer.py \ component.py \ htpasswdcrypt.py \ icalbouncer.py \ ipbouncer.py \ saltsha256.py \ plug.py \ - tokentest.py \ - tokentestbouncer.py - -component_DATA = htpasswdcrypt.xml saltsha256.xml bouncer.glade tokentest.xml \ - ipbouncer.xml icalbouncer.xml deprecated.xml bouncer.xml + tokentestbouncer.py \ + multibouncer.py \ + multibouncerplug.py \ + combinator.py + +component_DATA = base.xml component.xml plug.xml htpasswdcrypt.xml \ + saltsha256.xml bouncer.glade tokentest.xml ipbouncer.xml \ + icalbouncer.xml multibouncer.xml multibouncerplug.xml TAGS_FILES = $(component_PYTHON) +SUBDIRS = algorithms EXTRA_DIST = $(component_DATA) -all: all-am +all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) @@ -389,12 +428,141 @@ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(componentdir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi ctags: CTAGS -CTAGS: +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -426,22 +594,51 @@ || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(DATA) -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -458,86 +655,90 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: install-componentDATA install-componentPYTHON -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-componentDATA uninstall-componentPYTHON -.MAKE: install-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - clean-local distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-componentDATA install-componentPYTHON \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-local ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-componentDATA \ + install-componentPYTHON install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-componentDATA uninstall-componentPYTHON + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-componentDATA \ + uninstall-componentPYTHON #if HAVE_PYCHECKER diff -Nru flumotion-0.6.1/flumotion/component/bouncers/multibouncerplug.py flumotion-0.9.1/flumotion/component/bouncers/multibouncerplug.py --- flumotion-0.6.1/flumotion/component/bouncers/multibouncerplug.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/multibouncerplug.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,155 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from twisted.internet import defer +from twisted.python import util + +from flumotion.common import keycards, watched +from flumotion.common import messages, errors, documentation +from flumotion.common.i18n import N_, gettexter +from flumotion.component.bouncers import base, plug, combinator + +T_ = gettexter() + + +class MultiBouncerPlug(plug.BouncerPlug): + + logCategory = 'multibouncerplug' + + def start(self, component): + self.watchable_keycards = watched.WatchedDict() # keycard id -> Keycard + self.contexts = {} # keycard id -> {algorithm name -> result} + self.algorithms = util.OrderedDict() # name -> algorithm + + def add_entry(entry, algorithm): + name = entry['type'] + if name in self.algorithms: + suffix = 1 + while ('%s-%d' % (name, suffix)) in self.algorithms: + suffix += 1 + name = '%s-%d' % (name, suffix) + + assert name not in self.algorithms + self.algorithms[name] = algorithm + return name + + # get all algorithm plugs this component has, put them into + # self.algorithms with unique names + entries = component.config['plugs'].get(base.BOUNCER_ALGORITHM_SOCKET, + []) + algorithms = component.plugs.get(base.BOUNCER_ALGORITHM_SOCKET, []) + + if not algorithms: + m = messages.Error(T_(N_( + "The multibouncerplug requires at least one bouncer " + "algorithm plug to be present")), mid='no-algorithm') + component.addMessage(m) + raise errors.ComponentSetupHandledError() + + for entry, algorithm in zip(entries, algorithms): + # add the algorithm to the algorithms dictionary + name = add_entry(entry, algorithm) + # provide the algorithm with the keycard store + algorithm.set_keycard_store(self.watchable_keycards) + # provide the algorithm with an expiry function crafted especially + # for it (containing its unique name) + expire = lambda ids: self.algorithm_expire_keycard_ids(ids, name) + algorithm.set_expire_function(expire) + + self.debug("configured with algorithms %r", self.algorithms.keys()) + + # create the algorithm combinator + props = self.args['properties'] + self.combinator = combinator.AlgorithmCombinator(self.algorithms) + + if 'combination' in props and combinator.pyparsing is None: + m = messages.Error(T_(N_( + "To use the 'combination' property you need to " + "have the 'pyparsing' module installed.\n")), + mid='missing-pyparsing') + documentation.messageAddPythonInstall(m, 'pyparsing') + component.addMessage(m) + raise errors.ComponentSetupHandledError() + + # get the combination specification, defaulting to implicit AND + spec = props.get('combination', ' and '.join(self.algorithms.keys())) + self.debug("using combination %s", spec) + try: + self.combinator.create_combination(spec) + except combinator.ParseException, e: + m = messages.Error(T_(N_( + "Invalid algorithms combination: %s"), str(e)), + mid='wrong-combination') + + component.addMessage(m) + raise errors.ComponentSetupHandledError() + + return plug.BouncerPlug.start(self, component) + + def authenticate(self, keycard): + # create a context for this request + context = {} + # ask the combinator for an answer + d = self.combinator.evaluate(keycard, context) + + def authenticated(res, keycard): + # the answer is True/False + if not res: + # False, return None as per the bouncer protocol + return None + if hasattr(keycard, 'ttl') and keycard.ttl <= 0: + # keycard was invalid on input + self.log('immediately expiring keycard %r', keycard) + return None + if self.addKeycard(keycard): + # keycard added, set state to AUTHENTICATED, keep the context, + # return to caller + keycard.state = keycards.AUTHENTICATED + self.contexts[keycard.id] = context + self.watchable_keycards[keycard.id] = keycard + return keycard + + d.addCallback(authenticated, keycard) + + return d + + def on_keycardRemoved(self, keycard): + # clear our references to the keycard + del self.contexts[keycard.id] + del self.watchable_keycards[keycard.id] + + def algorithm_expire_keycard_ids(self, keycard_ids, name): + # this gets called by a particular algorithm when it wants to expire a + # keycard + to_expire = [] + + self.debug("algorithm %r requested expiration of keycards %r", + name, keycard_ids) + + for keycard_id in keycard_ids: + # change the result in the context + context = self.contexts[keycard_id] + context[name] = False + # Reevaluate in the combinator. Because we already got an answer + # for that context, it should contain all necesary info, so we + # never should call any algorithm method: just do synchronous + # evaluation. + if not self.combinator.synchronous_evaluate(context): + self.log("keycard with id %r will be expired", keycard_id) + to_expire.append(keycard_id) + + return self.expireKeycardIds(to_expire) diff -Nru flumotion-0.6.1/flumotion/component/bouncers/multibouncerplug.xml flumotion-0.9.1/flumotion/component/bouncers/multibouncerplug.xml --- flumotion-0.6.1/flumotion/component/bouncers/multibouncerplug.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/multibouncerplug.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/multibouncer.py flumotion-0.9.1/flumotion/component/bouncers/multibouncer.py --- flumotion-0.6.1/flumotion/component/bouncers/multibouncer.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/multibouncer.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,232 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +""" +A bouncer that combines other bouncers. +""" + +from twisted.internet import defer +from twisted.python import util + +from flumotion.common import keycards, watched +from flumotion.common import messages, errors, documentation +from flumotion.common.i18n import N_, gettexter +from flumotion.component.bouncers import base, component, combinator + +T_ = gettexter() + + +class MultiBouncer(component.Bouncer): + + logCategory = 'multibouncer' + # FIXME random classes for now, they're going away anyway + keycardClasses = (keycards.KeycardHTTPGetArguments, + keycards.KeycardGeneric, keycards.KeycardUACPCC, + keycards.KeycardUACPP, keycards.KeycardToken) + + def init(self): + self.watchable_keycards = watched.WatchedDict() # keycard id -> Keycard + self.contexts = {} # keycard id -> {algorithm name -> bool result} + self.algorithms = util.OrderedDict() # name -> algorithm instance + self.combinator = None + + def do_setup(self): + + def add_entry(entry, algorithm): + name = entry['type'] + if name in self.algorithms: + suffix = 1 + while ('%s-%d' % (name, suffix)) in self.algorithms: + suffix += 1 + name = '%s-%d' % (name, suffix) + + assert name not in self.algorithms + self.algorithms[name] = algorithm + return name + + # get all algorithm plugs this component has, put them into + # self.algorithms with unique names + entries = self.config['plugs'].get(base.BOUNCER_ALGORITHM_SOCKET, []) + algorithms = self.plugs.get(base.BOUNCER_ALGORITHM_SOCKET, []) + + # check if there's at least one algorithm plug in a separate method, so + # subclasses can override it + self.check_algorithms(algorithms) + + for entry, algorithm in zip(entries, algorithms): + # add the algorithm to the algorithms dictionary + name = add_entry(entry, algorithm) + # provide the algorithm with the keycard store + algorithm.set_keycard_store(self.watchable_keycards) + # provide the algorithm with an expiry function crafted especially + # for it (containing its unique name) + expire = lambda ids: self.algorithm_expire_keycard_ids(ids, name) + algorithm.set_expire_function(expire) + + # we don't have any algorithms, stop here (see StaticMultiBouncer to + # see why we need this) + if not self.algorithms: + return + + self.debug("configured with algorithms %r", self.algorithms.keys()) + + # create the algorithm combinator + props = self.config['properties'] + self.combinator = combinator.AlgorithmCombinator(self.algorithms) + + if 'combination' in props and combinator.pyparsing is None: + m = messages.Error(T_(N_( + "To use the 'combination' property you need to " + "have the 'pyparsing' module installed.\n")), + mid='missing-pyparsing') + documentation.messageAddPythonInstall(m, 'pyparsing') + self.addMessage(m) + raise errors.ComponentSetupHandledError() + + # get the combination specification, defaulting to implicit AND + spec = props.get('combination', ' and '.join(self.algorithms.keys())) + self.debug("using combination %s", spec) + try: + self.combinator.create_combination(spec) + except combinator.ParseException, e: + m = messages.Error(T_(N_( + "Invalid algorithms combination: %s"), str(e)), + mid='wrong-combination') + self.addMessage(m) + raise errors.ComponentSetupHandledError() + + def check_algorithms(self, algorithms): + if not algorithms: + m = messages.Error(T_(N_( + "The multibouncer requires at least one bouncer " + "algorithm plug to be present")), mid='no-algorithm') + self.addMessage(m) + raise errors.ComponentSetupHandledError() + + def do_authenticate(self, keycard): + # create a context for this request + context = {} + # ask the combinator for an answer + d = self.combinator.evaluate(keycard, context) + + def authenticated(res, keycard): + # the answer is True/False + if not res: + # False, return None as per the bouncer protocol + return None + if hasattr(keycard, 'ttl') and keycard.ttl <= 0: + # keycard was invalid on input + self.log('immediately expiring keycard %r', keycard) + return None + if self.addKeycard(keycard): + # keycard added, set state to AUTHENTICATED, keep the context, + # return to caller + keycard.state = keycards.AUTHENTICATED + self.contexts[keycard.id] = context + self.watchable_keycards[keycard.id] = keycard + return keycard + + return d.addCallback(authenticated, keycard) + + def on_keycardRemoved(self, keycard): + # clear our references to the keycard + del self.contexts[keycard.id] + del self.watchable_keycards[keycard.id] + + def algorithm_expire_keycard_ids(self, keycard_ids, name): + # this gets called by a particular algorithm when it wants to expire a + # keycard + to_expire = [] + + self.debug("algorithm %r requested expiration of keycards %r", + name, keycard_ids) + + for keycard_id in keycard_ids: + # change the result in the context + context = self.contexts[keycard_id] + context[name] = False + # Reevaluate in the combinator. Because we already got an answer + # for that context, it should contain all necesary info, so we + # never should call any algorithm method: just do synchronous + # evaluation. + if not self.combinator.synchronous_evaluate(context): + self.log("keycard with id %r will be expired", keycard_id) + to_expire.append(keycard_id) + + return self.expireKeycardIds(to_expire) + + +class StaticMultiBouncer(MultiBouncer): + """A multibouncer that has a static list of bouncer algorithm plugs""" + + algorithmClasses = None + + def get_main_algorithm(self): + for algorithm in self.algorithms.itervalues(): + return algorithm + + def setMedium(self, medium): + MultiBouncer.setMedium(self, medium) + for algorithm in self.algorithms.itervalues(): + self._export_plug_interface(algorithm, medium) + + def do_setup(self): + if self.algorithmClasses is None: + raise NotImplementedError("Subclass did not choose algorithm") + + def start_algorithm(d, algorithm, name): + self.algorithms[name] = algorithm + d.addCallback(lambda _: defer.maybeDeferred(algorithm.start, self)) + d.addCallback(algorithm_started, algorithm, name) + + def algorithm_started(_, algorithm, name): + algorithm.set_keycard_store(self.watchable_keycards) + + expire = lambda ids: self.algorithm_expire_keycard_ids(ids, name) + algorithm.set_expire_function(expire) + + try: + klasses = iter(self.algorithmClasses) + except TypeError: + klasses = iter((self.algorithmClasses, )) + + d = defer.Deferred() + for klass in klasses: + name = klass.__name__ + algorithm = klass({'properties': self.config['properties']}) + start_algorithm(d, algorithm, name) + + def create_combinator(_): + self.combinator = combinator.AlgorithmCombinator(self.algorithms) + spec = ' and '.join(self.algorithms.keys()) + self.combinator.create_combination(spec) + + d.addCallback(create_combinator) + + d.callback(None) + return d + + def check_algorithms(self, algorithms): + pass + + def do_stop(self): + d = defer.Deferred() + for algorithm in self.algorithms.values(): + d.addCallback(lambda _: defer.maybeDeferred(algorithm.stop, self)) + + d.callback(None) + return d diff -Nru flumotion-0.6.1/flumotion/component/bouncers/multibouncer.xml flumotion-0.9.1/flumotion/component/bouncers/multibouncer.xml --- flumotion-0.6.1/flumotion/component/bouncers/multibouncer.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/multibouncer.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/plug.py flumotion-0.9.1/flumotion/component/bouncers/plug.py --- flumotion-0.6.1/flumotion/component/bouncers/plug.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/plug.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,357 +1,124 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -""" -Base class and implementation for bouncer components, who perform -authentication services for other components. - -Bouncers receive keycards, defined in L{flumotion.common.keycards}, and -then authenticate them. - -Passing a keycard over a PB connection will copy all of the keycard's -attributes to a remote side, so that bouncer authentication can be -coupled with PB. Bouncer implementations have to make sure that they -never store sensitive data as an attribute on a keycard. - -Keycards have three states: REQUESTING, AUTHENTICATED, and REFUSED. When -a keycard is first passed to a bouncer, it has the state REQUESTING. -Bouncers should never read the 'state' attribute on a keycard for any -authentication-related purpose, since it comes from the remote side. -Typically, a bouncer will only set the 'state' attribute to -AUTHENTICATED or REFUSED once it has the information to make such a -decision. - -Authentication of keycards is performed in the authenticate() method, -which takes a keycard as an argument. The Bouncer base class' -implementation of this method will perform some common checks (e.g., is -the bouncer enabled, is the keycard of the correct type), and then -dispatch to the do_authenticate method, which is expected to be -overridden by subclasses. - -Implementations of do_authenticate should eventually return a keycard -with the state AUTHENTICATED or REFUSED. It is acceptable for this -method to return either a keycard or a deferred that will eventually -return a keycard. - -FIXME: Currently, a return value of 'None' is treated as rejecting the -keycard. This is unintuitive. - -Challenge-response authentication may be implemented in -do_authenticate(), by returning a keycard still in the state REQUESTING -but with extra attributes annotating the keycard. The remote side would -then be expected to set a response on the card, resubmit, at which point -authentication could be performed. The exact protocol for this depends -on the particular keycard class and set of bouncers that can -authenticate that keycard class. - -It is expected that a bouncer implementation keeps references on the -currently active set of authenticated keycards. These keycards can then -be revoked at any time by the bouncer, which will be effected through an -'expireKeycard' call. When the code that requested the keycard detects -that the keycard is no longer necessary, it should notify the bouncer -via calling 'removeKeycardId'. - -The above process is leak-prone, however; if for whatever reason, the -remote side is unable to remove the keycard, the keycard will never be -removed from the bouncer's state. For that reason there is a more robust -method: if the keycard has a 'ttl' attribute, then it will be expired -automatically after 'keycard.ttl' seconds have passed. The remote side -is then responsible for periodically telling the bouncer which keycards -are still valid via the 'keepAlive' call, which resets the TTL on the -given set of keycards. - -Note that with automatic expiry via the TTL attribute, it is still -preferred, albeit not strictly necessary, that callers of authenticate() -call removeKeycardId when the keycard is no longer used. -""" - -import random import time -from twisted.internet import defer, reactor - -from flumotion.common import keycards, common, errors, python -from flumotion.common.poller import Poller -from flumotion.component.plugs import base as pbase -from flumotion.twisted import credentials +from flumotion.component.plugs import base __all__ = ['BouncerPlug'] -__version__ = "$Rev: 7990 $" +__version__ = "$Rev$" -class BouncerPlug(pbase.ComponentPlug, common.InitMixin): +class BouncerPlug(base.ComponentPlug): """ I am the base class for all bouncer plugs. - - FIXME: expireKeycardIds has been added to the component bouncer. - Because the plug version is not yet used, and will be - refactored/redesigned in a near future, the modifications - have not been duplicated here. - - @cvar keycardClasses: tuple of all classes of keycards this bouncer can - authenticate, in order of preference - @type keycardClasses: tuple of L{flumotion.common.keycards.Keycard} - class objects """ - keycardClasses = () - logCategory = 'bouncer' + logCategory = 'bouncer-plug' - KEYCARD_EXPIRE_INTERVAL = 2 * 60 - - def __init__(self, *args, **kwargs): - pbase.ComponentPlug.__init__(self, *args, **kwargs) - common.InitMixin.__init__(self) - - def init(self): - self.medium = None - self.enabled = True + def start(self, component): self._idCounter = 0 self._idFormat = time.strftime('%Y%m%d%H%M%S-%%d') self._keycards = {} # keycard id -> Keycard - - self._expirer = Poller(self._expire, - self.KEYCARD_EXPIRE_INTERVAL, - start=False) - - def typeAllowed(self, keycard): - """ - Verify if the keycard is an instance of a Keycard class specified - in the bouncer's keycardClasses variable. - """ - return isinstance(keycard, self.keycardClasses) - - def setEnabled(self, enabled): - if not enabled and self.enabled: - # If we were enabled and are being set to disabled, eject the warp - # core^w^w^w^wexpire all existing keycards - self.expireAllKeycards() - self._expirer.stop() - - self.enabled = enabled - - def setMedium(self, medium): - self.medium = medium - - def stop(self, component): - self.setEnabled(False) - - def _expire(self): - for k in self._keycards.values(): - if hasattr(k, 'ttl'): - k.ttl -= self._expirer.timeout - if k.ttl <= 0: - self.expireKeycardId(k.id) + return base.ComponentPlug.start(self, component) def authenticate(self, keycard): - if not self.typeAllowed(keycard): - self.warning('keycard %r is not an allowed keycard class', keycard) - return None - - if self.enabled: - if not self._expirer.running and hasattr(keycard, 'ttl'): - self.debug('installing keycard timeout poller') - self._expirer.start() - return defer.maybeDeferred(self.do_authenticate, keycard) - else: - self.debug("Bouncer disabled, refusing authentication") - return None - - def do_authenticate(self, keycard): - """ - Must be overridden by subclasses. - - Authenticate the given keycard. - Return the keycard with state AUTHENTICATED to authenticate, - with state REQUESTING to continue the authentication process, - or None to deny the keycard, or a deferred which should have the same - eventual value. - """ - raise NotImplementedError("authenticate not overridden") + raise NotImplementedError("Subclass does not override authenticate") - def hasKeycard(self, keycard): - return keycard in self._keycards.values() + def set_expire_function(self, expire): + self.expire = expire def generateKeycardId(self): + # FIXME: what if it already had one ? + # FIXME: deal with wraparound ? keycardId = self._idFormat % self._idCounter self._idCounter += 1 return keycardId def addKeycard(self, keycard): """ - Adds a keycard to the bouncer. + Adds a keycard to the keycards store. Can be called with the same keycard more than one time. If the keycard has already been added successfully, adding it again will succeed and return True. @param keycard: the keycard to add. - @return: if the bouncer accepts the keycard. + @return: if the plug accepts the keycard. """ # give keycard an id and store it in our hash if keycard.id in self._keycards: + self.debug("%r in %r", keycard.id, self._keycards) # already in there return True - keycard.id = self.generateKeycardId() + keycardId = self.generateKeycardId() + keycard.id = keycardId if hasattr(keycard, 'ttl') and keycard.ttl <= 0: + self.debug("no ttlz") self.log('immediately expiring keycard %r', keycard) return False + self._addKeycard(keycard) + return True + + def _addKeycard(self, keycard): + """ + Adds a keycard without checking. + Used by sub-class knowing what they do. + """ self._keycards[keycard.id] = keycard + self.on_keycardAdded(keycard) - self.debug("added keycard with id %s" % keycard.id) - return True + self.debug("added keycard with id %s, ttl %r", keycard.id, + getattr(keycard, 'ttl', None)) def removeKeycard(self, keycard): - if not keycard.id in self._keycards: - raise KeyError - del self._keycards[keycard.id] - - self.debug("removed keycard with id %s" % keycard.id) + self.on_keycardRemoved(keycard) + self.info("removed keycard with id %s" % keycard.id) def removeKeycardId(self, keycardId): self.debug("removing keycard with id %s" % keycardId) - if not keycardId in self._keycards: - raise KeyError - keycard = self._keycards[keycardId] self.removeKeycard(keycard) - def keepAlive(self, issuerName, ttl): - for k in self._keycards.itervalues(): - if hasattr(k, 'issuerName') and k.issuerName == issuerName: - k.ttl = ttl - - def expireAllKeycards(self): - return defer.DeferredList( - [self.expireKeycardId(keycardId) - for keycardId in self._keycards.keys()]) - def expireKeycardId(self, keycardId): self.log("expiring keycard with id %r", keycardId) - if not keycardId in self._keycards: - raise KeyError - - keycard = self._keycards.pop(keycardId) - - return self.medium.callRemote('expireKeycard', - keycard.requesterId, keycard.id) + self.expire((keycardId, )) + def expireKeycardIds(self, keycardIds): + self.log("expiring keycards with ids %r", keycardIds) + self.expire(keycardIds) -class BouncerTrivialPlug(BouncerPlug): - """ - A very trivial bouncer implementation. - - Useful as a concrete bouncer class for which all users are - accepted whenever the bouncer is enabled. - """ - keycardClasses = (keycards.KeycardGeneric, ) - - def do_authenticate(self, keycard): - if not self.addKeycard(keycard): - keycard.state = keycards.REFUSED - return keycard - keycard.state = keycards.AUTHENTICATED - return keycard - + def on_keycardAdded(self, keycard): + """ + Override to update sub-class specific data related to keycards. + Called when the base bouncer accepts and references a new keycard. + """ -class ChallengeResponseBouncerPlug(BouncerPlug): - """ - A base class for Challenge-Response bouncers - """ + def on_keycardRemoved(self, keycard): + """ + Override to cleanup sub-class specific data related to keycards. + Called when the base bouncer has cleanup his references to a keycard. + """ - challengeResponseClasses = () - def init(self): - self._checker = None - self._challenges = {} - self._db = {} - - def setChecker(self, checker): - self._checker = checker - - def addUser(self, user, salt, *args): - self._db[user] = salt - self._checker.addUser(user, *args) +class TrivialBouncerPlug(BouncerPlug): - def _requestAvatarIdCallback(self, PossibleAvatarId, keycard): - # authenticated, so return the keycard with state authenticated + def authenticate(self, keycard): keycard.state = keycards.AUTHENTICATED - self.addKeycard(keycard) - if not keycard.avatarId: - keycard.avatarId = PossibleAvatarId - self.info('authenticated login of "%s"' % keycard.avatarId) - self.debug('keycard %r authenticated, id %s, avatarId %s' % ( - keycard, keycard.id, keycard.avatarId)) - return keycard - - def _requestAvatarIdErrback(self, failure, keycard): - failure.trap(errors.NotAuthenticatedError) - # FIXME: we want to make sure the "None" we return is returned - # as coming from a callback, ie the deferred - self.removeKeycard(keycard) - self.info('keycard %r refused, Unauthorized' % keycard) - return None - - def do_authenticate(self, keycard): - # at this point we add it so there's an ID for challenge-response - if not self.addKeycard(keycard): - keycard.state = keycards.REFUSED - return keycard - - # check if the keycard is ready for the checker, based on the type - if isinstance(keycard, self.challengeResponseClasses): - # Check if we need to challenge it - if not keycard.challenge: - self.debug('putting challenge on keycard %r' % keycard) - keycard.challenge = credentials.cryptChallenge() - if keycard.username in self._db: - keycard.salt = self._db[keycard.username] - else: - # random-ish salt, otherwise it's too obvious - string = str(random.randint(pow(10, 10), pow(10, 11))) - md = python.md5() - md.update(string) - keycard.salt = md.hexdigest()[:2] - self.debug("user not found, inventing bogus salt") - self.debug("salt %s, storing challenge for id %s" % ( - keycard.salt, keycard.id)) - # we store the challenge locally to verify against tampering - self._challenges[keycard.id] = keycard.challenge - return keycard - - if keycard.response: - # Check if the challenge has been tampered with - if self._challenges[keycard.id] != keycard.challenge: - self.removeKeycard(keycard) - self.info('keycard %r refused, challenge tampered with' % - keycard) - return None - del self._challenges[keycard.id] - - # use the checker - self.debug('submitting keycard %r to checker' % keycard) - d = self._checker.requestAvatarId(keycard) - d.addCallback(self._requestAvatarIdCallback, keycard) - d.addErrback(self._requestAvatarIdErrback, keycard) - return d diff -Nru flumotion-0.6.1/flumotion/component/bouncers/plug.xml flumotion-0.9.1/flumotion/component/bouncers/plug.xml --- flumotion-0.6.1/flumotion/component/bouncers/plug.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/plug.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/saltsha256.py flumotion-0.9.1/flumotion/component/bouncers/saltsha256.py --- flumotion-0.6.1/flumotion/component/bouncers/saltsha256.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/saltsha256.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_saltsha256 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -25,19 +21,17 @@ import random -from twisted.python import components from twisted.internet import defer -from flumotion.common import interfaces, keycards, log, errors -from flumotion.component import component -from flumotion.component.bouncers import bouncer +from flumotion.common import keycards, log, errors +from flumotion.component.bouncers import component as bcomponent from flumotion.twisted import credentials, checkers __all__ = ['SaltSha256'] -__version__ = "$Rev: 7990 $" +__version__ = "$Rev$" -class SaltSha256(bouncer.ChallengeResponseBouncer): +class SaltSha256(bcomponent.ChallengeResponseBouncer): """ I am a bouncer that stores usernames, salts, and SHA-256 data to authenticate against. diff -Nru flumotion-0.6.1/flumotion/component/bouncers/saltsha256.xml flumotion-0.9.1/flumotion/component/bouncers/saltsha256.xml --- flumotion-0.6.1/flumotion/component/bouncers/saltsha256.xml 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/saltsha256.xml 2011-09-11 08:09:04.000000000 +0000 @@ -23,8 +23,7 @@ - - + diff -Nru flumotion-0.6.1/flumotion/component/bouncers/tokentestbouncer.py flumotion-0.9.1/flumotion/component/bouncers/tokentestbouncer.py --- flumotion-0.6.1/flumotion/component/bouncers/tokentestbouncer.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/tokentestbouncer.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,38 +1,31 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ A test token bouncer. """ -from twisted.internet import defer - -from flumotion.component.bouncers import bouncer, tokentest +from flumotion.component.bouncers import multibouncer +from flumotion.component.bouncers.algorithms import tokentest __all__ = ['TokenTestBouncer'] -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" -class TokenTestBouncer(tokentest.TokenTestBase, bouncer.Bouncer): +class TokenTestBouncer(multibouncer.StaticMultiBouncer): - def do_setup(self): - self.haveProperties(self.config['properties']) - return defer.succeed(None) + algorithmClasses = tokentest.TokenTestAlgorithm diff -Nru flumotion-0.6.1/flumotion/component/bouncers/tokentest.py flumotion-0.9.1/flumotion/component/bouncers/tokentest.py --- flumotion-0.6.1/flumotion/component/bouncers/tokentest.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/tokentest.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -""" -A test token bouncer. -""" - -from flumotion.common import keycards, log -from flumotion.component.bouncers import plug -from flumotion.common.keycards import KeycardToken - -__version__ = "$Rev: 7797 $" - - -class TokenTestBase(log.Loggable): - - logCategory = 'tokentestbouncer' - keycardClasses = (KeycardToken, ) - - def haveProperties(self, properties): - self._authtoken = properties['authorized-token'] - - def do_authenticate(self, keycard): - keycard_data = keycard.getData() - self.debug('authenticating keycard from requester %s with token %s', - keycard_data['address'], keycard_data['token']) - - if keycard_data['token'] == self._authtoken: - # authenticated, so return the keycard with state authenticated - if self.addKeycard(keycard): - keycard.state = keycards.AUTHENTICATED - self.info('authenticated login of "%s" from ip address %s', - keycard.token, keycard.address) - self.debug('keycard %r authenticated, token %s ip address %s', - keycard, keycard.token, keycard.address) - return keycard - - keycard.state = keycards.REFUSED - self.info('keycard %r unauthorized, returning None', keycard) - return None - - -class BouncerTestTokenPlug(TokenTestBase, plug.BouncerPlug): - - def __init__(self, args): - plug.BouncerPlug.__init__(self, args) - self.haveProperties(args['properties']) diff -Nru flumotion-0.6.1/flumotion/component/bouncers/tokentest.xml flumotion-0.9.1/flumotion/component/bouncers/tokentest.xml --- flumotion-0.6.1/flumotion/component/bouncers/tokentest.xml 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/bouncers/tokentest.xml 2011-09-11 08:09:04.000000000 +0000 @@ -17,34 +17,12 @@ - - - - - - - - + - - - - - - - - - - - + - - - + + diff -Nru flumotion-0.6.1/flumotion/component/combiners/composite/composite.py flumotion-0.9.1/flumotion/component/combiners/composite/composite.py --- flumotion-0.6.1/flumotion/component/combiners/composite/composite.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/combiners/composite/composite.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,27 +1,23 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component import feedcomponent -__version__ = "$Rev: 6125 $" +__version__ = "$Rev$" class Composite(feedcomponent.MultiInputParseLaunchComponent): diff -Nru flumotion-0.6.1/flumotion/component/combiners/composite/composite.xml flumotion-0.9.1/flumotion/component/combiners/composite/composite.xml --- flumotion-0.6.1/flumotion/component/combiners/composite/composite.xml 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/combiners/composite/composite.xml 2011-09-11 08:09:04.000000000 +0000 @@ -20,8 +20,10 @@ - - + + = (0, 10, 32, 0): + # In release 0.10.32 input-selector was moved to coreelements. + d = check.checkPlugin('coreelements', 'gst-plugins', + (0, 10, 5, 2), 'input-selector', checkSignal) + else: + d = check.checkPlugin('selector', 'gst-plugins-bad', + (0, 10, 5, 2), 'input-selector', checkSignal) d.addCallback(cb) return d diff -Nru flumotion-0.6.1/flumotion/component/common/fgdp/fgdp.py flumotion-0.9.1/flumotion/component/common/fgdp/fgdp.py --- flumotion-0.6.1/flumotion/component/common/fgdp/fgdp.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/common/fgdp/fgdp.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,337 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gobject +import gst + +from twisted.internet import reactor + +from flumotion.component.common.fgdp import protocol as fgdp + +GDP_TYPE_PRODUCER = "producer-type" +GDP_TYPE_CONSUMER = "consumer-type" + + +class FDHandler(object): + """ + Base class for elements handling file descriptors + + @type fdelement: L{gst.Element} + """ + + def __init__(self, fdelement): + self.fdelement = fdelement + + ### FDHandler interface for subclasses + + def connectFd(self, fd): + ''' + Connects a file descriptor to the gstreamer element that will be + writting to it or reading from it + + @type fd: int + ''' + raise NotImplemented("subclass must implement connectFD") + + def disconnectFd(self, fd): + ''' + Disconnects a file descriptor from the gstreamer element that is + writting to it or reading from it + + @type fd: int + ''' + raise NotImplemented("subclass must implement disconnectFD") + + +class FDSrc(FDHandler): + """ + File descriptors handler based on fdsrc + + @type protocol: L{flummotion.common.gdp_protocol.FGDPBaseProtocol} + """ + + logCategory = 'gdp-producer' + + protocol = None + _handler_id = None + + def __init__(self, fdelement): + FDHandler.__init__(self, fdelement) + + def _check_eos(self, pad, event): + if event.type == gst.EVENT_EOS: + # EOS are triggered after a disconnection, when the read in the + # socket is 0 Bytes. Remove the handler and close the connection + pad.remove_event_probe(self._handler_id) + if self.protocol is not None: + reactor.callFromThread(self.protocol.loseConnection) + return False + return True + + def connectFd(self, fd): + # Unlock the state of the element, which should be already in the READY + # state. Add the fd and an event probe to detect disconnections + self.fdelement.set_locked_state(False) + self.fdelement.set_property('fd', fd) + srcpad = self.fdelement.get_pad("src") + self._handler_id = srcpad.add_event_probe(self._check_eos) + self.fdelement.set_state(gst.STATE_PLAYING) + + def disconnectFd(self, _): + # Set back the element to the READY state, in which a fd can be + # added/changed and lock the state of the element + self.fdelement.set_state(gst.STATE_READY) + self.fdelement.get_state(0) + self.fdelement.set_locked_state(True) + + +class MultiFDSink(FDHandler): + """ + File descriptors handler based on fdsrc + + @type protocol: L{flummotion.common.gdp_protocol.FGDPBaseProtocol} + """ + + logCategory = 'gdp-consumer' + + protocol = None + _activeFD = None + _handler_id = None + + def __init__(self, fdelement): + FDHandler.__init__(self, fdelement) + + def _on_client_removed(self, a, fd): + if self.protocol is not None: + reactor.callFromThread(self.protocol.loseConnection) + self.fdelement.handler_disconnect(self._handler_id) + + def connectFd(self, fd): + self.fdelement.emit('add', fd) + self._activeFD = fd + self._handler_id = self.fdelement.connect('client-fd-removed', + self._on_client_removed) + + def disconnectFd(self, fd): + if self._activeFD == fd: + self.fdelement.emit('remove', fd) + self._activeFD = None + + +class _ProtocolMixin(object): + """ + Provides an abstraction for the start and stop of a client or server using + the FGDP protocol, which depends on the 'mode' selected amongst 'push' or + 'pull' + + @type mode: str + @type host: str + @type port: int + """ + + mode = '' + host = None + port = None + _listener = None + _connector = None + + def start(self): + """ + Starts a server/client using the FGDP protocol when the element + is ready. + """ + if self.mode == 'push': + self._start_push() + else: + self._start_pull() + + def stop(self): + """ + Stops the server/client using the FGDP protocol. + """ + if self._listener is not None: + self._listener.stopListening() + + if self._connector is not None: + self._connector.disconnect() + + def _start_push(self): + self.info("Starting fgdp client") + factory = fgdp.FGDPClientFactory(self) + self._connector = reactor.connectTCP(self.host, self.port, factory) + + def _start_pull(self): + self.info("Starting fgdp server") + factory = fgdp.FGDPServerFactory(self) + self._listener = reactor.listenTCP(self.port, factory) + + +class FGDPBase(gst.Bin, _ProtocolMixin): + """ + Base class for gstreamer elements using the FGDP protocol + """ + + mode = 'pull' + host = 'localhost' + port = 15000 + username = 'user' + password = 'test' + maxDelay = 5 + version = '0.1' + + __gproperties__ = { + 'mode': (gobject.TYPE_STRING, 'mode', + "Connection mode: 'pull' or 'push'", + 'pull', gobject.PARAM_READWRITE), + 'host': (gobject.TYPE_STRING, 'host', + 'Name of the host to connect (in push mode)', + 'localhost', gobject.PARAM_READWRITE), + 'port': (gobject.TYPE_INT, 'port', + 'Connection port', + 1, 64000, 15000, gobject.PARAM_READWRITE), + 'username': (gobject.TYPE_STRING, 'user name', + 'Username for the authentication', + 'user', gobject.PARAM_READWRITE), + 'password': (gobject.TYPE_STRING, 'password', + 'Password for the authentication', + 'test', gobject.PARAM_READWRITE), + 'version': (gobject.TYPE_STRING, 'version', + 'Protocol version', + '0.1', gobject.PARAM_READWRITE), + 'max-reconnection-delay': (gobject.TYPE_FLOAT, + 'maximum delay between reconnections in seconds', + 'Maximum delay between reconnections in seconds (for push mode)', + 1, 100, 5, gobject.PARAM_READWRITE)} + + __gsignals__ = {"connected": (gobject.SIGNAL_RUN_LAST,\ + gobject.TYPE_NONE, []), + "disconnected": (gobject.SIGNAL_RUN_LAST,\ + gobject.TYPE_NONE, + (gobject.TYPE_STRING, ))} + + def _handle_error(self, message): + err = gst.GError(gst.RESOURCE_ERROR, + gst.RESOURCE_ERROR_FAILED, message) + m = gst.message_new_error(self, err, message) + self.post_message(m) + self.error(message) + + def do_change_state(self, transition): + if transition == gst.STATE_CHANGE_READY_TO_PAUSED: + try: + self.prepare() + self.start() + except Exception, e: + self._handle_error(str(e)) + self.stop() + return gst.STATE_CHANGE_FAILURE + elif transition == gst.STATE_CHANGE_PAUSED_TO_READY: + self.stop() + return gst.Bin.do_change_state(self, transition) + + def do_set_property(self, prop, value): + if prop.name in ['mode', 'host', 'username', 'password', 'port', + 'version']: + setattr(self, prop.name, value) + elif prop.name == 'max-reconnection-delay': + self.maxDelay = float(value) + else: + raise AttributeError('unknown property %s' % prop.name) + + def do_get_property(self, prop): + if prop.name in ['mode', 'host', 'username', 'password', 'port', + 'version']: + return getattr(self, prop.name) + if prop.name == 'max-reconnection-delay': + return self.maxDelay + raise AttributeError('unknown property %s' % prop.name) + + def prepare(self): + """ + Should be implemented by subclasses that needs to do something + before starting the server/client + """ + pass + + +class FGDPSink(FGDPBase, MultiFDSink): + ''' + GStreamer sink element using the FGDP protocol + ''' + + mode = 'push' + + __gstdetails__ = ('FGDPsink', 'Sink', + 'Flumotion GStreamer data protocol sink', + 'Flumotion DevTeam') + + def __init__(self): + FGDPBase.__init__(self) + # Create elements + gdppay = gst.element_factory_make('gdppay') + self.fdelement = gst.element_factory_make('multifdsink') + # Set default properties + self.fdelement.set_property('sync', False) + self.fdelement.set_property('unit-type', 2) + self.fdelement.set_property('units-max', 1 * gst.SECOND) + self.fdelement.set_property('units-soft-max', 700 * gst.MSECOND) + self.fdelement.set_property('recover-policy', 1) + # Create fd handler proxy + MultiFDSink.__init__(self, self.fdelement) + # Add elements to the bin and link them + self.add(gdppay, self.fdelement) + gdppay.link(self.fdelement) + # Create sink pads + self._sink_pad = gst.GhostPad('sink', gdppay.get_pad('sink')) + self.add_pad(self._sink_pad) + + +class FGDPSrc(FGDPBase, FDSrc): + ''' + GStreamer source element using the FGDP protocol + ''' + + mode = 'pull' + + __gstdetails__ = ('FGDPsrc', 'Source', + 'Flumotion GStreamer data protocol source', + 'Flumotion DevTeam') + + def __init__(self): + FGDPBase.__init__(self) + # Create elements + self.fdelement = gst.element_factory_make('fdsrc') + gdpdepay = gst.element_factory_make('gdpdepay') + # Add elements to the bin and link them + self.add(self.fdelement, gdpdepay) + self.fdelement.link(gdpdepay) + # Create fd handler proxy + FDSrc.__init__(self, self.fdelement) + # Create sink pads + self._src_pad = gst.GhostPad('src', gdpdepay.get_pad('src')) + self.add_pad(self._src_pad) + + def prepare(self): + # Lock the state until we get the first connection and we can pass it + # a valid fd, otherwhise it will be using stdin. + self.fdelement.set_locked_state(True) + + +gobject.type_register(FGDPSink) +gst.element_register(FGDPSink, "fgdpsink", gst.RANK_MARGINAL) +gobject.type_register(FGDPSrc) +gst.element_register(FGDPSrc, "fgdpsrc", gst.RANK_MARGINAL) diff -Nru flumotion-0.6.1/flumotion/component/common/fgdp/fgdp.xml flumotion-0.9.1/flumotion/component/common/fgdp/fgdp.xml --- flumotion-0.6.1/flumotion/component/common/fgdp/fgdp.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/common/fgdp/fgdp.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/common/fgdp/__init__.py flumotion-0.9.1/flumotion/component/common/fgdp/__init__.py --- flumotion-0.6.1/flumotion/component/common/fgdp/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/common/fgdp/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,16 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. diff -Nru flumotion-0.6.1/flumotion/component/common/fgdp/Makefile.am flumotion-0.9.1/flumotion/component/common/fgdp/Makefile.am --- flumotion-0.6.1/flumotion/component/common/fgdp/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/common/fgdp/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,15 @@ +include $(top_srcdir)/common/python.mk + +fgdpdir = $(libdir)/flumotion/python/flumotion/component/common/fgdp +fgdp_DATA = fgdp.xml +fgdp_PYTHON = \ + __init__.py \ + fgdp.py \ + protocol.py + +TAGS_FILES = $(fgdp_PYTHON) + +clean-local: + rm -rf *.pyc *.pyo + +EXTRA_DIST = $(fgdp_DATA) $(fgdp_PYTHON) diff -Nru flumotion-0.6.1/flumotion/component/common/fgdp/Makefile.in flumotion-0.9.1/flumotion/component/common/fgdp/Makefile.in --- flumotion-0.6.1/flumotion/component/common/fgdp/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/common/fgdp/Makefile.in 2011-09-11 08:09:19.000000000 +0000 @@ -0,0 +1,542 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(fgdp_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/common/fgdp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(fgdpdir)" "$(DESTDIR)$(fgdpdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(fgdp_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +fgdpdir = $(libdir)/flumotion/python/flumotion/component/common/fgdp +fgdp_DATA = fgdp.xml +fgdp_PYTHON = \ + __init__.py \ + fgdp.py \ + protocol.py + +TAGS_FILES = $(fgdp_PYTHON) +EXTRA_DIST = $(fgdp_DATA) $(fgdp_PYTHON) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/common/fgdp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/common/fgdp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-fgdpPYTHON: $(fgdp_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(fgdpdir)" || $(MKDIR_P) "$(DESTDIR)$(fgdpdir)" + @list='$(fgdp_PYTHON)'; dlist=; list2=; test -n "$(fgdpdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(fgdpdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(fgdpdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(fgdpdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(fgdpdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-fgdpPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(fgdp_PYTHON)'; test -n "$(fgdpdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$fileso +install-fgdpDATA: $(fgdp_DATA) + @$(NORMAL_INSTALL) + test -z "$(fgdpdir)" || $(MKDIR_P) "$(DESTDIR)$(fgdpdir)" + @list='$(fgdp_DATA)'; test -n "$(fgdpdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(fgdpdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(fgdpdir)" || exit $$?; \ + done + +uninstall-fgdpDATA: + @$(NORMAL_UNINSTALL) + @list='$(fgdp_DATA)'; test -n "$(fgdpdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(fgdpdir)" "$(DESTDIR)$(fgdpdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-fgdpDATA install-fgdpPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-fgdpDATA uninstall-fgdpPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-fgdpDATA \ + install-fgdpPYTHON install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-fgdpDATA uninstall-fgdpPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/common/fgdp/protocol.py flumotion-0.9.1/flumotion/component/common/fgdp/protocol.py --- flumotion-0.6.1/flumotion/component/common/fgdp/protocol.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/common/fgdp/protocol.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,519 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import base64 +from random import Random + +from twisted.internet import reactor +from twisted.internet.protocol import ReconnectingClientFactory, Factory +from twisted.protocols.basic import LineReceiver + +from Crypto.Hash import SHA + +from flumotion.common import log + +__version__ = "$Rev$" + +PROTOCOL_NAME = "FGDP" + + +class ProtocolException(Exception): + error = '' + + def __init__(self, reason=''): + self.reason = reason + + def __str__(self): + return "%s: %s" % (self.error, self.reason) + + +class UnexpectedResponse(ProtocolException): + "Received an unexpected response, in a wrong state" + error = "Unexpected response" + + +class UnexpectedCommand(ProtocolException): + "Received an unexpected command, in a wrong state" + error = "Unexpected command" + + +class MalformedCommand(ProtocolException): + "The command is badly formed" + error = "Malformed command" + + +class MalformedResponse(ProtocolException): + "The response is badly formed" + error = "Malformed response" + + +class InvalidVersion(ProtocolException): + "The version of the protocol is not valid" + error = "Invalid version" + + +class AuthenticationFailed(ProtocolException): + "Authentication is not valid and failed" + error = "Invalid authentication" + + +class ErrorResponse(ProtocolException): + "Got an error response" + error = "Received error response" + + +class Command(object): + ''' + Command for the FGDP procotol, sent by the client to the server + + @type command: str + @type content: content + @type version: tuple + ''' + + def __init__(self, command, content, version): + self.command = command + self.content = content + self.version = version + + @staticmethod + def parseCommand(commandString, versionCheck=None): + ''' + Parses a command string + + @param commandString: string with the command + @type commandString: str + @param versionCheck: version number to check + @type versionCheck: tuple + + @return: A newly created L{Command} + @rtype: L{Command} + @raise MalformedCommand: raised when the command is not valid + ''' + try: + command, line = commandString.split(' ', 1) + content, protoVersion = line.rsplit(' ', 1) + protocol, versionStr = protoVersion.split('/') + version = tuple(map(int, versionStr.split('.'))) + except ValueError: + raise MalformedCommand(commandString) + if protocol != PROTOCOL_NAME: + raise MalformedCommand(commandString) + if versionCheck and version != versionCheck: + raise InvalidVersion('version %s is not compatible with %s ' % + (version, versionCheck)) + return Command(command, content, version) + + def __str__(self): + return "%s %s %s/%s" % (self.command, self.content, PROTOCOL_NAME, + '.'.join(map(str, self.version))) + + def __eq__(self, obj): + if not isinstance(obj, Command): + return False + return (str(self) == str(obj)) + + +class Response(object): + ''' + Response for the FGDP protocol, sent by the server to the client + + @type command: str + @type content: str + @type version: tuple + ''' + + def __init__(self, response, content, version): + self.response = response + self.content = content + self.version = version + + @staticmethod + def parseResponse(responseString, versionCheck=None): + ''' + Parses a response string + + @param responseString: string with the response + @type responseString: str + @param versionCheck: version number to check + @type versionCheck: tuple + + @return: A newly created L{Response} + @rtype: L{Response} + @raise MalformedResponse: raised when the command is not valid + ''' + try: + protoVersion, line = responseString.split(' ', 1) + protocol, versionStr = protoVersion.split('/') + version = tuple(map(int, versionStr.split('.'))) + response, content = line.split(' ', 1) + except ValueError: + raise MalformedResponse(responseString) + if protocol != PROTOCOL_NAME: + raise MalformedResponse(responseString) + if versionCheck and version != versionCheck: + raise InvalidVersion('version %s is not compatible with %s ' % + (version, versionCheck)) + return Response(response, content, version) + + def __str__(self): + return "%s/%s %s %s" % (PROTOCOL_NAME, + '.'.join(map(str, self.version)), + self.response, self.content) + + def __eq__(self, obj): + if not isinstance(obj, Response): + return False + return (str(self) == str(obj)) + + +class FGDP_0_1(object): + ''' + Definitions for the version 0.1 of the FGDP protocol. + Future extensions of the protocol should subclass this class. + ''' + + LOGIN_COMMAND = 'LOGIN' + AUTH_COMMAND = 'AUTH' + + OK_RESPONSE = 'OK' + ERROR_RESPONSE = 'ERROR' + CHALLENGE_RESPONSE = 'CHALLENGE' + + +class FGDPBaseProtocol(LineReceiver, log.Loggable): + """ + Base class for the twisted side of the FGDP protocol + """ + + _transport = None + _gstElement = None + _fd = None + _user = '' + _password = '' + + def __init__(self, gstElement): + self._gstElement = gstElement + self._gstElement.protocol = self + + def startProtocol(self): + """ + Subclasses must implement this method to start the protocol after a + new connection has been made + """ + raise NotImplemented('Subclasses must implement "startProtocol"') + + def stopProtocol(self, reason): + """ + Subclasses must implement this method to stop the protocol after the + connection has been closed + + @type reason: L{twsited.python.failure.Failure} + """ + raise NotImplemented('Subclasses must implement "stopProtocol"') + + def lineReceived(self, line): + """ + Subclasess must implement this method to process the messages of the + line-based protocol + + @type line: str + """ + raise NotImplemented('Subclasses must implement "lineReceived"') + + def makeConnection(self, transport): + """ + Store a reference of the trasport and file descriptor of the + used by the new connection + """ + self._transport = transport + self._fd = transport.fileno() + self.connectionMade() + + def connectionMade(self): + self.info("Connection made with peer, starting protocol") + self.startProtocol() + + def connectionLost(self, reason): + self.info("Connection lost with FGDP peer: %s", + reason.getErrorMessage()) + self.stopProtocol(reason) + + def loseConnection(self): + """ + Loses the current connection and triggers the stop of the protocol. + Once the authentication has finished, the file descriptor is not + handled anymore by the twisted reactor. A disconnection in the + gstreamer element handling the file descriptor should call this method + to notify the protocol about it. + """ + if self._transport is not None: + self._transport.loseConnection() + + def _makeHash(self, values): + sha = SHA.new() + sha.update(':'.join(values)) + return sha.hexdigest() + + def _sendMessage(self, message, transport=None): + transport = transport or self._transport + self.debug('Sending message: "%s"', message) + transport.write("%s\r\n" % message) + + def _disconnectFD(self, reason): + if self._fd != None: + self._gstElement.disconnectFd(self._fd) + self._gstElement.emit('disconnected', reason.getErrorMessage()) + + def _delegateFD(self): + # Take out the fd from twisted reactor and pass it to element + # using it + # See http://twistedmatrix.com/trac/ticket/1796 + reactor.removeReader(self._transport) + self._gstElement.connectFd(self._fd) + self._gstElement.emit('connected') + + +class FGDPServer_0_1(FGDP_0_1, FGDPBaseProtocol): + ''' + Implementation of the server-side FGDP protocol for version 0.1 + ''' + + logCategory = 'fgdp-server' + + SERVER_STATE_DISCONNECTED = "disconnected" + SERVER_STATE_AUTHENTICATE = "authenticate" + SERVER_STATE_CONNECTED = "connected" + + _state = SERVER_STATE_DISCONNECTED + _version = (0, 1) + _challenge = '' + _random = None + + def __init__(self, gstElement): + self._user = gstElement.username + self._password = gstElement.password + self._random = Random() + FGDPBaseProtocol.__init__(self, gstElement) + + def makeConnection(self, transport): + # The protocol must refuse new connections if a client is already + # connected. + self.factory.clients += 1 + if self.factory.clients > 1: + r = Response(self.ERROR_RESPONSE, "already connected", + self._version) + self._sendMessage(r, transport) + self.warning("Trying to make a new connection, but a client " + "is already connected.") + transport.loseConnection() + return + FGDPBaseProtocol.makeConnection(self, transport) + + def startProtocol(self): + pass + + def stopProtocol(self, reason): + self.info("Stopping protocol session") + self.connected = 0 + self.factory.clients -= 1 + self._state = self.SERVER_STATE_DISCONNECTED + self._disconnectFD(reason) + + def lineReceived(self, line): + # Parse command and check state + try: + command = Command.parseCommand(line) + self._checkState(command) + except (ErrorResponse, MalformedCommand, UnexpectedCommand), e: + self._handleError(e) + return + # State DISCONNECTED + if self._state == self.SERVER_STATE_DISCONNECTED: + self._user = command.content + self._challengeClient() + # State AUTHENTICATE + elif self._state == self.SERVER_STATE_AUTHENTICATE: + try: + self._checkAuthentication(command) + except AuthenticationFailed, e: + self._handleError(e) + return + self._startStreaming() + + def _checkState(self, command): + if self._state == self.SERVER_STATE_DISCONNECTED and \ + command.command != self.LOGIN_COMMAND: + raise UnexpectedCommand(command.command) + if self._state == self.SERVER_STATE_AUTHENTICATE and \ + command.command != self.AUTH_COMMAND: + raise UnexpectedCommand(command.command) + if self._state == self.SERVER_STATE_CONNECTED: + # FIXME: Non fatal error + raise UnexpectedCommand(command.command) + + def _handleError(self, error): + self.warning("%s", error) + response = Response(ErrorResponse, "Server error: %s" % error, + self._version) + self._sendMessage(response) + self.loseConnection() + + def _challengeClient(self): + self.info("Challenging client") + self._state = self.SERVER_STATE_AUTHENTICATE + self._challenge = base64.b64encode( + str(self._random.getrandbits(1024))) + response = Response(self.CHALLENGE_RESPONSE, self._challenge, + self._version) + self._sendMessage(response) + + def _startStreaming(self): + self._state = self.SERVER_STATE_CONNECTED + response = Response(self.OK_RESPONSE, 'Authenticated', self._version) + self._sendMessage(response) + self.info("Started streaming") + self._delegateFD() + + def _checkAuthentication(self, command): + digest = self._makeHash([self._user, self._password, self._challenge]) + if digest != command.content: + raise AuthenticationFailed( + "could not verify the challenge response") + return False + + +class FGDPClient_0_1(FGDP_0_1, FGDPBaseProtocol): + ''' + Implementation of the client-side FGDP protocol for version 0.1 + ''' + + logCategory = 'fgdp-client' + + CLIENT_STATE_DISCONNECTED = "disconnected" + CLIENT_STATE_LOGIN = "login" + CLIENT_STATE_AUTHENTICATING = "authenticate" + CLIENT_STATE_CONNECTED = "connected" + + _version = (0, 1) + _state = CLIENT_STATE_DISCONNECTED + + def __init__(self, gstElement): + self._user = gstElement.username + self._password = gstElement.password + FGDPBaseProtocol.__init__(self, gstElement) + + def startProtocol(self): + self.info("Starting protocol session") + self._login() + + def stopProtocol(self, reason): + self.info('Stopping protocol session') + self._state = self.CLIENT_STATE_DISCONNECTED + self._disconnectFD(reason) + + def lineReceived(self, line): + # Parse response and check state + try: + response = Response.parseResponse(line) + self._checkState(response) + except (MalformedResponse, ErrorResponse, UnexpectedResponse), e: + self.warning("%s", e) + self.loseConnection() + return + # State LOGIN + if self._state == self.CLIENT_STATE_LOGIN: + self._authenticate(response) + # State AUTHENTICATING + elif self._state == self.CLIENT_STATE_AUTHENTICATING: + self._startStreaming() + + def _checkState(self, response): + if response.response == self.ERROR_RESPONSE: + raise ErrorResponse(response.content) + if self._state == self.CLIENT_STATE_LOGIN and \ + response.response != self.CHALLENGE_RESPONSE: + raise UnexpectedResponse(response.content) + if self._state == self.CLIENT_STATE_AUTHENTICATING and \ + response.response != self.OK_RESPONSE: + raise UnexpectedResponse(response.content) + if self._state == self.CLIENT_STATE_CONNECTED: + raise UnexpectedResponse(response.content) + + def _login(self): + self.info('Starting client login with user=%s, password=%s', + self._user, self._password) + self._state = self.CLIENT_STATE_LOGIN + command = Command(self.LOGIN_COMMAND, self._user, self._version) + self._sendMessage(command) + + def _authenticate(self, response): + self.info('Authenticating user with challenge %s', response.content) + self._state = self.CLIENT_STATE_AUTHENTICATING + res = self._makeHash([self._user, self._password, response.content]) + command = Command(self.AUTH_COMMAND, res, self._version) + self._sendMessage(command) + + def _startStreaming(self): + self.info("Starting streaming") + self._state = self.CLIENT_STATE_CONNECTED + self._delegateFD() + + +class FGDPClientFactory(ReconnectingClientFactory, log.Loggable): + logCategory = 'fgdp-client' + + _supportedVersions = ['0.1'] + + def __init__(self, gstElement): + ReconnectingClientFactory.maxDelay = gstElement.maxDelay + self.gstElement = gstElement + self._setProtocol(gstElement.version) + + def _setProtocol(self, version): + if version in self._supportedVersions: + classname = 'FGDPClient_%s' % version.replace('.', '_') + self.protocol = globals()[classname] + + def buildProtocol(self, addr): + p = self.protocol(self.gstElement) + p.factory = self + return p + + def retry(self, connector=None): + self.info("Trying reconnection with FGDP peer") + return ReconnectingClientFactory.retry(self, connector) + + +class FGDPServerFactory(Factory): + + clients = 0 + _supportedVersions = ['0.1'] + + def __init__(self, gstElement): + self.gstElement = gstElement + self._setProtocol(gstElement.version) + + def _setProtocol(self, version): + if version in self._supportedVersions: + classname = 'FGDPServer_%s' % version.replace('.', '_') + self.protocol = globals()[classname] + + def buildProtocol(self, addr): + p = self.protocol(self.gstElement) + p.factory = self + return p diff -Nru flumotion-0.6.1/flumotion/component/common/__init__.py flumotion-0.9.1/flumotion/component/common/__init__.py --- flumotion-0.6.1/flumotion/component/common/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/common/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,16 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. diff -Nru flumotion-0.6.1/flumotion/component/common/Makefile.am flumotion-0.9.1/flumotion/component/common/Makefile.am --- flumotion-0.6.1/flumotion/component/common/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/common/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,17 @@ +include $(top_srcdir)/common/python.mk + +commondir = $(libdir)/flumotion/python/flumotion/component/common +common_DATA = +common_PYTHON = \ + __init__.py + +TAGS_FILES = $(common_PYTHON) + +clean-local: + rm -rf *.pyc *.pyo + + +SUBDIRS = \ + fgdp + +EXTRA_DIST = $(common_DATA) diff -Nru flumotion-0.6.1/flumotion/component/common/Makefile.in flumotion-0.9.1/flumotion/component/common/Makefile.in --- flumotion-0.6.1/flumotion/component/common/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/common/Makefile.in 2011-09-11 08:09:19.000000000 +0000 @@ -0,0 +1,744 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(common_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/common +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(commondir)" "$(DESTDIR)$(commondir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(common_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +commondir = $(libdir)/flumotion/python/flumotion/component/common +common_DATA = +common_PYTHON = \ + __init__.py + +TAGS_FILES = $(common_PYTHON) +SUBDIRS = \ + fgdp + +EXTRA_DIST = $(common_DATA) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/common/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/common/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-commonPYTHON: $(common_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(commondir)" || $(MKDIR_P) "$(DESTDIR)$(commondir)" + @list='$(common_PYTHON)'; dlist=; list2=; test -n "$(commondir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(commondir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(commondir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(commondir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(commondir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-commonPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(common_PYTHON)'; test -n "$(commondir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(commondir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(commondir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(commondir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(commondir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(commondir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(commondir)" && rm -f $$fileso +install-commonDATA: $(common_DATA) + @$(NORMAL_INSTALL) + test -z "$(commondir)" || $(MKDIR_P) "$(DESTDIR)$(commondir)" + @list='$(common_DATA)'; test -n "$(commondir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(commondir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(commondir)" || exit $$?; \ + done + +uninstall-commonDATA: + @$(NORMAL_UNINSTALL) + @list='$(common_DATA)'; test -n "$(commondir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(commondir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(commondir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(commondir)" "$(DESTDIR)$(commondir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-commonDATA install-commonPYTHON + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-commonDATA uninstall-commonPYTHON + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-local ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-commonDATA \ + install-commonPYTHON install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-commonDATA uninstall-commonPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/component.py flumotion-0.9.1/flumotion/component/component.py --- flumotion-0.6.1/flumotion/component/component.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/component.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_component -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -32,18 +28,17 @@ from twisted.python import reflect from zope.interface import implements -from flumotion.configure import configure from flumotion.common import interfaces, errors, log, planet, medium from flumotion.common import componentui, common, messages from flumotion.common import interfaces, reflectcall, debug from flumotion.common.i18n import N_, gettexter from flumotion.common.planet import moods from flumotion.common.poller import Poller -from flumotion.twisted import credentials from flumotion.twisted import pb as fpb +from flumotion.twisted.flavors import IStateCacheableListener -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" T_ = gettexter() @@ -149,6 +144,8 @@ def call_proc(_, p): log.debug('', 'calling %r', p) return p(*args, **kwargs) + if not procs: + return defer.succeed(None) p, procs = procs[0], procs[1:] d = defer.maybeDeferred(call_proc, None, p) for p in procs: @@ -212,7 +209,7 @@ Note: this is insufficient in general, and should be replaced by network mapping stuff later. """ - assert self.remote + assert self.remote, "%r does not have a remote connection" % self host = self.remote.broker.transport.getHost() self.debug("getIP(): using %r as our IP", host.host) return host.host @@ -268,6 +265,11 @@ """ return self.comp.uiState + def remote_getMood(self): + """Get mood of the component + """ + return self.comp.getMood() + def remote_getMasterClockInfo(self): """ Base implementation of getMasterClockInfo, can be overridden by @@ -285,8 +287,18 @@ @since: 0.6.0 """ self.debug('Setting Flumotion debug level to %s' % debug) + self.comp.uiState.set('flu-debug', debug) log.setDebug(debug) + def remote_modifyProperty(self, property, value): + """ + Modifies a component property on the fly + + @since: 0.9.0 + """ + self.info('Modifying property %s to %s', property, value) + return self.comp.modifyProperty(property, value) + class BaseComponent(common.InitMixin, log.Loggable): """ @@ -315,6 +327,8 @@ logCategory = 'basecomp' componentMediumClass = BaseComponentMedium + implements(IStateCacheableListener) + def __init__(self, config, haveError=None): """ Subclasses should not override __init__ at all. @@ -358,6 +372,12 @@ self.uiState.addKey('start-time') self.uiState.addKey('current-time') self.uiState.addKey('virtual-size') + self.uiState.addKey('total-memory') + self.uiState.addKey('num-cpus') + self.uiState.addKey('flu-debug') + self.uiState.addKey('properties') + + self.uiState.addHook(self) self.plugs = {} @@ -366,11 +386,61 @@ # Start the cpu-usage updating. self._lastTime = time.time() self._lastClock = time.clock() - self._cpuPoller = Poller(self._pollCPU, 5) - self._memoryPoller = Poller(self._pollMemory, 60) - + self._cpuPoller = Poller(self._pollCPU, 5, start=False) + self._memoryPoller = Poller(self._pollMemory, 60, start=False) + self._cpuPollerDC = None + self._memoryPollerDC = None self._shutdownHook = None + ### IStateCacheable Interface + + def observerAppend(self, observer, num): + """ + Triggered when a uiState observer was added. + + Default implementation is to start the memory and cpu pollers. + + Note: + Subclasses can override me but should chain me up to start these + pollers + """ + self.debug("observer has started watching us, starting pollers") + if not self._cpuPoller.running and not self._cpuPollerDC: + self._cpuPollerDC = reactor.callLater(0, + self._cpuPoller.start, + immediately=True) + if not self._memoryPoller.running and not self._memoryPollerDC: + self._memoryPollerDC = reactor.callLater(0, + self._memoryPoller.start, + immediately=True) + + def observerRemove(self, observer, num): + """ + Triggered when a uiState observer has left. + + Default implementation is to stop the memory and cpu pollers + when the total number of observers denoted by the 'num' + argument becomes zero. + + Note: + Subclasses can override me but should chain me up to stop these + pollers + """ + if num == 0: + self.debug("no more observers left, shutting down pollers") + # Cancel any pending callLaters + if self._cpuPollerDC: + self._cpuPollerDC.cancel() + self._cpuPollerDC = None + if self._memoryPollerDC: + self._memoryPollerDC.cancel() + self._memoryPollerDC = None + + if self._cpuPoller: + self._cpuPoller.stop() + if self._memoryPoller: + self._memoryPoller.stop() + def do_check(self): """ Subclasses can implement me to run any checks before the component @@ -422,6 +492,7 @@ The return value may be a deferred. """ + plug_starts = [] for socket, plugs in self.config['plugs'].items(): self.plugs[socket] = [] for plug in plugs: @@ -432,7 +503,7 @@ self.plugs[socket].append(instance) self.debug('Starting plug %r on socket %s', instance, socket) - instance.start(self) + plug_starts.append(instance.start) # Call check methods, starting from the base class and working down to # subclasses. @@ -449,7 +520,8 @@ raise errors.ComponentSetupHandledError() checks.append(checkErrorCallback) - return _maybeDeferredChain(checks, self) + + return _maybeDeferredChain(plug_starts + checks, self) def do_stop(self): """ @@ -459,15 +531,24 @@ @Returns: L{twisted.internet.defer.Deferred} """ + plug_stops = [] for socket, plugs in self.plugs.items(): for plug in plugs: self.debug('Stopping plug %r on socket %s', plug, socket) - plug.stop(self) + plug_stops.append(plug.stop) for message in self.state.get('messages'): # FIXME: not necessary self.state.remove('messages', message) + # Cancel any pending callLaters + if self._cpuPollerDC: + self._cpuPollerDC.cancel() + self._cpuPollerDC = None + if self._memoryPollerDC: + self._memoryPollerDC.cancel() + self._memoryPollerDC = None + if self._cpuPoller: self._cpuPoller.stop() self._cpuPoller = None @@ -479,6 +560,8 @@ self.debug('_stoppedCallback: firing shutdown hook') self._shutdownHook() + return _maybeDeferredChain(plug_stops, self) + ### BaseComponent implementation related to compoment protocol def setup(self): @@ -513,6 +596,10 @@ self.setMood(moods.waking) self.uiState.set('start-time', time.time()) + self.uiState.set('total-memory', self._getTotalMemory()) + self.uiState.set('num-cpus', self._getNumberOfCPUs()) + self.uiState.set('flu-debug', log.getDebug()) + d = run_setups() d.addCallbacks(setup_complete, got_error) # all status info via messages and the mood @@ -558,6 +645,9 @@ assert isinstance(medium, BaseComponentMedium) self.medium = medium self.medium.logName = self.getName() + for plugs in self.plugs.values(): + for plug in plugs: + self._export_plug_interface(plug, medium) def setMood(self, mood): """ @@ -616,6 +706,22 @@ if self._haveError: self._haveError(message) + def warnDeprecatedProperties(self, list): + """ + Add a warning messages for deprecated properties. + + @param list: list of property names. + @type list: list of str + """ + msg = ("Your configuration uses deprecated properties. " + "Please update your configuration and correct them.\n") + m = messages.Warning(T_(N_(msg)), mid="deprecated") + for prop in list: + m.add(T_(N_( + "Please remove '%s' property.\n"), prop)) + self.addMessage(m) + self.warning(msg) + def fixRenamedProperties(self, properties, list): """ Fix properties that have been renamed from a previous version, @@ -666,7 +772,67 @@ 'no manager.' % (methodName, args, kwargs)) + def modifyProperty(self, property_name, value): + """ + Modifies a property of the compoment. + + Components with modifiable properties (properties that can be changed + on the fly) should implement modify_property_(propertyName) to receive + the call + + @param property_name: Name of the property to change + @type property_name: str + @param value: Value to set + """ + # Transform property name to camel case: + # max-reconnections-delay -> MaxReconnectionsDelay + p = ''.join([t.title() for t in property_name.split('-')]) + method_name = "modify_property_%s" % p + if not hasattr(self, method_name): + raise errors.PropertyNotModifiableError("%s" % (property_name)) + method = getattr(self, method_name) + if not method(value): + return False + self.config['properties'][property_name] = value + self.uiState.set('properties', self.config['properties']) + return True + + def checkPropertyType(self, property_name, value, allowed_type): + """ + Check that the value to be set in a property is of the correct type + + @returns: True if the value is of the correct type + """ + if type(value) != allowed_type: + self.warning("Could not set the property %s in %s. " + "'value' must be of %s", property_name, self, + allowed_type) + return False + return True + + def _export_plug_interface(self, plug, medium): + try: + namespace = plug.get_namespace() + except AttributeError: + self.debug("Plug %r does not provide namespace, " + "its interface will not be exposed", plug) + return + + self.debug("Exposing plug's %r interface in namespace %r", + plug, namespace) + for method in filter(callable, + [getattr(plug, m) for m in dir(plug) + if m.startswith('remote_')]): + if namespace: + name = "".join(("remote_", namespace, "_", + method.__name__[len("remote_"):])) + else: + name = method.__name__ + self.debug("Exposing method %r as %r in %r", method, name, medium) + setattr(medium, name, method) + def _pollCPU(self): + self._cpuPollerDC = None # update CPU time stats nowTime = time.time() nowClock = time.clock() @@ -683,6 +849,7 @@ self.uiState.set('current-time', nowTime) def _pollMemory(self): + self._memoryPollerDC = None # Figure out our virtual memory size and report that. # I don't know a nicer way to find vsize than groping /proc/ handle = open('/proc/%d/stat' % os.getpid()) @@ -694,3 +861,16 @@ vsize = int(fields[22]) self.log('vsize is %d', vsize) self.uiState.set('virtual-size', vsize) + + def _getTotalMemory(self): + f = open("/proc/meminfo") + memtotal = f.readline() + f.close() + return int(memtotal[memtotal.index(":") + 1: -3]) * 1024 + + def _getNumberOfCPUs(self): + try: + return open('/proc/cpuinfo').read().count('processor\t:') + except IOError: + self.debug('Can not determine number of CPUs on this system') + return 1 diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/admin_gtk.py flumotion-0.9.1/flumotion/component/consumers/disker/admin_gtk.py --- flumotion-0.6.1/flumotion/component/consumers/disker/admin_gtk.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,40 +1,45 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os import gettext +import time import gtk -from flumotion.common import errors, format +from flumotion.common import errors +from flumotion.common import format as formatting from flumotion.component.base.admin_gtk import BaseAdminGtk from flumotion.component.base.baseadminnode import BaseAdminGtkNode -from flumotion.common.eventcalendar import LOCAL, UTC +from flumotion.common.tz import LOCAL, UTC _ = gettext.gettext -__version__ = "$Rev: 7587 $" +__version__ = "$Rev$" +( + COLUMN_TSTAMP, + COLUMN_FILENAME, + COLUMN_CREATED, + COLUMN_SIZE, + COLUMN_LOCATION, +) = range(5) from kiwi.ui import objectlist @@ -52,7 +57,7 @@ # when is in UTC, but show it in local timezone instead when = when.replace(tzinfo=UTC).astimezone(LOCAL) - self.whenLocal = format.formatTimeStamp(when.timetuple()) + self.whenLocal = formatting.formatTimeStamp(when.timetuple()) self.which = which self.what = what @@ -200,11 +205,111 @@ return None +class StatusNode(BaseAdminGtkNode): + gladeFile = os.path.join('flumotion', 'component', 'consumers', + 'disker', 'status.glade') + + _iters = {} + + def haveWidgetTree(self): + + def cb_getUIState(state): + values = state.get('filelist') + self.store.clear() + for item in values: + self._append(item) + if self.rotateTypeLabel: + self.rotateTypeLabel.set_text("Rotation: %s" % \ + state.get('rotate-type')) + self._setCurrentLabel(state) + self._setDiskLabel(state) + + self.widget = self.wtree.get_widget('status-widget') + self.diskFreeLabel = self.wtree.get_widget('label-free') + self.rotateTypeLabel = self.wtree.get_widget('label-rotation') + self.currentFilenameLabel = self.wtree.get_widget('label-current') + self._buildFilelist() + d = self.callRemote("getUIState") + d.addCallback(cb_getUIState) + + def _buildFilelist(self): + + def getGtkColumn(title, text, visible=True, clickable=True): + col = gtk.TreeViewColumn(title, + gtk.CellRendererText(), + text=text) + col.set_property('visible', visible) + col.set_property('clickable', clickable) + col.set_sort_column_id(text) + return col + + self.store = gtk.ListStore(str, str, str, str, str) + # Sort by time created (default) + self.store.set_sort_column_id(0, gtk.SORT_DESCENDING) + self.tree = self.wtree.get_widget('treeview-filelist') + self.tree.append_column(getGtkColumn('tstamp', + COLUMN_TSTAMP, + visible=False, + clickable=False)) + self.tree.append_column(getGtkColumn('Filename', + COLUMN_FILENAME)) + self.tree.append_column(getGtkColumn('Time created', + COLUMN_CREATED)) + self.tree.append_column(getGtkColumn('Size in bytes', + COLUMN_SIZE)) + self.tree.append_column(getGtkColumn('Location', + COLUMN_LOCATION)) + self.tree.set_rules_hint(True) + self.tree.set_model(self.store) + + def _append(self, item): + created = formatting.formatTimeStamp(time.localtime(item[0])) + self._iters[item[0]] = self.store.append([str(item[0]), + os.path.basename( + str(item[1])), + created, + str(item[2]), + str(item[1])]) + + def _setDiskLabel(self, state): + if self.diskFreeLabel: + df = state.get('disk-free') + if df != None: + self.diskFreeLabel.set_text( + "Available Disk Space: %s" % df) + + def _setCurrentLabel(self, state): + if self.currentFilenameLabel: + self.currentFilenameLabel.set_text("Current filename: %s" % \ + state.get("filename")) + + def stateSet(self, state, key, value): + if key == "disk-free": + self._setDiskLabel(state) + if key == "filename": + self._setCurrentLabel(state) + + def stateAppend(self, state, key, value): + if key == 'filelist': + self._append(value) + + def stateRemove(self, state, key, value): + if key == 'filelist': + i = self._iters[value[0]] + if i: + self.store.remove(iter) + self._iters.pop(value[0]) + + class DiskerAdminGtk(BaseAdminGtk): def setup(self): filename = FilenameNode(self.state, self.admin, _("Filename")) self.nodes['Filename'] = filename + + status = StatusNode(self.state, self.admin, title=_("Status")) + self.nodes['status'] = status + return BaseAdminGtk.setup(self) GUIClass = DiskerAdminGtk diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/admin_text.py flumotion-0.9.1/flumotion/component/consumers/disker/admin_text.py --- flumotion-0.6.1/flumotion/component/consumers/disker/admin_text.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/admin_text.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component.base.admin_text import BaseAdminText @@ -25,7 +21,7 @@ from twisted.internet import defer -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class DiskerAdminText(BaseAdminText): diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/disker_plug.py flumotion-0.9.1/flumotion/component/consumers/disker/disker_plug.py --- flumotion-0.6.1/flumotion/component/consumers/disker/disker_plug.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/disker_plug.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,27 +1,23 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component.plugs import base -__version__ = "$Rev: 7500 $" +__version__ = "$Rev$" class DiskerPlug(base.ComponentPlug): diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/disker.py flumotion-0.9.1/flumotion/component/consumers/disker/disker.py --- flumotion-0.6.1/flumotion/component/consumers/disker/disker.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/disker.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,48 +1,60 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import errno import os import time import tempfile +import datetime as dt +import bisect -import gobject import gst from twisted.internet import reactor from flumotion.component import feedcomponent -from flumotion.common import log, gstreamer, pygobject, messages, errors -from flumotion.common import documentation, format -from flumotion.common import eventcalendar +from flumotion.common import log, gstreamer, messages,\ + errors, common +from flumotion.common import documentation +from flumotion.common import format as formatting +from flumotion.common import eventcalendar, poller, tz from flumotion.common.i18n import N_, gettexter from flumotion.common.mimetypes import mimeTypeToExtention -from flumotion.common.pygobject import gsignal + +# the flumotion.twisted.flavors is not bundled, and as we only need it for +# the interface, we can skip doing the import and thus not create +# incompatibilities with workers running old versions of flavors that will be +# asked to create diskers importing the IStateCacheableListener from that +# module +# from flumotion.twisted.flavors import IStateCacheableListener + # proxy import from flumotion.component.component import moods __all__ = ['Disker'] -__version__ = "$Rev: 8162 $" +__version__ = "$Rev$" T_ = gettexter() +# Disk Usage polling frequency +DISKPOLL_FREQ = 60 + +# Maximum number of information to store in the filelist +FILELIST_SIZE = 100 + """ Disker has a property 'ical-schedule'. This allows an ical file to be specified in the config and have recordings scheduled based on events. @@ -60,6 +72,304 @@ """ +def _openFile(loggable, component, location, mode): + # used by both Disker and Index + try: + handle = open(location, mode) + return handle + except IOError, e: + loggable.warning("Failed to open output file %s: %s", + location, log.getExceptionMessage(e)) + if component is not None: + m = messages.Error(T_(N_( + "Failed to open output file '%s' for writing. " + "Check permissions on the file."), location)) + component.addMessage(m) + return None + + +class Index(log.Loggable): + ''' + Creates an index of keyframes for a file, than can be used later for + seeking in non indexed formats or whithout parsing the headers. + + The format of the index is very similar to the AVI Index, but it can also + include information about the real time of each entry in UNIX time. + (see 'man aviindex') + + If the index is for an indexed format, the offset of the first entry will + not start from 0. This offset is the size of the headers. ''' + + # CHK: Chunk number starting from 0 + # POS: Absolute byte position of the chunk in the file + # LEN: Length in bytes of the chunk + # TS: Timestamp of the chunk (ns) + # DUR: Duration of the chunk (ns) + # KF: Whether it starts with a keyframe or not + # TDT: Time and date using a UNIX timestamp (s) + # TDUR: Duration of the chunk in UNIX time (s) + INDEX_HEADER = "FLUIDX1 #Flumotion\n" + INDEX_KEYS = ['CHK', 'POS', 'LEN', 'TS', 'DUR', 'KF', 'TDT', 'TDUR'] + INDEX_EXTENSION = 'index' + + logCategory = "index" + + def __init__(self, component=None, location=None): + self._index = [] + self._headers_size = 0 + self.comp = component + self.location = location + + ### Public methods ### + + def updateStart(self, timestamp): + ''' + Remove entries in the index older than this timestamp + ''' + self.debug("Removing entries older than %s", timestamp) + self._index = self._filter_index(timestamp) or [] + + def addEntry(self, offset, timestamp, keyframe, tdt=0, writeIndex=True): + ''' + Add a new entry to the the index and writes it to disk if + writeIndex is True + ''' + if len(self._index) > 0: + # Check that new entries have increasing timestamp, offset and tdt + if not self._checkEntriesContinuity(offset, timestamp, tdt): + return + # And update the length and duration of the last entry + self._updateLastEntry(offset, timestamp, tdt) + # Then write the last updated index entry to disk + if writeIndex and self.location: + f = _openFile(self, self.comp, self.location, 'a+') + if not f: + return + off = self._index[0]['offset'] - self._headers_size + self._write_index_entry(f, self._index[-1], off, + len(self._index)-1) + + self._index.append({'offset': offset, 'length': -1, + 'timestamp': timestamp, 'duration': -1, + 'keyframe': keyframe, 'tdt': tdt, + 'tdt-duration': -1}) + + self.debug("Added new entry to the index: offset=%s timestamp=%s " + "keyframe=%s tdt=%s", offset, timestamp, keyframe, tdt) + + def setLocation(self, location): + self.location = location + + def setHeadersSize(self, size): + ''' + Set the headers size in bytes. Multifdsink append the stream headers + to each client. This size is then used to adjust the offset of the + index entries + ''' + self._headers_size = size + + def getHeaders(self): + ''' + Return an index entry corresponding to the headers, which is a chunk + with 'offset' 0 and 'length' equals to the headers size + ''' + if self._headers_size == 0: + return None + return {'offset': 0, 'length': self._headers_size, + 'timestamp': 0, 'duration': -1, + 'keyframe': 0, 'tdt': 0, 'tdt-duration': -1} + + def getFirstTimestamp(self): + if len(self._index) == 0: + return -1 + return self._index[0]['timestamp'] + + def getFirstTDT(self): + if len(self._index) == 0: + return -1 + return self._index[0]['tdt'] + + def clipTimestamp(self, start, stop): + ''' + Clip the current index to a start and stop time, returning all the + entries matching the boundaries using the 'timestamp' + ''' + return self._clip('timestamp', 'duration', start, stop) + + def clipTDT(self, start, stop): + ''' + Clip the current index to a start and stop time, returning all the + entries matching the boundaries using the 'tdt' + ''' + return self._clip('tdt', 'tdt-duration', start, stop) + + def clear(self): + ''' + Clears the index + ''' + self._index = [] + + def save(self, start=None, stop=None): + ''' + Saves the index in a file, using the entries from 'start' to 'stop' + ''' + if self.location is None: + self.warning("Couldn't save the index, the location is not set.") + return False + f = _openFile(self, self.comp, self.location, 'w+') + if not f: + return False + + self._write_index_headers(f) + if len(self._index) == 0: + return True + + self._write_index_entries(f, self._filter_index(start, stop)) + self.info("Index saved successfully. start=%s stop=%s location=%s ", + start, stop, self.location) + return True + + def loadIndexFile(self, location): + ''' + Loads the entries of the index from an index file + ''' + + def invalidIndex(reason): + self.warning("This file is not a valid index: %s", reason) + return False + + if not location.endswith(self.INDEX_EXTENSION): + return invalidIndex("the extension of this file is not '%s'" % + self.INDEX_EXTENSION) + try: + self.info("Loading index file %s", location) + handle = open(location, 'r') + indexString = handle.readlines() + handle.close() + except IOError, e: + return invalidIndex("error reading index file (%r)" % e) + # Check if the file is not empty + if len(indexString) == 0: + return invalidIndex("the file is empty") + # Check headers + if not indexString[0].startswith('FLUIDX1 #'): + return invalidIndex('header is not FLUIDX1') + # Check index keys declaration + keysStr = ' '.join(self.INDEX_KEYS) + if indexString[1].strip('\n') != keysStr: + return invalidIndex('keys definition is not: %s' % keysStr) + # Add entries + setHeaders = True + for entryLine in indexString[2:]: + e = entryLine.split(' ') + if len(e) < len(self.INDEX_KEYS): + return invalidIndex("one of the entries doesn't have enough " + "parameters (needed=%d, provided=%d)" % + (len(self.INDEX_KEYS), len(e))) + try: + self.addEntry(int(e[1]), int(e[3]), common.strToBool(e[5]), + int(e[6])) + except Exception, e: + return invalidIndex("could not parse one of the entries: %r" + % e) + if setHeaders: + self._headers_size = int(e[1]) + setHeaders = False + self.info("Index parsed successfully") + return True + + ### Private methods ### + + def _updateLastEntry(self, offset, timestamp, tdt): + last = self._index[-1] + last['length'] = offset - last['offset'] + last['duration'] = timestamp - last['timestamp'] + last['tdt-duration'] = tdt - last['tdt'] + + def _checkEntriesContinuity(self, offset, timestamp, tdt): + last = self._index[-1] + for key, value in [('offset', offset), ('timestamp', timestamp), + ('tdt', tdt)]: + if value < last[key]: + self.warning("Could not add entries with a decreasing %s " + "(last=%s, new=%s)", key, last[key], value) + return False + return True + + def _clip(self, keyTS, keyDur, start, stop): + ''' + Clip the index to a start and stop time. For an index with 10 + entries of 10 seconds starting from 0, cliping from 15 to 35 will + return the entries 1, 2, and 3. + ''' + if start >= stop: + return None + + keys = [e[keyTS] for e in self._index] + + # If the last entry has a duration we add a new entry in the TS list + # with the stop time + lastEntry = self._index[-1] + if lastEntry[keyDur] != -1: + keys.append(lastEntry[keyTS] + lastEntry[keyDur]) + + # Return if the start and stop time are not inside the boundaries + if stop <= keys[0] or start >= keys[-1]: + return None + + # Set the start and stop time to match the boundaries so that we don't + # get indexes outside the array boundaries + if start <= keys[0]: + start = keys[0] + if stop >= keys[-1]: + stop = keys[-1] - 1 + + # Do the bisection + i_start = bisect.bisect_right(keys, start) - 1 + i_stop = bisect.bisect_right(keys, stop) + + return self._index[i_start:i_stop] + + def _filter_index(self, start=None, stop=None): + ''' + Filter the index with a start and stop time. + FIXME: Check performance difference with clipping + ''' + if len(self._index) == 0: + return + if not start and not stop: + return self._index + if not start: + start = self._index[0]['timestamp'] + if not stop: + last_entry = self._index[len(self._index)-1] + stop = last_entry['timestamp'] + 1 + return [x for x in self._index if (x['timestamp'] >= start and\ + x['timestamp'] <= stop)] + + def _write_index_headers(self, file): + file.write("%s" % self.INDEX_HEADER) + file.write("%s\n" % ' '.join(self.INDEX_KEYS)) + + def _write_index_entry(self, file, entry, offset, count): + frmt = "%s\n" % " ".join(['%s'] * len(self.INDEX_KEYS)) + file.write(frmt % (count, entry['offset'] - offset, + entry['length'], + entry['timestamp'], + entry['duration'], + entry['keyframe'], + entry['tdt'], + entry['tdt-duration'])) + + def _write_index_entries(self, file, entries): + offset =self._index[0]['offset'] - self._headers_size + count = 0 + + for entry in self._index: + self._write_index_entry(file, entry, offset, count) + count += 1 + + class DiskerMedium(feedcomponent.FeedComponentMedium): # called when admin ui wants to stop recording. call changeFilename to # restart @@ -90,20 +400,41 @@ class Disker(feedcomponent.ParseLaunchComponent, log.Loggable): + logCategory = "disker" + componentMediumClass = DiskerMedium checkOffset = True - pipe_template = 'multifdsink sync-method=1 name=fdsink mode=1 sync=false' + pipe_template = 'multifdsink name=fdsink sync-method=2 mode=1 sync=false' file = None directory = None location = None caps = None - + last_tstamp = None + indexLocation = None + writeIndex = False + syncOnTdt = False + timeOverlap = 0 + reactToMarks = False + + _offset = 0L + _headers_size = 0 + _index = None + _nextIsKF = False + _lastTdt = None + _lastEntry = None # last KF/TDT + _clients = {} # dict of clients {fd: (index, synced)} _startFilenameTemplate = None # template to use when starting off recording - _startTimeTuple = None # time tuple of event when starting + _startTime = None # time of event when starting _rotateTimeDelayedCall = None + _pollDiskDC = None # _pollDisk delayed calls _symlinkToLastRecording = None _symlinkToCurrentRecording = None + + # see the commented out import statement for IStateCacheableListener at + # the beginning of this file + # implements(IStateCacheableListener) + ### BaseComponent methods def init(self): @@ -113,51 +444,104 @@ self.uiState.addKey('recording', False) self.uiState.addKey('can-schedule', self._can_schedule) self.uiState.addKey('has-schedule', False) + self.uiState.addKey('rotate-type', None) + self.uiState.addKey('disk-free', None) # list of (dt (in UTC, without tzinfo), which, content) self.uiState.addListKey('next-points') + self.uiState.addListKey('filelist') - ### ParseLaunchComponent methods - - def get_pipeline_string(self, properties): - directory = properties['directory'] - - self.directory = directory - - self.fixRenamedProperties(properties, [('rotateType', 'rotate-type')]) - - rotateType = properties.get('rotate-type', 'none') + self._diskPoller = poller.Poller(self._pollDisk, + DISKPOLL_FREQ, + start=False) + + ### uiState observer triggers + + def observerAppend(self, observer, num): + # PB may not have finished setting up its state and doing a + # remoteCall immediately here may cause some problems to the other + # side. For us to send the initial disk usage value with no + # noticeable delay, we will do it in a callLater with a timeout + # value of 0 + self.debug("observer has started watching us, starting disk polling") + if not self._diskPoller.running and not self._pollDiskDC: + self._pollDiskDC = reactor.callLater(0, + self._diskPoller.start, + immediately=True) + # Start the BaseComponent pollers + feedcomponent.ParseLaunchComponent.observerAppend(self, observer, num) + + def observerRemove(self, observer, num): + if num == 0: + # cancel delayed _pollDisk calls if there's any + if self._pollDiskDC: + self._pollDiskDC.cancel() + self._pollDiskDC = None + + self.debug("no more observers left, shutting down disk polling") + self._diskPoller.stop() + # Stop the BaseComponent pollers + feedcomponent.ParseLaunchComponent.observerRemove(self, observer, num) + + def check_properties(self, props, addMessage): + props = self.config['properties'] + rotateType = props.get('rotate-type', 'none') - # validate rotate-type and size/time properties first if not rotateType in ['none', 'size', 'time']: - m = messages.Error(T_(N_( + msg = messages.Error(T_(N_( "The configuration property 'rotate-type' should be set to " "'size', time', or 'none', not '%s'. " "Please fix the configuration."), rotateType), mid='rotate-type') - self.addMessage(m) - raise errors.ComponentSetupHandledError() + addMessage(msg) + raise errors.ConfigError(msg) - # size and time types need the property specified if rotateType in ['size', 'time']: - if rotateType not in properties.keys(): - m = messages.Error(T_(N_( + if rotateType not in props.keys(): + msg = messages.Error(T_(N_( "The configuration property '%s' should be set. " "Please fix the configuration."), rotateType), mid='rotate-type') - self.addMessage(m) - raise errors.ComponentSetupHandledError() + addMessage(msg) + raise errors.ConfigError(msg) + + if props[rotateType] == 0: + msg = messages.Error(T_(N_("Configuration error: " \ + "'rotate-type' %s value cannot be set to 0."), + rotateType), mid='rotate-type') + addMessage(msg) + raise errors.ConfigError(msg) + + ### ParseLaunchComponent methods + + def get_pipeline_string(self, properties): + directory = properties['directory'] + + self.directory = directory + + self.fixRenamedProperties(properties, [('rotateType', 'rotate-type')]) + + rotateType = properties.get('rotate-type', 'none') # now act on the properties if rotateType == 'size': self.setSizeRotate(properties['size']) + self.uiState.set('rotate-type', + 'every %sB' % \ + formatting.formatStorage(properties['size'])) elif rotateType == 'time': self.setTimeRotate(properties['time']) + self.uiState.set('rotate-type', + 'every %s' % \ + formatting.formatTime(properties['time'])) + else: + self.uiState.set('rotate-type', 'disabled') # FIXME: should add a way of saying "do first cycle at this time" return self.pipe_template def configure_pipeline(self, pipeline, properties): self.debug('configure_pipeline for disker') + self._clock = pipeline.get_clock() self._symlinkToLastRecording = \ properties.get('symlink-to-last-recording', None) self._symlinkToCurrentRecording = \ @@ -188,20 +572,112 @@ # self._can_schedule is False, so one of the above surely happened raise errors.ComponentSetupHandledError() + self.writeIndex = properties.get('write-index', False) + self.reactToMarks = properties.get('react-to-stream-markers', False) + self.syncOnTdt = properties.get('sync-on-tdt', False) + self.timeOverlap = properties.get('time-overlap', 0) + sink = self.get_element('fdsink') + + if gstreamer.element_factory_has_property('multifdsink', + 'resend-streamheader'): + sink.set_property('resend-streamheader', False) + else: + self.debug("resend-streamheader property not available, " + "resending streamheader when it changes in the caps") sink.get_pad('sink').connect('notify::caps', self._notify_caps_cb) # connect to client-removed so we can detect errors in file writing sink.connect('client-removed', self._client_removed_cb) - # set event probe if we should react to video mark events - react_to_marks = properties.get('react-to-stream-markers', False) - if react_to_marks: + if self.writeIndex: + sink.connect('client-added', self._client_added_cb) + + if self.reactToMarks: pfx = properties.get('stream-marker-filename-prefix', '%03d.') self._markerPrefix = pfx - sink.get_pad('sink').add_event_probe(self._markers_event_probe) + + if self.reactToMarks or self.writeIndex or self.syncOnTdt: + sink.get_pad("sink").add_data_probe(self._src_pad_probe) + ### our methods + def _tdt_to_datetime(self, s): + ''' + TDT events contains a structure representing the UTC time of the + stream with the fields: + 'year', 'month', 'day', 'hour', 'minute', 'second' + + Can raise and Exception if the structure doesn't cotains all the + requiered fields. Protect with try-except. + ''' + if s.get_name() != 'tdt': + return None + t = dt.datetime(s['year'], s['month'], s['day'], s['hour'], + s['minute'], s['second']) + return time.mktime(t.timetuple()) + + def _getStats(self, fd): + sink = self.get_element('fdsink') + stats = sink.emit('get-stats', fd) + if len(stats) <= 6: + self.warning("The current version of multifdsink doesn't " + "include the timestamp of the first and last " + "buffers sent: the indexing will be disabled.") + m = messages.Warning( + T_(N_("Versions up to and including %s of the '%s' " + "GStreamer plug-in can't be used to write index " + "files.\n"), + '0.10.30', 'multifdsink')) + self.addMessage(m) + self.writeIndex = False + return None + return stats + + def _updateIndex(self, offset, timestamp, isKeyframe, tdt=0): + for fd, val in self._clients.items(): + index, synced = val + if not synced: + stats = self._getStats(fd) + # Check if multifdsink can be used for indexing + if not stats: + return + # Very unlikely, but if we are not synced yet, + # add this entry to the index because it's going + # to be the sync point, and continue + if stats[6] == gst.CLOCK_TIME_NONE: + index.addEntry(offset, timestamp, isKeyframe, tdt, False) + continue + # if we know when the client was synced, trim the index. + index.updateStart(stats[6]) + self._clients[fd] = (index, True) + # At this point we should have only one entry in the index + # which will be written to file after getting the next sync + # buffer and we can update its duration and length. + + index.addEntry(offset, timestamp, isKeyframe, tdt, True) + self._lastEntry = (offset, timestamp, isKeyframe, tdt) + + def _pollDisk(self): + # Figure out the remaining disk space where the disker is saving + # files to + self._pollDiskDC = None + s = None + try: + s = os.statvfs(self.directory) + except Exception, e: + self.debug('failed to figure out disk space: %s', + log.getExceptionMessage(e)) + + if not s: + free = None + else: + free = formatting.formatStorage(s.f_frsize * s.f_bavail) + + if self.uiState.get('disk-free') != free: + self.debug("disk usage changed, reporting to observers") + self.uiState.set('disk-free', free) + def setTimeRotate(self, time): """ @param time: duration of file (in seconds) @@ -238,14 +714,6 @@ if self.caps: return self.caps.get_structure(0).get_name() - # FIXME: is this method used anywhere ? - - def get_content_type(self): - mime = self.getMime() - if mime == 'multipart/x-mixed-replace': - mime += ";boundary=ThisRandomString" - return mime - def scheduleRecordings(self, icalFile): self.uiState.set('has-schedule', True) self.debug('Parsing iCalendar file %s' % icalFile) @@ -265,7 +733,7 @@ self.info('Event %s is in progress, start recording' % content) self._startFilenameTemplate = content - self._startTimeTuple = instance.start.utctimetuple() + self._startTime = instance.start self._recordAtStart = True else: self.info('No events in progress') @@ -278,16 +746,32 @@ debug=log.getExceptionMessage(e), mid="error-parsing-ical") self.addMessage(m) - def changeFilename(self, filenameTemplate=None, timeTuple=None): + def changeFilename(self, filenameTemplate=None, datetime=None): """ @param filenameTemplate: strftime format string to decide filename - @param timeTuple: a valid time tuple to pass to strftime, - defaulting to time.localtime(). + @param time: an aware datetime used for the filename and + to compare if an existing file needs to be + overwritten. defaulting to datetime.now(). """ mime = self.getMime() ext = mimeTypeToExtention(mime) - self.stopRecording() + # if the events comes from the calendar, datetime is aware and we can + # deduce from it both the local and utc time. + # in case datetime is None datetime.now() doesn't return an aware + # datetime, so we need to get both the local time and the utc time. + tm = datetime or dt.datetime.now() + tmutc = datetime or dt.datetime.utcnow() + + # delay the stop of the current recording to ensure there are no gaps + # in the recorded files. We could think that emitting first the signal + # to add a new client before the one to remove the client and syncing + # with the latest keyframe should be enough, but it doesn't ensure the + # stream continuity if it's done close to a keyframe because when + # multifdsink looks internally for the latest keyframe it's already to + # late and a gap is introduced. + reactor.callLater(self.timeOverlap, self._stopRecordingFull, self.file, + self.location, self.last_tstamp, True) sink = self.get_element('fdsink') if sink.get_state() == gst.STATE_NULL: @@ -296,8 +780,9 @@ filename = "" if not filenameTemplate: filenameTemplate = self._defaultFilenameTemplate - filename = "%s.%s" % (format.strftime(filenameTemplate, - timeTuple or time.localtime()), ext) + filename = "%s.%s" % (formatting.strftime(filenameTemplate, + # for the filename we want to use the local time + tm.timetuple()), ext) self.location = os.path.join(self.directory, filename) # only overwrite existing files if it was last changed before the @@ -306,7 +791,9 @@ i = 1 while os.path.exists(location): mtimeTuple = time.gmtime(os.stat(location).st_mtime) - if mtimeTuple <= timeTuple: + # time.gmtime returns a time tuple in utc, so we compare against + # the utc timetuple of the datetime + if mtimeTuple <= tmutc.utctimetuple(): self.info( "Existing recording %s from previous event, overwriting", location) @@ -320,18 +807,12 @@ self.location = location self.info("Changing filename to %s", self.location) - try: - self.file = open(self.location, 'wb') - except IOError, e: - self.warning("Failed to open output file %s: %s", - self.location, log.getExceptionMessage(e)) - m = messages.Error(T_(N_( - "Failed to open output file '%s' for writing. " - "Check permissions on the file."), self.location)) - self.addMessage(m) + self.file = _openFile(self, self, self.location, 'wb') + if self.file is None: return self._recordingStarted(self.file, self.location) sink.emit('add', self.file.fileno()) + self.last_tstamp = time.time() self.uiState.set('filename', self.location) self.uiState.set('recording', True) @@ -364,21 +845,50 @@ self.addMessage(m) def stopRecording(self): + self._stopRecordingFull(self.file, self.location, + self.last_tstamp, False) + + def _stopRecordingFull(self, handle, location, lastTstamp, delayedStop): sink = self.get_element('fdsink') if sink.get_state() == gst.STATE_NULL: sink.set_state(gst.STATE_READY) - if self.file: - self.file.flush() - sink.emit('remove', self.file.fileno()) - self._recordingStopped(self.file, self.location) - self.file = None - self.uiState.set('filename', None) - self.uiState.set('recording', False) - if self._symlinkToLastRecording: - self._updateSymlink(self.location, + if handle: + handle.flush() + sink.emit('remove', handle.fileno()) + self._recordingStopped(handle, location) + handle = None + if not delayedStop: + self.uiState.set('filename', None) + self.uiState.set('recording', False) + try: + size = formatting.formatStorage(os.stat(location).st_size) + except EnvironmentError, e: + self.debug("Failed to stat %s: %s", location, + log.getExceptionMessage(e)) + # catch File not found, permission denied, disk problems + size = "unknown" + + # Limit number of entries on filelist, remove the oldest entry + fl = self.uiState.get('filelist', otherwise=[]) + if FILELIST_SIZE == len(fl): + self.uiState.remove('filelist', fl[0]) + + self.uiState.append('filelist', (lastTstamp, + location, + size)) + + if not delayedStop and self._symlinkToLastRecording: + self._updateSymlink(location, self._symlinkToLastRecording) + def _updateHeadersSize(self): + for index, a in self._clients.values(): + index.setHeadersSize(self._headers_size) + + + # START OF THREAD AWARE METHODS + def _notify_caps_cb(self, pad, param): caps = pad.get_negotiated_caps() if caps == None: @@ -395,11 +905,25 @@ self.debug('Storing caps: %s' % caps_str) self.caps = caps - if new and self._recordAtStart: + if new and self._recordAtStart and not self.syncOnTdt: reactor.callLater(0, self.changeFilename, - self._startFilenameTemplate, self._startTimeTuple) + self._startFilenameTemplate, self._startTime) + + def _client_added_cb(self, element, arg0): + if not self.writeIndex: + return - # multifdsink::client-removed + indexLocation = '.'.join([self.location, + Index.INDEX_EXTENSION]) + index = Index(self, indexLocation) + index.setHeadersSize(self._headers_size) + # Write the index headers + index.save() + # We will need the last entry because multifdsink syncs in + # the last keyframe + if self._lastEntry: + index.addEntry(*(self._lastEntry + (False, ))) + self._clients[arg0] = (index, False) def _client_removed_cb(self, element, arg0, client_status): # treat as error if we were removed because of GST_CLIENT_STATUS_ERROR @@ -409,6 +933,75 @@ # to the reactor's thread reactor.callFromThread(self._client_error_cb) + if self.writeIndex: + del self._clients[arg0] + + def _handle_event(self, event): + if event.type != gst.EVENT_CUSTOM_DOWNSTREAM: + return True + + struct = event.get_structure() + struct_name = struct.get_name() + if struct_name == 'FluStreamMark' and self.reactToMarks: + if struct['action'] == 'start': + self._onMarkerStart(struct['prog_id']) + elif struct['action'] == 'stop': + self._onMarkerStop() + elif struct_name == 'tdt' and self.syncOnTdt: + try: + if self._lastTdt == None: + self._firstTdt = True + self._lastTdt = self._tdt_to_datetime(struct) + self._nextIsKF = True + except KeyError, e: + self.warning("Error parsing tdt event: %r", e) + return True + + def _handle_buffer(self, buf): + # IN_CAPS Buffers + if buf.flag_is_set(gst.BUFFER_FLAG_IN_CAPS): + self._headers_size += buf.size + reactor.callFromThread(self._updateHeadersSize) + return True + + # re-timestamp buffers without timestamp, so that we can get from + # multifdsink's client stats the first and last buffer received + if buf.timestamp == gst.CLOCK_TIME_NONE: + buf.timestamp = self._clock.get_time() + + if self.syncOnTdt: + if self._nextIsKF: + # That's the first buffer after a 'tdt'. we mark it as a + # keyframe and the sink will start streaming from it. + buf.flag_unset(gst.BUFFER_FLAG_DELTA_UNIT) + self._nextIsKF = False + reactor.callFromThread(self._updateIndex, self._offset, + buf.timestamp, False, int(self._lastTdt)) + if self._recordAtStart and self._firstTdt: + reactor.callLater(0, self.changeFilename, + self._startFilenameTemplate, self._startTime) + self._firstTdt = False + else: + buf.flag_set(gst.BUFFER_FLAG_DELTA_UNIT) + # if we don't sync on TDT and this is a keyframe, add it to the index + elif not buf.flag_is_set(gst.BUFFER_FLAG_DELTA_UNIT): + reactor.callFromThread(self._updateIndex, + self._offset, buf.timestamp, True) + self._offset += buf.size + return True + + def _src_pad_probe(self, pad, data): + # Events + if type(data) is gst.Event: + if self.reactToMarks or self.syncOnTdt: + return self._handle_event(data) + # Buffers + elif self.writeIndex: + return self._handle_buffer(data) + return True + + # END OF THREAD AWARE METHODS + def _client_error_cb(self): self.file.close() self.file = None @@ -423,7 +1016,7 @@ def eventInstanceStarted(self, eventInstance): self.debug('starting recording of %s', eventInstance.event.content) self.changeFilename(eventInstance.event.content, - eventInstance.start.timetuple()) + eventInstance.start) self._updateNextPoints() def eventInstanceEnded(self, eventInstance): @@ -443,14 +1036,13 @@ # so convert all to UTC then remove tzinfo. def _utcAndStripTZ(dt): - from flumotion.common import eventcalendar - return dt.astimezone(eventcalendar.UTC).replace(tzinfo=None) + return dt.astimezone(tz.UTC).replace(tzinfo=None) for p in points: dtUTC = _utcAndStripTZ(p.dt) dtStart = p.eventInstance.start.replace(tzinfo=None) new.append((dtUTC, p.which, - format.strftime(p.eventInstance.event.content, + formatting.strftime(p.eventInstance.event.content, dtStart.timetuple()))) for t in current: @@ -463,7 +1055,7 @@ self.debug('appending tuple %r to next-points', t) self.uiState.append('next-points', t) - def _recordingStarted(self, file, location): + def _recordingStarted(self, handle, location): socket = 'flumotion.component.consumers.disker.disker_plug.DiskerPlug' # make sure plugs are configured with our socket, see #732 if socket not in self.plugs: @@ -471,9 +1063,9 @@ for plug in self.plugs[socket]: self.debug('invoking recordingStarted on ' 'plug %r on socket %s', plug, socket) - plug.recordingStarted(file, location) + plug.recordingStarted(handle, location) - def _recordingStopped(self, file, location): + def _recordingStopped(self, handle, location): socket = 'flumotion.component.consumers.disker.disker_plug.DiskerPlug' # make sure plugs are configured with our socket, see #732 if socket not in self.plugs: @@ -481,20 +1073,10 @@ for plug in self.plugs[socket]: self.debug('invoking recordingStopped on ' 'plug %r on socket %s', plug, socket) - plug.recordingStopped(file, location) + plug.recordingStopped(handle, location) ### marker methods - def _markers_event_probe(self, element, event): - if event.type == gst.EVENT_CUSTOM_DOWNSTREAM: - evt_struct = event.get_structure() - if evt_struct.get_name() == 'FluStreamMark': - if evt_struct['action'] == 'start': - self._onMarkerStart(evt_struct['prog_id']) - elif evt_struct['action'] == 'stop': - self._onMarkerStop() - return True - def _onMarkerStop(self): self.stopRecording() @@ -514,3 +1096,9 @@ '%r <-- %r; %r' % (self._markerPrefix, data, err)) self.changeFilename(tmpl) + + def do_stop(self): + if self._pollDiskDC: + self._pollDiskDC.cancel() + self._pollDiskDC = None + self._diskPoller.stop() diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/disker.xml flumotion-0.9.1/flumotion/component/consumers/disker/disker.xml --- flumotion-0.6.1/flumotion/component/consumers/disker/disker.xml 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/disker.xml 2011-09-11 08:09:04.000000000 +0000 @@ -6,6 +6,9 @@ + + + @@ -44,6 +49,12 @@ _description="Whether to start/stop the disker when stream marker events are received." /> + + + @@ -71,6 +82,7 @@ + @@ -113,6 +125,19 @@ + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/__init__.py flumotion-0.9.1/flumotion/component/consumers/disker/__init__.py --- flumotion-0.6.1/flumotion/component/consumers/disker/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/Makefile.am flumotion-0.9.1/flumotion/component/consumers/disker/Makefile.am --- flumotion-0.6.1/flumotion/component/consumers/disker/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -7,9 +7,10 @@ disker.py \ disker_plug.py \ admin_gtk.py \ - admin_text.py + admin_text.py \ + wizard_gtk.py -component_DATA = disker.xml disker.glade +component_DATA = disker.xml disker.glade status.glade wizard.glade clean-local: rm -rf *.pyc *.pyo diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/Makefile.in flumotion-0.9.1/flumotion/component/consumers/disker/Makefile.in --- flumotion-0.6.1/flumotion/component/consumers/disker/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/Makefile.in 2011-09-11 08:09:19.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -279,9 +274,10 @@ disker.py \ disker_plug.py \ admin_gtk.py \ - admin_text.py + admin_text.py \ + wizard_gtk.py -component_DATA = disker.xml disker.glade +component_DATA = disker.xml disker.glade status.glade wizard.glade EXTRA_DIST = $(component_DATA) all: all-am diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/status.glade flumotion-0.9.1/flumotion/component/consumers/disker/status.glade --- flumotion-0.6.1/flumotion/component/consumers/disker/status.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/status.glade 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,169 @@ + + + + + + + + 6 + 3 + True + vertical + + + True + + + True + 0.46000000834465027 + + + False + False + 5 + 0 + + + + + False + False + 2 + 0 + + + + + True + + + True + + + False + False + 5 + 0 + + + + + False + False + 2 + 1 + + + + + True + + + True + + + True + + + False + False + 5 + 0 + + + + + False + False + 0 + + + + + False + False + 2 + 2 + + + + + True + + + True + + + 0 + + + + + False + False + 3 + + + + + True + + + True + <b>Files Created</b> + True + + + False + False + 4 + 0 + + + + + False + False + 4 + + + + + True + True + automatic + automatic + + + True + True + True + + + + + 5 + + + + + True + + + True + + + 0 + + + + + False + False + 6 + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/wizard.glade flumotion-0.9.1/flumotion/component/consumers/disker/wizard.glade --- flumotion-0.6.1/flumotion/component/consumers/disker/wizard.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/wizard.glade 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,344 @@ + + + + + + + window1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + True + False + + + + True + False + 0 + + + + True + 3 + 2 + False + 6 + 6 + + + + True + 2 + 3 + False + 6 + 7 + + + + True + True + + True + GTK_RELIEF_NORMAL + True + True + False + True + + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + True + + True + GTK_RELIEF_NORMAL + True + False + False + True + has_time + + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + False + True + + + 2 + 3 + 0 + 1 + fill + fill + + + + + + True + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 12 1 100 1 10 10 + + + 1 + 2 + 0 + 1 + + + + + + + True + False + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 10 1 100 1 10 10 + + + 1 + 2 + 1 + 2 + + + + + + + True + False + False + True + + + 2 + 3 + 1 + 2 + fill + fill + + + + + 1 + 2 + 1 + 2 + + + + + + + + True + 0 + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + + + + True + True + _Rotate entry every: + True + GTK_RELIEF_NORMAL + True + True + False + True + + + + + + 0 + 1 + 1 + 2 + fill + fill + + + + + + True + True + Record at startup + True + GTK_RELIEF_NORMAL + True + True + False + True + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + False + 0 + + + + True + True + True + True + 0 + /tmp + True + * + False + + + 0 + True + True + + + + + + True + True + _Select + True + GTK_RELIEF_NORMAL + True + + + + 0 + False + False + + + + + + + + + + True + _Choose location: + True + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + 2 + 0 + 1 + fill + + + + + 0 + False + False + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/disker/wizard_gtk.py flumotion-0.9.1/flumotion/component/consumers/disker/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/consumers/disker/wizard_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/disker/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,241 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gettext +import os + +from zope.interface import implements +import gtk + +from flumotion.admin.assistant.interfaces import IConsumerPlugin +from flumotion.admin.assistant.models import Consumer +from flumotion.admin.gtk.basesteps import ConsumerStep +from flumotion.ui.fileselector import FileSelectorDialog + +__version__ = "$Rev$" +_ = gettext.gettext + +(SIZE_KB, + SIZE_MB, + SIZE_GB, + SIZE_TB) = tuple([1 << (10L*i) for i in range(1, 5)]) + +TIME_MINUTE = 60 +TIME_HOUR = 60*60 +TIME_DAY = 60*60*24 +TIME_WEEK = 60*60*24*7 + + +class Disker(Consumer): + """I am a model representing the configuration file for a + Disk consumer. + + @ivar has_time: if rotation should be done based on time + @ivar has_size: if rotation should be done based on size + @ivar time_unit: the selected size unit, + size will be multiplied by this value when saved + @ivar size_unit: the selected time unit, + time will be multiplied by this value when saved + """ + componentType = 'disk-consumer' + prefix = 'disk' + + def __init__(self): + super(Disker, self).__init__() + self.has_size = False + self.has_time = False + self.size = 10 + self.size_unit = SIZE_KB + self.time = 12 + self.time_unit = TIME_HOUR + + self.properties.directory = "/tmp" + self.properties.start_recording = False + + def _getRotationType(self): + if self.has_time: + return 'time' + elif self.has_size: + return 'size' + else: + return 'none' + + # Component + + def getProperties(self): + properties = super(Disker, self).getProperties() + properties.rotate_type = self._getRotationType() + if 'size' == properties.rotate_type: + properties.size = self.size_unit * self.size + elif 'time' == properties.rotate_type: + properties.time = self.time_unit * self.time + + return properties + + +class DiskStep(ConsumerStep): + gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'wizard.glade') + icon = 'kcmdevices.png' + + def __init__(self, wizard): + self.model = Disker() + ConsumerStep.__init__(self, wizard) + + # ConsumerStep + + def getConsumerModel(self): + return self.model + + # WizardStep + + def setup(self): + self.directory.data_type = str + self.has_size.data_type = bool + self.has_time.data_type = bool + self.size.data_type = int + self.size_unit.data_type = long + self.start_recording.data_type = bool + self.time.data_type = int + self.time_unit.data_type = int + + self.size_unit.prefill([ + (_('kB'), SIZE_KB), + (_('MB'), SIZE_MB), + (_('GB'), SIZE_GB), + (_('TB'), SIZE_TB), + ]) + self.time_unit.prefill([ + (_('minute(s)'), TIME_MINUTE), + (_('hour(s)'), TIME_HOUR), + (_('day(s)'), TIME_DAY), + (_('week(s)'), TIME_WEEK)]) + self.time_unit.select(TIME_HOUR) + + self.add_proxy(self.model, + ['has_size', + 'has_time', + 'rotate', + 'size_unit', + 'time_unit', + 'time', + 'size']) + + self._proxy = self.add_proxy(self.model.properties, + ['directory', + 'start_recording']) + + def workerChanged(self, worker): + self.model.worker = worker + self.wizard.requireElements(self.worker, 'multifdsink') + + # Private + + def _updateRadio(self): + rotate = self.rotate.get_active() + self.has_size.set_sensitive(rotate) + self.has_time.set_sensitive(rotate) + + hasSize = rotate and self.has_size.get_active() + self.size.set_sensitive(hasSize) + self.size_unit.set_sensitive(hasSize) + self.model.has_size = hasSize + + hasTime = rotate and self.has_time.get_active() + self.time.set_sensitive(hasTime) + self.time_unit.set_sensitive(hasTime) + self.model.has_time = hasTime + + def _select(self): + + def response(fs, response): + fs.hide() + if response == gtk.RESPONSE_OK: + self.model.properties.directory = fs.getFilename() + self._proxy.update('directory') + + def deleteEvent(fs, event): + pass + fs = FileSelectorDialog(self.wizard.window, + self.wizard.getAdminModel()) + fs.connect('response', response) + fs.connect('delete-event', deleteEvent) + fs.selector.setWorkerName(self.model.worker) + fs.setDirectory(self.model.properties.directory) + fs.show_all() + + # Callbacks + + def on_has_time__toggled(self, radio): + self._updateRadio() + + def on_has_size__toggled(self, radio): + self._updateRadio() + + def on_rotate__toggled(self, check): + self._updateRadio() + + def on_select__clicked(self, check): + self._select() + + +class DiskBothStep(DiskStep): + name = 'Disk (audio & video)' + title = _('Disk (Audio and Video)') + sidebarName = _('Disk Audio/Video') + + # ConsumerStep + + def getConsumerType(self): + return 'audio-video' + + +class DiskAudioStep(DiskStep): + name = 'Disk (audio only)' + title = _('Disk (Audio Only)') + sidebarName = _('Disk Audio') + + # ConsumerStep + + def getConsumerType(self): + return 'audio' + + +class DiskVideoStep(DiskStep): + name = 'Disk (video only)' + title = _('Disk (Video Only)') + sidebarName = _('Disk Video') + + # ConsumerStep + + def getConsumerType(self): + return 'video' + + +class DiskConsumerWizardPlugin(object): + implements(IConsumerPlugin) + + def __init__(self, wizard): + self.wizard = wizard + + def getConsumptionStep(self, type): + if type == 'video': + return DiskVideoStep(self.wizard) + elif type == 'audio': + return DiskAudioStep(self.wizard) + elif type == 'audio-video': + return DiskBothStep(self.wizard) diff -Nru flumotion-0.6.1/flumotion/component/consumers/fgdp/fgdp.py flumotion-0.9.1/flumotion/component/consumers/fgdp/fgdp.py --- flumotion-0.6.1/flumotion/component/consumers/fgdp/fgdp.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/fgdp/fgdp.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,48 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from flumotion.component import feedcomponent +# register gdpsink +import flumotion.component.common.fgdp.fgdp + +__version__ = "$Rev$" + + +class FGDPConsumer(feedcomponent.ParseLaunchComponent): + logCategory = 'fgdp-consumer' + + def get_pipeline_string(self, properties): + return "fgdpsink name=sink" + + def configure_pipeline(self, pipeline, properties): + sink = self.get_element('sink') + sink.set_property('mode', properties.get('mode', 'push')) + sink.set_property('host', properties.get('host', 'localhost')) + sink.set_property('port', properties.get('port', 15000)) + sink.set_property('username', properties.get('username', 'user')) + sink.set_property('password', properties.get('password', 'test')) + sink.set_property('version', properties.get('version', '0.1')) + sink.set_property('max-reconnection-delay', + properties.get('max-reconnection-delay', 5)) + sink.connect('connected', self._on_connected) + sink.connect('disconnected', self._on_disconnected) + + def _on_connected(self, element): + self.info("FGDP consumer connected") + + def _on_disconnected(self, element, reason): + self.info("FGDP consumer disconnected: %s", reason) diff -Nru flumotion-0.6.1/flumotion/component/consumers/fgdp/fgdp.xml flumotion-0.9.1/flumotion/component/consumers/fgdp/fgdp.xml --- flumotion-0.6.1/flumotion/component/consumers/fgdp/fgdp.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/fgdp/fgdp.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/fgdp/__init__.py flumotion-0.9.1/flumotion/component/consumers/fgdp/__init__.py --- flumotion-0.6.1/flumotion/component/consumers/fgdp/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/fgdp/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,22 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +""" +code for porter clients and servers +""" + +__version__ = "$Rev: 6125 $" diff -Nru flumotion-0.6.1/flumotion/component/consumers/fgdp/Makefile.am flumotion-0.9.1/flumotion/component/consumers/fgdp/Makefile.am --- flumotion-0.6.1/flumotion/component/consumers/fgdp/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/fgdp/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +include $(top_srcdir)/common/python.mk + +fgdpdir = $(libdir)/flumotion/python/flumotion/component/consumers/fgdp + +fgdp_PYTHON = \ + __init__.py \ + fgdp.py \ + wizard.glade \ + wizard_gtk.py + +fgdp_DATA = fgdp.xml + +TAGS_FILES = $(fgdp_PYTHON) + +clean-local: + rm -rf *.pyc *.pyo + +EXTRA_DIST = $(fgdp_PYTHON) $(fgdp_DATA) diff -Nru flumotion-0.6.1/flumotion/component/consumers/fgdp/Makefile.in flumotion-0.9.1/flumotion/component/consumers/fgdp/Makefile.in --- flumotion-0.6.1/flumotion/component/consumers/fgdp/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/fgdp/Makefile.in 2011-09-11 08:09:19.000000000 +0000 @@ -0,0 +1,543 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(fgdp_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/consumers/fgdp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(fgdpdir)" "$(DESTDIR)$(fgdpdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(fgdp_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +fgdpdir = $(libdir)/flumotion/python/flumotion/component/consumers/fgdp +fgdp_PYTHON = \ + __init__.py \ + fgdp.py \ + wizard.glade \ + wizard_gtk.py + +fgdp_DATA = fgdp.xml +TAGS_FILES = $(fgdp_PYTHON) +EXTRA_DIST = $(fgdp_PYTHON) $(fgdp_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/consumers/fgdp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/consumers/fgdp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-fgdpPYTHON: $(fgdp_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(fgdpdir)" || $(MKDIR_P) "$(DESTDIR)$(fgdpdir)" + @list='$(fgdp_PYTHON)'; dlist=; list2=; test -n "$(fgdpdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(fgdpdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(fgdpdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(fgdpdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(fgdpdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-fgdpPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(fgdp_PYTHON)'; test -n "$(fgdpdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$fileso +install-fgdpDATA: $(fgdp_DATA) + @$(NORMAL_INSTALL) + test -z "$(fgdpdir)" || $(MKDIR_P) "$(DESTDIR)$(fgdpdir)" + @list='$(fgdp_DATA)'; test -n "$(fgdpdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(fgdpdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(fgdpdir)" || exit $$?; \ + done + +uninstall-fgdpDATA: + @$(NORMAL_UNINSTALL) + @list='$(fgdp_DATA)'; test -n "$(fgdpdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(fgdpdir)" "$(DESTDIR)$(fgdpdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-fgdpDATA install-fgdpPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-fgdpDATA uninstall-fgdpPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-fgdpDATA \ + install-fgdpPYTHON install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-fgdpDATA uninstall-fgdpPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/consumers/fgdp/wizard.glade flumotion-0.9.1/flumotion/component/consumers/fgdp/wizard.glade --- flumotion-0.6.1/flumotion/component/consumers/fgdp/wizard.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/fgdp/wizard.glade 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,207 @@ + + + + + + False + window1 + + + True + False + + + True + False + 3 + + + True + False + 4 + 2 + 6 + 6 + + + True + False + 0 + _Flumotion host: + True + host + + + GTK_FILL + + + + + + True + False + 0 + 0 + + + True + True + 24 + localhost.localdomain + False + False + True + True + + + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + False + 0 + Flumotion port: + + + 1 + 2 + GTK_FILL + + + + + + True + False + 0 + Username: + + + 2 + 3 + GTK_FILL + + + + + + True + False + 0 + Password: + + + 3 + 4 + GTK_FILL + + + + + + True + False + 0 + 0 + + + True + True + + 24 + user + True + False + False + True + True + + + + + 1 + 2 + 2 + 3 + GTK_FILL + GTK_FILL + + + + + True + False + 0 + 0 + + + True + True + + 24 + test + True + False + False + True + True + + + + + 1 + 2 + 3 + 4 + GTK_FILL + GTK_FILL + + + + + True + False + 0 + 0.20000000298023224 + + + True + True + + False + False + True + True + 15000 1024 64000 1 10 0 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + + + False + False + 0 + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/fgdp/wizard_gtk.py flumotion-0.9.1/flumotion/component/consumers/fgdp/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/consumers/fgdp/wizard_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/fgdp/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,128 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gettext +import os +from zope.interface import implements + +from flumotion.admin.assistant.interfaces import IConsumerPlugin +from flumotion.admin.assistant.models import Consumer +from flumotion.admin.gtk.basesteps import ConsumerStep + +__version__ = "$Rev$" +_ = gettext.gettext + + +class FGDPConsumer(Consumer): + componentType = 'fgdp-consumer' + prefix = 'fgdp' + + def __init__(self): + super(FGDPConsumer, self).__init__() + self.properties.host = '127.0.0.1' + self.properties.port = 15000 + self.properties.username = 'user' + self.properties.password = 'test' + + +class FGDPStep(ConsumerStep): + gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'wizard.glade') + + def __init__(self, wizard): + self.model = FGDPConsumer() + ConsumerStep.__init__(self, wizard) + + # ConsumerStep + + def getConsumerModel(self): + return self.model + + # WizardStep + + def setup(self): + self.host.data_type = str + self.port.data_type = int + self.username.data_type = str + self.password.data_type = str + + self.add_proxy(self.model.properties, + ['host', + 'port', + 'username', + 'password']) + + def workerChanged(self, worker): + self.model.worker = worker + self.wizard.checkElements(worker, 'fgdpsend') + + +class FGDPBothStep(FGDPStep): + name = 'Flumotion streamer (audio & video)' + title = _('Flumotion Streamer (Audio and Video)') + sidebarName = _('Audio/video FGDP') + docSection = 'help-configuration-assistant-fgdp-streaming-both' + docAnchor = '' + docVersion = 'local' + + # ConsumerStep + + def getConsumerType(self): + return 'audio-video' + + +class FGDPAudioStep(FGDPStep): + name = 'FGDP streamer (audio only)' + title = _('FGDP Streamer (Audio Only)') + sidebarName = _('Audio FGDP') + docSection = 'help-configuration-assistant-fgdp-streaming-audio-only' + docAnchor = '' + docVersion = 'local' + + # ConsumerStep + + def getConsumerType(self): + return 'audio' + + +class FGDPVideoStep(FGDPStep): + name = 'Flumotion streamer (video only)' + title = _('Flumotion Streamer (Video Only)') + sidebarName = _('Video FGDP') + docSection = 'help-configuration-assistant-fgdp-streaming-video-only' + docAnchor = '' + docVersion = 'local' + + # ConsumerStep + + def getConsumerType(self): + return 'video' + + +class FGDPConsumerWizardPlugin(object): + implements(IConsumerPlugin) + + def __init__(self, wizard): + self.wizard = wizard + + def getConsumptionStep(self, type): + if type == 'video': + return FGDPVideoStep(self.wizard) + elif type == 'audio': + return FGDPAudioStep(self.wizard) + elif type == 'audio-video': + return FGDPBothStep(self.wizard) diff -Nru flumotion-0.6.1/flumotion/component/consumers/gdp/gdp.py flumotion-0.9.1/flumotion/component/consumers/gdp/gdp.py --- flumotion-0.6.1/flumotion/component/consumers/gdp/gdp.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/gdp/gdp.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -from flumotion.component import feedcomponent - -__version__ = "$Rev: 6125 $" - - -class GDPConsumer(feedcomponent.ParseLaunchComponent): - - def get_pipeline_string(self, properties): - port = properties['port'] - - return 'gdppay ! tcpserversink port=%d' % port diff -Nru flumotion-0.6.1/flumotion/component/consumers/gdp/gdp.xml flumotion-0.9.1/flumotion/component/consumers/gdp/gdp.xml --- flumotion-0.6.1/flumotion/component/consumers/gdp/gdp.xml 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/gdp/gdp.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru flumotion-0.6.1/flumotion/component/consumers/gdp/__init__.py flumotion-0.9.1/flumotion/component/consumers/gdp/__init__.py --- flumotion-0.6.1/flumotion/component/consumers/gdp/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/gdp/__init__.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -""" -code for porter clients and servers -""" - -__version__ = "$Rev: 6125 $" diff -Nru flumotion-0.6.1/flumotion/component/consumers/gdp/Makefile.am flumotion-0.9.1/flumotion/component/consumers/gdp/Makefile.am --- flumotion-0.6.1/flumotion/component/consumers/gdp/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/gdp/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -include $(top_srcdir)/common/python.mk - -gdpdir = $(libdir)/flumotion/python/flumotion/component/consumers/gdp - -gdp_PYTHON = \ - __init__.py \ - gdp.py - -gdp_DATA = gdp.xml - -TAGS_FILES = $(gdp_PYTHON) - -clean-local: - rm -rf *.pyc *.pyo - -EXTRA_DIST = $(gdp_PYTHON) $(gdp_DATA) diff -Nru flumotion-0.6.1/flumotion/component/consumers/gdp/Makefile.in flumotion-0.9.1/flumotion/component/consumers/gdp/Makefile.in --- flumotion-0.6.1/flumotion/component/consumers/gdp/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/gdp/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,546 +0,0 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(gdp_PYTHON) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk -subdir = flumotion/component/consumers/gdp -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ - $(top_srcdir)/common/as-libtool-tags.m4 \ - $(top_srcdir)/common/as-python.m4 \ - $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(gdpdir)" "$(DESTDIR)$(gdpdir)" -py_compile = $(top_srcdir)/py-compile -DATA = $(gdp_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BINDIR = @BINDIR@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CORTADO_PREFIX = @CORTADO_PREFIX@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPYDOC = @EPYDOC@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_ICONV = @INTLTOOL_ICONV@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ -INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ -INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ -INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALSTATEDIR = @LOCALSTATEDIR@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -POSUB = @POSUB@ -PYCHECKER = @PYCHECKER@ -PYGST_010_REQ = @PYGST_010_REQ@ -PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_INCLUDES = @PYTHON_INCLUDES@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -RELEASE = @RELEASE@ -SBINDIR = @SBINDIR@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SYSCONFDIR = @SYSCONFDIR@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XVFB = @XVFB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -gdpdir = $(libdir)/flumotion/python/flumotion/component/consumers/gdp -gdp_PYTHON = \ - __init__.py \ - gdp.py - -gdp_DATA = gdp.xml -TAGS_FILES = $(gdp_PYTHON) -EXTRA_DIST = $(gdp_PYTHON) $(gdp_DATA) -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/consumers/gdp/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu flumotion/component/consumers/gdp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-gdpPYTHON: $(gdp_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(gdpdir)" || $(MKDIR_P) "$(DESTDIR)$(gdpdir)" - @list='$(gdp_PYTHON)'; dlist=; list2=; test -n "$(gdpdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ - $(am__strip_dir) \ - dlist="$$dlist $$f"; \ - list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ - for file in $$list2; do echo $$file; done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gdpdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(gdpdir)" || exit $$?; \ - done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(gdpdir)" $$dlist; \ - else \ - PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(gdpdir)" $$dlist; \ - fi; \ - else :; fi - -uninstall-gdpPYTHON: - @$(NORMAL_UNINSTALL) - @list='$(gdp_PYTHON)'; test -n "$(gdpdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - filesc=`echo "$$files" | sed 's|$$|c|'`; \ - fileso=`echo "$$files" | sed 's|$$|o|'`; \ - echo " ( cd '$(DESTDIR)$(gdpdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(gdpdir)" && rm -f $$files || exit $$?; \ - echo " ( cd '$(DESTDIR)$(gdpdir)' && rm -f" $$filesc ")"; \ - cd "$(DESTDIR)$(gdpdir)" && rm -f $$filesc || exit $$?; \ - echo " ( cd '$(DESTDIR)$(gdpdir)' && rm -f" $$fileso ")"; \ - cd "$(DESTDIR)$(gdpdir)" && rm -f $$fileso -install-gdpDATA: $(gdp_DATA) - @$(NORMAL_INSTALL) - test -z "$(gdpdir)" || $(MKDIR_P) "$(DESTDIR)$(gdpdir)" - @list='$(gdp_DATA)'; test -n "$(gdpdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gdpdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(gdpdir)" || exit $$?; \ - done - -uninstall-gdpDATA: - @$(NORMAL_UNINSTALL) - @list='$(gdp_DATA)'; test -n "$(gdpdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(gdpdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(gdpdir)" && rm -f $$files -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(DATA) -installdirs: - for dir in "$(DESTDIR)$(gdpdir)" "$(DESTDIR)$(gdpdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-gdpDATA install-gdpPYTHON - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-gdpDATA uninstall-gdpPYTHON - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - clean-local distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-gdpDATA \ - install-gdpPYTHON install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-gdpDATA uninstall-gdpPYTHON - - -#if HAVE_PYCHECKER -#check-local: $(PYCHECKER_FILES) -# if test ! -z "$(PYCHECKER_FILES)"; \ -# then \ -# PYTHONPATH=$(top_srcdir):$(top_builddir) \ -# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ -# $(PYCHECKER_FILES); \ -# fi -#endif - -clean-local: - rm -rf *.pyc *.pyo - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/admin_gtk.py flumotion-0.9.1/flumotion/component/consumers/httpstreamer/admin_gtk.py --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/admin_gtk.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -29,7 +25,7 @@ from flumotion.ui.linkwidget import LinkWidget _ = gettext.gettext -__version__ = "$Rev: 7768 $" +__version__ = "$Rev$" class StatisticsAdminGtkNode(BaseAdminGtkNode): @@ -114,6 +110,9 @@ uri = state.get('stream-url', '') if not self._link and uri: self._link = self._createLinkWidget(uri) + elif self._link: + self._link.set_uri(uri) + self._link.set_label(uri) disable = state.get('stream-mime') is None tooltip = _('The stream is temporarly unavailable.\n' @@ -161,3 +160,69 @@ self.nodes['Log'].logMessage(message) GUIClass = HTTPStreamerAdminGtk + + +class IcyAdminGtkNode(BaseAdminGtkNode): + gladeFile = os.path.join('flumotion', 'component', 'consumers', + 'httpstreamer', 'icytab.glade') + + def __init__(self, *args, **kwargs): + BaseAdminGtkNode.__init__(self, *args, **kwargs) + self._icytab = None + self._shown = False + self._stats = None + self._labels = {} + + def haveWidgetTree(self): + self._labels = {} + self._icytab = self.wtree.get_widget('main_vbox') + self.widget = self._icytab + + for name in ['title', 'timestamp']: + self._registerLabel('icy-' + name) + + return self.widget + + def _registerLabel(self, name): + widget = self.wtree.get_widget('label-' + name) + if not widget: + print "FIXME: no widget %s" % name + return + + self._labels[name] = widget + + def _updateLabels(self, stats): + for name in self._labels: + text = stats.get(name, '') + self._labels[name].set_text(text) + + def setStats(self, stats): + # Set _stats regardless of if condition + # Used to be a race where _stats was + # not set if widget tree was gotten before + # ui state + self._stats = stats + if not self._icytab: + return + + self._updateLabels(stats) + + if not self._shown: + # widget tree created but not yet shown + self._shown = True + self._icytab.show_all() + + +class ICYStreamerAdminGtk(HTTPStreamerAdminGtk): + + def setup(self): + icytab = IcyAdminGtkNode(self.state, self.admin, + _("ICY")) + self.nodes['ICY'] = icytab + + HTTPStreamerAdminGtk.setup(self) + + def uiStateChanged(self, state): + HTTPStreamerAdminGtk.uiStateChanged(self, state) + + self.nodes['ICY'].setStats(state) diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/httpstreamer.py flumotion-0.9.1/flumotion/component/consumers/httpstreamer/httpstreamer.py --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/httpstreamer.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/httpstreamer.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,36 +1,33 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_http -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import time import gst + from twisted.cred import credentials from twisted.internet import reactor, error, defer from twisted.web import server + from zope.interface import implements from flumotion.common import gstreamer, errors from flumotion.common import messages, netutils, interfaces -from flumotion.common.format import formatStorage, formatTime -from flumotion.common.i18n import N_, gettexter +from flumotion.common import format as formatting from flumotion.component import feedcomponent from flumotion.component.base import http from flumotion.component.component import moods @@ -38,9 +35,13 @@ from flumotion.component.misc.porter import porterclient from flumotion.twisted import fdserver +from flumotion.common.i18n import N_, gettexter + __all__ = ['HTTPMedium', 'MultifdSinkStreamer'] -__version__ = "$Rev: 8058 $" +__version__ = "$Rev$" + T_ = gettexter() + STATS_POLL_INTERVAL = 10 UI_UPDATE_THROTTLE_PERIOD = 2.0 # Don't update UI more than once every two # seconds @@ -49,10 +50,12 @@ # FIXME: generalize this class and move it out here ? -class Stats: +class Stats(object): - def __init__(self, sink): - self.sink = sink + def __init__(self, sinks): + if not isinstance(sinks, list): + sinks = [sinks] + self.sinks = sinks self.no_clients = 0 self.clients_added_count = 0 @@ -141,10 +144,12 @@ return self.getBytesReceived() * 8 / self.getUptime() def getBytesSent(self): - return self.sink.get_property('bytes-served') + return sum(map( + lambda sink: sink.get_property('bytes-served'), self.sinks)) def getBytesReceived(self): - return self.sink.get_property('bytes-to-serve') + return max(map( + lambda sink: sink.get_property('bytes-to-serve'), self.sinks)) def getUptime(self): return time.time() - self.start_time @@ -176,13 +181,14 @@ set('stream-mime', c.get_mime()) set('stream-url', c.getUrl()) - set('stream-uptime', formatTime(uptime)) + set('stream-uptime', formatting.formatTime(uptime)) bitspeed = bytes_received * 8 / uptime currentbitrate = self.getCurrentBitrate() - set('stream-bitrate', formatStorage(bitspeed) + 'bit/s') + set('stream-bitrate', formatting.formatStorage(bitspeed) + 'bit/s') set('stream-current-bitrate', - formatStorage(currentbitrate) + 'bit/s') - set('stream-totalbytes', formatStorage(bytes_received) + 'Byte') + formatting.formatStorage(currentbitrate) + 'bit/s') + set('stream-totalbytes', + formatting.formatStorage(bytes_received) + 'Byte') set('stream-bitrate-raw', bitspeed) set('stream-totalbytes-raw', bytes_received) @@ -193,10 +199,13 @@ set('clients-average', str(int(c.getAverageClients()))) bitspeed = bytes_sent * 8 / uptime - set('consumption-bitrate', formatStorage(bitspeed) + 'bit/s') + set('consumption-bitrate', + formatting.formatStorage(bitspeed) + 'bit/s') set('consumption-bitrate-current', - formatStorage(currentbitrate * c.getClients()) + 'bit/s') - set('consumption-totalbytes', formatStorage(bytes_sent) + 'Byte') + formatting.formatStorage( + currentbitrate * c.getClients()) + 'bit/s') + set('consumption-totalbytes', + formatting.formatStorage(bytes_sent) + 'Byte') set('consumption-bitrate-raw', bitspeed) set('consumption-totalbytes-raw', bytes_sent) @@ -251,6 +260,8 @@ def remote_updatePorterDetails(self, path, username, password): return self.comp.updatePorterDetails(path, username, password) + def remote_removeAllClients(self): + return self.comp.remove_all_clients() ### the actual component is a streamer using multifdsink @@ -268,6 +279,7 @@ 'recover-policy=3' componentMediumClass = HTTPMedium + defaultSyncMethod = 0 def init(self): reactor.debug = True @@ -278,6 +290,7 @@ self.httpauth = None self.mountPoint = None self.burst_on_connect = False + self.timeout = 0L self.description = None @@ -321,19 +334,6 @@ def check_properties(self, props, addMessage): - # F0.6: remove backwards-compatible properties - self.fixRenamedProperties(props, [ - ('issuer', 'issuer-class'), - ('mount_point', 'mount-point'), - ('porter_socket_path', 'porter-socket-path'), - ('porter_username', 'porter-username'), - ('porter_password', 'porter-password'), - ('user_limit', 'client-limit'), - ('bandwidth_limit', 'bandwidth-limit'), - ('burst_on_connect', 'burst-on-connect'), - ('burst_size', 'burst-size'), - ]) - if props.get('type', 'master') == 'slave': for k in 'socket-path', 'username', 'password': if not 'porter-' + k in props: @@ -354,16 +354,11 @@ 'gst-plugins-base', '0.10.10')) addMessage(m) - def time_bursting_supported(self, sink): - try: - sink.get_property('units-max') - return True - except TypeError: - return False - def setup_burst_mode(self, sink): if self.burst_on_connect: - if self.burst_time and self.time_bursting_supported(sink): + if self.burst_time and \ + gstreamer.element_factory_has_property('multifdsink', + 'units-max'): self.debug("Configuring burst mode for %f second burst", self.burst_time) # Set a burst for configurable minimum time, plus extra to @@ -421,16 +416,17 @@ sink.set_property('buffers-max', 500) else: self.debug("no burst-on-connect, setting sync-method 0") - sink.set_property('sync-method', 0) + sink.set_property('sync-method', self.defaultSyncMethod) sink.set_property('buffers-soft-max', 250) sink.set_property('buffers-max', 500) - def configure_pipeline(self, pipeline, properties): - Stats.__init__(self, sink=self.get_element('sink')) - - self._updateCallLaterId = reactor.callLater(10, self._updateStats) + def configureAuthAndResource(self): + self.httpauth = http.HTTPAuthentication(self) + self.resource = resources.HTTPStreamingResource(self, + self.httpauth) + def parseProperties(self, properties): mountPoint = properties.get('mount-point', '') if not mountPoint.startswith('/'): mountPoint = '/' + mountPoint @@ -452,29 +448,11 @@ if self.description is None: self.description = "Flumotion Stream" - # FIXME: tie these together more nicely - self.httpauth = http.HTTPAuthentication(self) - self.resource = resources.HTTPStreamingResource(self, - self.httpauth) - # check how to set client sync mode - sink = self.get_element('sink') self.burst_on_connect = properties.get('burst-on-connect', False) self.burst_size = properties.get('burst-size', 0) self.burst_time = properties.get('burst-time', 0.0) - self.setup_burst_mode(sink) - - sink.connect('deep-notify::caps', self._notify_caps_cb) - - # these are made threadsafe using idle_add in the handler - sink.connect('client-added', self._client_added_handler) - - # We now require a sufficiently recent multifdsink anyway that we can - # use the new client-fd-removed signal - sink.connect('client-fd-removed', self._client_fd_removed_cb) - sink.connect('client-removed', self._client_removed_cb) - if 'client-limit' in properties: limit = int(properties['client-limit']) self.resource.setUserLimit(limit) @@ -505,8 +483,8 @@ if 'bouncer' in properties: self.httpauth.setBouncerName(properties['bouncer']) - if 'issuer-class' in properties: - self.httpauth.setIssuerClass(properties['issuer-class']) + if 'allow-default' in properties: + self.httpauth.setAllowDefault(properties['allow-default']) if 'duration' in properties: self.httpauth.setDefaultDuration( @@ -524,6 +502,9 @@ logFilter.addIPFilter(f) self.resource.setLogFilter(logFilter) + if 'timeout' in properties: + self.timeout = properties['timeout'] * gst.SECOND + self.type = properties.get('type', 'master') if self.type == 'slave': # already checked for these in do_check @@ -533,15 +514,54 @@ self.port = int(properties.get('port', 8800)) + def configureSink(self, sink): + self.setup_burst_mode(sink) + + if gstreamer.element_factory_has_property('multifdsink', + 'resend-streamheader'): + sink.set_property('resend-streamheader', False) + else: + self.debug("resend-streamheader property not available, " + "resending streamheader when it changes in the caps") + + sink.set_property('timeout', self.timeout) + + sink.connect('deep-notify::caps', self._notify_caps_cb) + + # these are made threadsafe using idle_add in the handler + sink.connect('client-added', self._client_added_handler) + + # We now require a sufficiently recent multifdsink anyway that we can + # use the new client-fd-removed signal + sink.connect('client-fd-removed', self._client_fd_removed_cb) + sink.connect('client-removed', self._client_removed_cb) + + sink.caps = None + + def configure_pipeline(self, pipeline, properties): + Stats.__init__(self, self.get_element('sink')) + self._updateCallLaterId = reactor.callLater(10, self._updateStats) + + self.configureAuthAndResource() + self.parseProperties(properties) + + sink = self.get_element('sink') + self.configureSink(sink) + def __repr__(self): return '' % self.name def getMaxClients(self): return self.resource.maxclients + def hasCaps(self): + # all the sinks should have caps set + sinkHasCaps = map(lambda sink: sink.caps is not None, self.sinks) + return None not in sinkHasCaps + def get_mime(self): - if self.caps: - return self.caps.get_structure(0).get_name() + if self.sinks[0].caps: + return self.sinks[0].caps[0].get_name() def get_content_type(self): mime = self.get_mime() @@ -550,7 +570,19 @@ return mime def getUrl(self): - return "http://%s:%d%s" % (self.hostname, self.port, self.mountPoint) + port = self.port + + if self.type == 'slave' and self._pbclient: + if not self._pbclient.remote_port: + return "" + port = self._pbclient.remote_port + + if (not port) or (port == 80): + port_str = "" + else: + port_str = ":%d" % port + + return "http://%s%s%s" % (self.hostname, port_str, self.mountPoint) def getStreamData(self): socket = 'flumotion.component.plugs.streamdata.StreamDataProviderPlug' @@ -584,7 +616,7 @@ return (deltaadded * bitrate, deltaremoved * bitrate, bytes_sent, clients_connected, current_load) - def add_client(self, fd): + def add_client(self, fd, request): sink = self.get_element('sink') sink.emit('add', fd) @@ -652,6 +684,8 @@ ### START OF THREAD-AWARE CODE (called from non-reactor threads) def _notify_caps_cb(self, element, pad, param): + # We store caps in sink objects as + # each sink might (and will) serve different content-type caps = pad.get_negotiated_caps() if caps == None: return @@ -659,11 +693,11 @@ caps_str = gstreamer.caps_repr(caps) self.debug('Got caps: %s' % caps_str) - if not self.caps == None: + if not element.caps == None: self.warning('Already had caps: %s, replacing' % caps_str) self.debug('Storing caps: %s' % caps_str) - self.caps = caps + element.caps = caps reactor.callFromThread(self.update_ui_state) @@ -781,7 +815,7 @@ self._porterPassword) self._pbclient.startLogin(creds, self._pbclient.medium) - self.debug("Starting porter login at \"%s\"", self._porterPath) + self.info("Starting porter login at \"%s\"", self._porterPath) # This will eventually cause d to fire reactor.connectWith( fdserver.FDConnector, self._porterPath, @@ -789,8 +823,9 @@ else: # Streamer is standalone. try: - self.debug('Listening on %d' % self.port) iface = self.iface or "" + self.info('Listening on port %d, interface=%r', + self.port, iface) self._tport = reactor.listenTCP( self.port, server.Site(resource=root), interface=iface) diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/httpstreamer.xml flumotion-0.9.1/flumotion/component/consumers/httpstreamer/httpstreamer.xml --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/httpstreamer.xml 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/httpstreamer.xml 2011-09-11 08:09:04.000000000 +0000 @@ -7,6 +7,9 @@ + + @@ -14,6 +17,8 @@ function="MultifdSinkStreamer" /> + @@ -23,6 +28,7 @@ + @@ -32,6 +38,8 @@ _description="The name of a bouncer in the atmosphere to authenticate against." /> + @@ -90,8 +98,112 @@ _description="How much data to burst (in KB)." /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -122,6 +234,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -138,5 +278,18 @@ + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/icymux.py flumotion-0.9.1/flumotion/component/consumers/httpstreamer/icymux.py --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/icymux.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/icymux.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,210 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_ts_segmenter -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + + +import gst +import gobject +import time + + +class IcyMux(gst.Element): + ''' + I mux the metadata with title changes into audio stream. + ''' + + _DEFAULT_FRAMESIZE = 256 + _DEFAULT_NUMFRAMES = 16 + _MAX_INT = int(1 << 31 - 1) + + + __gproperties__ = { + 'frame-size': (int, + 'size of the frame in bytes', + 'The size in bytes of the frame', + 1, _MAX_INT, _DEFAULT_FRAMESIZE, + gobject.PARAM_READWRITE), + 'num-frames': (int, + 'number of frames per data block', + 'The number of frames per data block', + 1, _MAX_INT, _DEFAULT_NUMFRAMES, + gobject.PARAM_READWRITE), + 'icy-metaint': (int, + 'number of bytes per data block', + 'The length of data block', + 1, _MAX_INT, _DEFAULT_FRAMESIZE * _DEFAULT_NUMFRAMES, + gobject.PARAM_READABLE), + 'iradio-title': (str, + 'title of currently playing song', + 'Title of currently playing song', + None, gobject.PARAM_READABLE), + 'iradio-timestamp': (int, + 'last title timestamp', + 'Epoch time of last title change', + -_MAX_INT, _MAX_INT, -1, gobject.PARAM_READABLE)} + + __gsignals__ = {"broadcast-title": (gobject.SIGNAL_RUN_LAST,\ + gobject.TYPE_NONE, [])} + + __gstdetails__ = ('IcyMux', 'Codec/Muxer', + 'Icy format muxer', + 'Flumotion Dev Team') + + _sinkpadtemplate = gst.PadTemplate("sink", + gst.PAD_SINK, + gst.PAD_ALWAYS, + gst.caps_from_string("audio/mpeg;application/ogg")) + + _srcpadtemplate = gst.PadTemplate("src", + gst.PAD_SRC, + gst.PAD_ALWAYS, + gst.caps_from_string("application/x-icy, " +\ + "metadata-interval= (int)[0, MAX]")) + + def __init__(self): + gst.Element.__init__(self) + + self.sinkpad = gst.Pad(self._sinkpadtemplate, "sink") + self.sinkpad.set_chain_function(self.chainfunc) + self.add_pad(self.sinkpad) + self.sinkpad.add_event_probe(self._tag_event_cb) + + self.srcpad = gst.Pad(self._srcpadtemplate, "src") + self.add_pad(self.srcpad) + + self._frameSize = self._DEFAULT_FRAMESIZE + self._numFrames = self._DEFAULT_NUMFRAMES + self._recountMetaint() + + self.connect('broadcast-title', self._broadcast_title_handler) + + self._reset() + + def _reset(self): + self.adapter = gst.Adapter() + self._frameCount = 0 + self._shouldOutputMetadata = False + self._lastTitle = None + self._lastTitleTimestamp = -1 + + def _broadcast_title_handler(self, object): + self.debug("Will broadcast title.") + self._shouldOutputMetadata = True + + def _tag_event_cb(self, pad, event): + self.debug("Received event %r" % event) + if event.type == gst.EVENT_TAG: + struc = event.get_structure() + if 'title' in struc.keys(): + self._lastTitle = struc['title'] + self._lastTitleTimestamp = int(time.time()) + self.debug("Stored title: %r on timestamp %r" %\ + (self._lastTitle, self._lastTitleTimestamp)) + self._shouldOutputMetadata = True + return True + + def _recountMetaint(self): + self._icyMetaint = self._frameSize * self._numFrames + self.debug("Metaint recount: %d" % self._icyMetaint) + + def do_get_property(self, property): + if property.name == "frame-size": + return self._frameSize + elif property.name == "num-frames": + return self._numFrames + elif property.name == "icy-metaint": + return self._icyMetaint + elif property.name == "iradio-title": + return self._lastTitle + elif property.name == 'iradio-timestamp': + return self._lastTitleTimestamp + else: + raise AttributeError('unknown property %s' % property.name) + + def do_set_property(self, property, value): + if property.name == "frame-size": + self.debug("Setting frame-size to %s" % value) + self._frameSize = int(value) + self._recountMetaint() + elif property.name == "num-frames": + self.debug("Setting num-frames to %s" % value) + self._numFrames = int(value) + self._recountMetaint() + elif property.name == "icy-metaint": + raise AttributeError("readonly property %s" % property.name) + else: + raise AttributeError('unknown property %s' % property.name) + + def do_change_state(self, transition): + if transition == gst.STATE_CHANGE_PAUSED_TO_READY: + self._reset() + return gst.Element.do_change_state(self, transition) + + def chainfunc(self, pad, buffer): + self.adapter.push(buffer) + while self.adapter.available() >= self._frameSize: + frame = self.adapter.take_buffer(self._frameSize) + self._setCapsAndFlags(frame) + if self._frameCount == 0: + #mark as key frame + frame.flag_unset(gst.BUFFER_FLAG_DELTA_UNIT) + self.log('marked as keyframe') + + self.srcpad.push(frame) + self.log('Pushed frame of size %d' % frame.size) + self._frameCount += 1 + + if self._frameCount == self._numFrames: + self.outputMetadata() + self._frameCount = 0 + return gst.FLOW_OK + + def _getTitleForMetadata(self): + if self._shouldOutputMetadata: + self.info("Will output title: %r" % self._lastTitle) + self._shouldOutputMetadata = False + return self._lastTitle + else: + return None + + def outputMetadata(self): + buf = MetadataBuffer(title=self._getTitleForMetadata()) + self._setCapsAndFlags(buf) + self.srcpad.push(buf) + self.log('Pushed metadata') + + def _setCapsAndFlags(self, buf): + buf.set_caps(gst.caps_from_string("application/x-icy, " +\ + "metadata-interval=%d" % self._icyMetaint)) + buf.flag_set(gst.BUFFER_FLAG_DELTA_UNIT) + + +gst.element_register(IcyMux, "icymux") + + +class MetadataBuffer(gst.Buffer): + + def __init__(self, title=None): + self.title = title + + payload = "" + if title: + title = title.encode("utf-8", "replace") + payload = "StreamTitle='%s';" % title + if not (len(payload) % 16 == 0): + toAdd = 16 - (len(payload) % 16) + payload = payload + "\0" * toAdd + gst.Buffer.__init__(self, chr(len(payload) / 16) + payload) diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/icystreamer.py flumotion-0.9.1/flumotion/component/consumers/httpstreamer/icystreamer.py --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/icystreamer.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/icystreamer.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,188 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_http -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import time + +import gst +from twisted.internet import reactor, defer +from zope.interface import implements + +from flumotion.common import interfaces +from flumotion.component.base import http +from flumotion.component.consumers.httpstreamer import resources + +from httpstreamer import MultifdSinkStreamer, Stats + +# this import registers the gstreamer icymux element, don't remove it +import icymux + + +__all__ = ['ICYStreamer'] +__version__ = "$Rev$" + + +class ICYStreamer(MultifdSinkStreamer): + implements(interfaces.IStreamingComponent) + + checkOffset = True + + logCategory = 'icy-http' + + pipe_template = 'identity name=input silent=true ! tee name=tee ' + \ + 'tee. ! queue ! multifdsink name=sink-without-id3 sync=false ' + \ + 'recover-policy=3 ' + \ + 'tee. ! queue ! icymux name=mux ! ' + \ + 'multifdsink name=sink-with-id3 sync=false recover-policy=3' + + defaultSyncMethod = 2 + defaultFrameSize = 256 + defaultMetadataInterval = 2 + + def init(self): + MultifdSinkStreamer.init(self) + + # fd -> sink + self.sinkConnections = {} + # headers to be included in HTTP response + self.icyHeaders = {} + + for i in ('icy-title', 'icy-timestamp'): + self.uiState.addKey(i, None) + + # fired after we receive first datablock and configure muxer + self._muxerConfiguredDeferred = defer.Deferred() + + def configureAuthAndResource(self): + self.httpauth = http.HTTPAuthentication(self) + self.resource = resources.ICYStreamingResource(self, + self.httpauth) + + def configure_pipeline(self, pipeline, properties): + self.sinksByID3 =\ + {False: self.get_element('sink-without-id3'), + True: self.get_element('sink-with-id3')} + Stats.__init__(self, self.sinksByID3.values()) + + self._updateCallLaterId = reactor.callLater(10, self._updateStats) + + self.configureAuthAndResource() + self.parseProperties(properties) + + for sink in self.sinks: + self.configureSink(sink) + + pad = pipeline.get_by_name('tee').get_pad('sink') + pad.add_event_probe(self._tag_event_cb) + + self.configureMuxer(pipeline) + + def _tag_event_cb(self, pad, event): + + def store_tag(struc, headerKey, structureKey): + if structureKey in struc.keys(): + self.icyHeaders[headerKey] = struc[structureKey] + self.debug("Set header key %s = %s", \ + headerKey, struc[structureKey]) + + mapping = {'icy-name': 'organization', + 'icy-genre': 'genre', + 'icy-url': 'location'} + if event.type == gst.EVENT_TAG: + struc = event.get_structure() + self.debug('Structure keys of tag event: %r', struc.keys()) + for headerName in mapping: + reactor.callFromThread(\ + store_tag, struc, headerName, mapping[headerName]) + return True + + def parseProperties(self, properties): + MultifdSinkStreamer.parseProperties(self, properties) + + self._frameSize = properties.get('frame-size', self.defaultFrameSize) + self._metadataInterval = properties.get('metadata-interval', \ + self.defaultMetadataInterval) + + def configureMuxer(self, pipeline): + self.muxer = pipeline.get_by_name('mux') + self.muxer.set_property('frame-size', self._frameSize) + + def _setMuxerBitrate(bitrate): + numFrames = int(self._metadataInterval * bitrate / \ + 8 / self._frameSize) + self.debug("Setting number of frames to %r", numFrames) + self.muxer.set_property('num-frames', numFrames) + + self.icyHeaders['icy-br'] = bitrate / 1000 + self.icyHeaders['icy-metaint'] = \ + self.muxer.get_property("icy-metaint") + self._muxerConfiguredDeferred.callback(None) + + def _calculateBitrate(pad, data): + self.debug('Calculating bitrate of the stream') + bitrate = 8 * data.size * gst.SECOND / data.duration + self.debug('bitrate: %r', bitrate) + pad.remove_event_probe(handler_id) + reactor.callFromThread(_setMuxerBitrate, bitrate) + handler_id = self.pipeline.get_by_name('input').get_pad('sink').\ + add_buffer_probe(_calculateBitrate) + + def get_content_type(self): + # The content type should always be the content type of the stream as + # some players do not understand "application/x-icy" + sink = self.sinksByID3[False] + if sink.caps: + self.debug('Caps: %r', sink.caps.to_string()) + cap = sink.caps[0] + if cap.get_name() == 'audio/mpeg': + if cap['mpegversion']==2: + return 'audio/aacp' + return cap.get_name() + + def add_client(self, fd, request): + sink = self.sinksByID3[request.serveIcy] + self.debug("Adding client to sink: %r", sink) + self.sinkConnections[fd] = sink + + if request.serveIcy: + # FIXME: This sends title to every connected client. + # We should sent it only to the newly comming in client, but this + # requires patching multifdsink + self.muxer.emit('broadcast-title') + sink.emit('add', fd) + + def remove_client(self, fd): + sink = self.sinkConnections[fd] + sink.emit('remove', fd) + del self.sinkConnections[fd] + + def get_icy_headers(self): + self.debug("Icy headers: %r", self.icyHeaders) + return self.icyHeaders + + def updateState(self, set): + Stats.updateState(self, set) + + set('icy-title', self.muxer.get_property('iradio-title')) + timestamp = time.strftime("%c", time.localtime(\ + self.muxer.get_property('iradio-timestamp'))) + set('icy-timestamp', timestamp) + + def do_pipeline_playing(self): + # change the component mood to happy after we receive first data block + # so that we can calculate the bitrate and configure muxer + d = MultifdSinkStreamer.do_pipeline_playing(self) + return defer.DeferredList([d, self._muxerConfiguredDeferred]) diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/icytab.glade flumotion-0.9.1/flumotion/component/consumers/httpstreamer/icytab.glade --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/icytab.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/icytab.glade 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,101 @@ + + + + + + + + True + + + True + + + True + 0 + 0 + 7 + 10 + <b>ICY info</b> + True + + + + + False + 0 + + + + + 22 + True + 1 + + + 190 + True + 0.039999999105930328 + 9 + Last song title: + + + False + 0 + + + + + True + 0 + end + + + end + 3 + + + + + False + False + 1 + + + + + 20 + True + + + 190 + True + 0.070000000298023224 + 9 + Last title timestamp: + + + False + 0 + + + + + True + 0 + + + False + 1 + + + + + False + 2 + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/__init__.py flumotion-0.9.1/flumotion/component/consumers/httpstreamer/__init__.py --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/Makefile.am flumotion-0.9.1/flumotion/component/consumers/httpstreamer/Makefile.am --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -3,13 +3,18 @@ component_PYTHON = \ __init__.py \ httpstreamer.py \ + icystreamer.py \ + icymux.py \ resources.py \ - admin_gtk.py + admin_gtk.py \ + wizard_gtk.py componentdir = $(libdir)/flumotion/python/flumotion/component/consumers/httpstreamer component_DATA = \ httpstreamer.xml \ - httpstreamer.glade + httpstreamer.glade \ + icytab.glade \ + wizard.glade clean-local: rm -rf *.pyc *.pyo diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/Makefile.in flumotion-0.9.1/flumotion/component/consumers/httpstreamer/Makefile.in --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -276,13 +271,18 @@ component_PYTHON = \ __init__.py \ httpstreamer.py \ + icystreamer.py \ + icymux.py \ resources.py \ - admin_gtk.py + admin_gtk.py \ + wizard_gtk.py componentdir = $(libdir)/flumotion/python/flumotion/component/consumers/httpstreamer component_DATA = \ httpstreamer.xml \ - httpstreamer.glade + httpstreamer.glade \ + icytab.glade \ + wizard.glade # PYCHECKER_FILES = $(component_PYTHON) diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/resources.py flumotion-0.9.1/flumotion/component/consumers/httpstreamer/resources.py --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/resources.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/resources.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_http -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -36,17 +32,16 @@ from twisted.web import server, resource as web_resource from twisted.internet import reactor, defer -from twisted.python import reflect from flumotion.configure import configure -from flumotion.common import errors +from flumotion.common import log -from flumotion.common import common, log, keycards +# register serializable +from flumotion.common import keycards -from flumotion.component.base import http as httpbase __all__ = ['HTTPStreamingResource', 'MultifdSinkStreamer'] -__version__ = "$Rev: 7931 $" +__version__ = "$Rev$" HTTP_NAME = 'FlumotionHTTPServer' HTTP_VERSION = configure.version @@ -188,6 +183,24 @@ def setRedirectionOnLimits(self, url): self._redirectOnFull = url + def _setRequestHeaders(self, request): + content = self.streamer.get_content_type() + request.setHeader('Server', HTTP_SERVER) + request.setHeader('Date', http.datetimeToString()) + request.setHeader('Connection', 'close') + request.setHeader('Cache-Control', 'no-cache') + request.setHeader('Cache-Control', 'private') + request.setHeader('Content-type', content) + + def _formatHeaders(self, request): + # Mimic Twisted as close as possible + headers = [] + for name, value in request.headers.items(): + headers.append('%s: %s\r\n' % (name, value)) + for cookie in request.cookies: + headers.append('%s: %s\r\n' % ("Set-Cookie", cookie)) + return headers + # FIXME: rename to writeHeaders def _writeHeaders(self, request): @@ -210,24 +223,13 @@ # FIXME: do this ? del request return False - content = self.streamer.get_content_type() - request.setHeader('Server', HTTP_SERVER) - request.setHeader('Date', http.datetimeToString()) - request.setHeader('Cache-Control', 'no-cache') - request.setHeader('Cache-Control', 'private') - request.setHeader('Content-type', content) + self._setRequestHeaders(request) # Call request modifiers for modifier in self.modifiers: modifier.modify(request) - # Mimic Twisted as close as possible - headers = [] - for name, value in request.headers.items(): - headers.append('%s: %s\r\n' % (name.capitalize(), value)) - for cookie in request.cookies: - headers.append('%s: %s\r\n' % ("Set-Cookie", cookie)) - + headers = self._formatHeaders(request) # ASF needs a Pragma header for live broadcasts # Apparently ASF breaks on WMP port 80 if you use the pragma header @@ -265,7 +267,7 @@ return False def isReady(self): - if self.streamer.caps == None: + if not self.streamer.hasCaps(): self.debug('We have no caps yet') return False @@ -467,7 +469,6 @@ if not self._writeHeaders(request): self.debug("[fd %5d] not adding as a client" % fdi) return - self._addClient(request) # take over the file descriptor from Twisted by removing them from # the reactor @@ -496,8 +497,10 @@ fd, e.strerror, e.errno)) return + self._addClient(request) + # hand it to multifdsink - self.streamer.add_client(fd) + self.streamer.add_client(fd, request) ip = request.getClientIP() # PROBE: started request; see httpfile.httpfile @@ -525,3 +528,41 @@ r = web_resource.Resource.getChildWithDefault(self, fullPath, request) self.debug("Returning resource %r" % r) return r + + +class ICYStreamingResource(HTTPStreamingResource): + + def _render(self, request): + headerValue = request.getHeader('Icy-MetaData') + request.serveIcy = (headerValue == '1') + + return HTTPStreamingResource._render(self, request) + + def _setRequestHeaders(self, request): + content = self.streamer.get_content_type() + request.setHeader('Server', HTTP_SERVER) + request.setHeader('Date', http.datetimeToString()) + request.setHeader('Connection', 'close') + request.setHeader('Cache-Control', 'no-cache') + request.setHeader('Cache-Control', 'private') + request.setHeader('Content-type', content) + + if request.serveIcy: + additionalHeaders = self.streamer.get_icy_headers() + + for header in additionalHeaders: + request.setHeader(header, additionalHeaders[header]) + + def _formatHeaders(self, request): + # Mimic Twisted as close as possible + headers = [] + for name, value in request.headers.items(): + if not name.startswith("icy"): + name = name.capitalize() + headers.append('%s: %s\r\n' % (name, value)) + for cookie in request.cookies: + headers.append('%s: %s\r\n' % ("Set-Cookie", cookie)) + return headers + + render_GET = _render + render_HEAD = _render diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/wizard.glade flumotion-0.9.1/flumotion/component/consumers/httpstreamer/wizard.glade --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/wizard.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/wizard.glade 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,366 @@ + + + + + + window1 + + + True + + + True + 3 + + + True + 2 + 6 + 6 + + + True + 0 + _Mount point: + True + mount_point + + + GTK_FILL + + + + + + True + 0 + 0 + + + True + True + * + 24 + / + + + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + + + False + False + + + + + True + flumotion.ui.plugarea.WizardPlugArea + + + False + False + 1 + + + + + True + True + True + True + + + True + 6 + 4 + 6 + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + 20 + + + True + True + + localhost.localdomain + + + + + 4 + 5 + 6 + GTK_FILL + GTK_FILL + + + + + True + True + Public hostname: + True + 0 + True + + + + 4 + 5 + GTK_FILL + + + + + + True + 0 + Mbit/s + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + + True + 0 + clients + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + True + True + User limit: + True + 0 + True + + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + 0 + + + True + True + 500 1 16384 1 10 10 + 1 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 1 + + + + + + 1 + 2 + 3 + 4 + GTK_FILL + GTK_FILL + + + + + True + 1 + + + True + True + 10 0 1000 1 10 10 + 1 + 2 + + + + + 1 + 2 + 2 + 3 + GTK_FILL + GTK_FILL + + + + + True + 0 + 0 + + + True + True + 8800 1024 65535 1 10 10 + 1 + True + + + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 0 + 0 + + + True + True + Send buffered data to new clients. This reduces the delay before playback starts, but increases the latency. + Bu_rst on connect + True + 0 + True + + + + + 3 + 4 + GTK_FILL + GTK_FILL + + + + + True + 0 + 0 + + + True + True + Bandwidth limit: + True + 0 + True + + + + + + 2 + 3 + GTK_FILL + GTK_FILL + + + + + True + 0 + _Port: + True + port + + + GTK_FILL + + + + + + + + True + _Advanced settings + True + + + label_item + + + + + False + 2 + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/httpstreamer/wizard_gtk.py flumotion-0.9.1/flumotion/component/consumers/httpstreamer/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/consumers/httpstreamer/wizard_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/httpstreamer/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,527 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +"""HTTP wizard integration + +This provides a step which you can chose: +- http port +- bandwidth/client limit +- mount point (eg, the url it will be accessed as) +- burst on connect +- cortado java applet + +A component of type 'http-streamer' will always be created. +In addition, if you include the java applet, a 'porter' and +'http-server' will be included to share the port between the streamer +and the server and to serve an html file plus the java applet itself. +On the http-server the applet will be provided with help of a plug. +""" + +import gettext +import re +import os + +import gobject +from kiwi.utils import gsignal +import gtk +from twisted.internet import defer +from zope.interface import implements + +from flumotion.admin.assistant.interfaces import IConsumerPlugin +from flumotion.admin.assistant.models import Consumer, Porter +from flumotion.admin.gtk.basesteps import ConsumerStep +from flumotion.configure import configure +from flumotion.common import errors, log, messages +from flumotion.common.i18n import N_, gettexter, ngettext + +__version__ = "$Rev$" +_ = gettext.gettext +T_ = gettexter() + + +class HTTPStreamer(Consumer): + """I am a model representing the configuration file for a + HTTP streamer component. + @ivar has_client_limit: If a client limit was set + @ivar client_limit: The client limit + @ivar has_bandwidth_limit: If a bandwidth limit was set + @ivar bandwidth_limit: The bandwidth limit + @ivar set_hostname: If a hostname was set + @ivar hostname: the hostname this will be streamed on + @ivar port: The port this server will be listening to + """ + componentType = 'http-streamer' + requiresPorter = True + prefix = 'http' + + def __init__(self): + super(HTTPStreamer, self).__init__() + + self.setPorter( + Porter(worker=None, port=configure.defaultHTTPStreamPort)) + + self.has_client_limit = False + self.client_limit = 1000 + self.has_bandwidth_limit = False + self.bandwidth_limit = 500.0 + self.set_hostname = False + self.hostname = '' + self.port = None + + self.properties.burst_on_connect = False + + # Public + + def getURL(self): + """Fetch the url to this stream + @returns: the url + """ + return 'http://%s:%d%s' % ( + self.getHostname(), + self.getPorter().getPort(), + self.properties.mount_point) + + def getHostname(self): + """Fetch the hostname this stream will be published on + @returns: the hostname + """ + return self.hostname + + def setData(self, model): + """ + Sets the data from another model so we can reuse it. + + @param model : model to get the data from + @type model : L{HTTPStreamer} + """ + self.has_client_limit = model.has_client_limit + self.has_bandwidth_limit = model.has_bandwidth_limit + self.client_limit = model.client_limit + self.bandwidth_limit = model.bandwidth_limit + self.set_hostname = model.set_hostname + self.hostname = model.hostname + self.properties.burst_on_connect = model.properties.burst_on_connect + self.port = model.port + + # Component + + def getPorter(self): + """ + Obtains this streamer's porter model. + """ + porter = Consumer.getPorter(self) + porter.worker = self.worker + if self.port: + porter.properties.port = self.port + return porter + + def getProperties(self): + properties = super(HTTPStreamer, self).getProperties() + if self.has_bandwidth_limit: + properties.bandwidth_limit = int(self.bandwidth_limit * 1e6) + if self.has_client_limit: + properties.client_limit = self.client_limit + + porter = self.getPorter() + hostname = self.getHostname() + if hostname and self.set_hostname: + properties.hostname = hostname + properties.porter_socket_path = porter.getSocketPath() + properties.porter_username = porter.getUsername() + properties.porter_password = porter.getPassword() + properties.type = 'slave' + # FIXME: Try to maintain the port empty when we are slave. Needed + # for now as the adminwindow tab shows the URL based on this property. + properties.port = self.port or self.getPorter().getProperties().port + + return properties + + +class HTTPSpecificStep(ConsumerStep): + """I am a step of the configuration wizard which allows you + to configure a stream to be served over HTTP. + """ + section = _('Consumption') + gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'wizard.glade') + + def __init__(self, wizard): + self.model = HTTPStreamer() + ConsumerStep.__init__(self, wizard) + + def updateModel(self, model): + """ + There is a previous httpstreamer step from where the data can be copied + It will be copied to the actual model and the advanced + tab would be hidden. + + @param model: The previous model we are going to copy. + @type model: L{HTTPStreamer} + """ + self.model.setData(model) + self.expander.set_expanded(False) + self._proxy2.set_model(self.model) + + # ConsumerStep + + def getConsumerModel(self): + return self.model + + def getServerConsumers(self): + for line in self.plugarea.getEnabledLines(): + yield line.getConsumer(self.model, + self.wizard.getScenario().getAudioProducer(self.wizard), + self.wizard.getScenario().getVideoProducer(self.wizard)) + + # WizardStep + + def setup(self): + self.mount_point.data_type = str + self.bandwidth_limit.data_type = float + self.burst_on_connect.data_type = bool + self.client_limit.data_type = int + self.port.data_type = int + self.hostname.data_type = str + + self.model.properties.mount_point = self._getDefaultMountPath() + self._proxy1 = self.add_proxy(self.model.properties, + ['mount_point', 'burst_on_connect']) + self._proxy2 = self.add_proxy( + self.model, ['has_client_limit', + 'has_bandwidth_limit', + 'client_limit', + 'bandwidth_limit', + 'set_hostname', + 'hostname', + 'port']) + + self.client_limit.set_sensitive(self.model.has_client_limit) + self.bandwidth_limit.set_sensitive(self.model.has_bandwidth_limit) + self.hostname.set_sensitive(self.model.set_hostname) + + self.port.connect('changed', self.on_port_changed) + self.mount_point.connect('changed', self.on_mount_point_changed) + + def workerChanged(self, worker): + self.model.worker = worker + d = self._runChecks() + d.addCallback(self._populatePlugins) + return d + + def getNext(self): + + def setModel(next): + if next and next.model.componentType == self.model.componentType: + next.updateModel(self.model) + return next + d = defer.maybeDeferred(ConsumerStep.getNext, self) + d.addCallback(setModel) + return d + + # Private + + def _getDefaultMountPath(self): + encodingStep = self.wizard.getStep('Encoding') + return '/%s-%s/' % (str(encodingStep.getMuxerFormat()), + self.getConsumerType(), ) + + def _suggestMountPoint(self, mountPoint): + # FIXME: Generalise this method and use the same in f.a.a.save module. + # Resolve naming conflicts, using a simple algorithm + # First, find all the trailing digits, for instance in + # 'audio-producer42' -> '42' + mountPoint = mountPoint.rstrip('/') + + pattern = re.compile('(\d*$)') + match = pattern.search(mountPoint) + trailingDigit = match.group() + + # Now if we had a digit in the end, convert it to + # a number and increase it by one and remove the trailing + # digits the existing component name + if trailingDigit: + digit = int(trailingDigit) + 1 + mountPoint = mountPoint[:-len(trailingDigit)] + # No number in the end, use 2 the first one so we end up + # with 'audio-producer' and 'audio-producer2' in case of + # a simple conflict + else: + digit = 2 + return mountPoint + str(digit) + '/' + + def _populatePlugins(self, canPopulate): + if not canPopulate: + return + + self.plugarea.clean() + + def gotEntries(entries): + log.debug('httpwizard', 'got %r' % (entries, )) + for entry in entries: + if not self._canAddPlug(entry): + continue + + def response(factory, entry): + # FIXME: verify that factory implements IHTTPConsumerPlugin + plugin = factory(self.wizard) + if hasattr(plugin, 'workerChanged'): + d = plugin.workerChanged(self.worker) + + def cb(found, plugin, entry): + self._addPlug(plugin.getPlugWizard( + N_(entry.description)), found) + d.addCallback(cb, plugin, entry) + else: + self._addPlug(plugin.getPlugWizard( + N_(entry.description)), True) + d = self.wizard.getWizardPlugEntry(entry.componentType) + d.addCallback(response, entry) + + d = self.wizard.getWizardEntries(wizardTypes=['http-consumer']) + d.addCallbacks(gotEntries) + + def _canAddPlug(self, entry): + # This function filters out entries which are + # not matching the accepted media types of the entry + muxerTypes = [] + audioTypes = [] + videoTypes = [] + for mediaType in entry.getAcceptedMediaTypes(): + kind, name = mediaType.split(':', 1) + if kind == 'muxer': + muxerTypes.append(name) + elif kind == 'video': + videoTypes.append(name) + elif kind == 'audio': + audioTypes.append(name) + else: + raise AssertionError + + encoding_step = self.wizard.getStep('Encoding') + if encoding_step.getMuxerFormat() not in muxerTypes: + return False + + audioFormat = encoding_step.getAudioFormat() + videoFormat = encoding_step.getVideoFormat() + if ((audioFormat and audioFormat not in audioTypes) or + (videoFormat and videoFormat not in videoTypes)): + return False + + return True + + def _addPlug(self, plugin, enabled): + plugin.setEnabled(enabled) + self.plugarea.addLine(plugin) + + def _runChecks(self): + self.wizard.waitForTask('http streamer check') + + def hostnameErrback(failure): + failure.trap(errors.RemoteRunError) + self.wizard.taskFinished(blockNext=True) + return False + + def gotHostname(hostname): + self.model.hostname = hostname + self._proxy2.update('hostname') + self.wizard.taskFinished() + return True + + def getHostname(result): + if not result: + return False + + d = self.wizard.runInWorker( + self.worker, 'flumotion.worker.checks.http', + 'runHTTPStreamerChecks') + d.addCallback(gotHostname) + d.addErrback(hostnameErrback) + return d + + def checkImport(elements): + if elements: + self.wizard.taskFinished(blockNext=True) + return False + + d = self.wizard.requireImport( + self.worker, 'twisted.web', projectName='Twisted project', + projectURL='http://www.twistedmatrix.com/') + d.addCallback(getHostname) + return d + + # first check elements + d = self.wizard.requireElements(self.worker, 'multifdsink') + d.addCallback(checkImport) + return d + + def _checkMountPoint(self, port=None, worker=None, + mount_point=None, need_fix=False): + """ + Checks whether the provided mount point is available with the + current configuration (port, worker). It can provide a valid + mountpoint if it is required with need_fix=True. + + @param port : The port the streamer is going to be listening. + @type port : int + @param worker : The worker the streamer will be running. + @type worker : str + @param mount_point : The desired mount point. + @type mount_point : str + @param need_fix : Whether the method should search for a valid + mount_point if the provided one is not. + @type need_fix : bool + + @returns : True if the mount_point can be used, False if it is in use. + @rtype : bool + """ + self.wizard.clear_msg('http-streamer-mountpoint') + + port = port or self.model.port + worker = worker or self.model.worker + mount_point = mount_point or self.model.properties.mount_point + + self.wizard.waitForTask('http-streamer-mountpoint') + + if self.wizard.addMountPoint(worker, port, mount_point, + self.getConsumerType()): + self.wizard.taskFinished() + return True + else: + if need_fix: + while not self.wizard.addMountPoint(worker, port, + mount_point, + self.getConsumerType()): + mount_point=self._suggestMountPoint(mount_point) + + self.model.properties.mount_point = mount_point + self._proxy1.update('mount_point') + self.wizard.taskFinished() + return True + + message = messages.Error(T_(N_( + "The mount point %s is already being used for worker %s and " + "port %s. Please correct this to be able to go forward."), + mount_point, worker, port)) + message.id = 'http-streamer-mountpoint' + self.wizard.add_msg(message) + self.wizard.taskFinished(True) + return False + + # Callbacks + + def on_mount_point_changed(self, entry): + if not entry.get_text(): + self.wizard.clear_msg('http-streamer-mountpoint') + message = messages.Error(T_(N_( + "Mountpoint cannot be left empty.\n" + "Fill the text field with a correct mount point to" + "be able to go forward."))) + message.id = 'http-streamer-mountpoint' + self.wizard.add_msg(message) + self.wizard.blockNext(True) + else: + self._checkMountPoint(mount_point=entry.get_text()) + + def on_has_client_limit_toggled(self, cb): + self.client_limit.set_sensitive(cb.get_active()) + + def on_has_bandwidth_limit_toggled(self, cb): + self.bandwidth_limit.set_sensitive(cb.get_active()) + + def on_set_hostname__toggled(self, cb): + self.hostname.set_sensitive(cb.get_active()) + + def on_port_changed(self, widget): + if widget.get_text().isdigit(): + self._checkMountPoint(port=int(widget.get_text())) + + +class HTTPBothStep(HTTPSpecificStep): + name = 'HTTPStreamerBoth' + title = _('HTTP Streamer (Audio and Video)') + sidebarName = _('HTTP Audio/Video') + docSection = 'help-configuration-assistant-http-streaming-both' + docAnchor = '' + docVersion = 'local' + + # ConsumerStep + + def getConsumerType(self): + return 'audio-video' + + +class HTTPAudioStep(HTTPSpecificStep): + name = 'HTTPStreamerAudio' + title = _('HTTP Streamer (Audio Only)') + sidebarName = _('HTTP Audio') + docSection = 'help-configuration-assistant-http-streaming-audio-only' + docAnchor = '' + docVersion = 'local' + + # ConsumerStep + + def getConsumerType(self): + return 'audio' + + +class HTTPVideoStep(HTTPSpecificStep): + name = 'HTTPStreamerVideo' + title = _('HTTP Streamer (Video Only)') + sidebarName = _('HTTP Video') + docSection = 'help-configuration-assistant-http-streaming-video-only' + docAnchor = '' + docVersion = 'local' + + # ConsumerStep + + def getConsumerType(self): + return 'video' + + +class HTTPGenericStep(HTTPSpecificStep): + name = 'HTTPStreamerGeneric' + title = _('HTTP Streamer (Generic)') + sidebarName = _('HTTP Generic') + docSection = 'help-configuration-assistant-http-streaming-generic' + docAnchor = '' + docVersion = 'local' + + def __init__(self, wizard, type): + self._consumertype = type + HTTPSpecificStep.__init__(self, wizard) + + # ConsumerStep + + def getConsumerType(self): + return self._consumertype + + +class HTTPStreamerWizardPlugin(object): + implements(IConsumerPlugin) + + def __init__(self, wizard): + self.wizard = wizard + + def getConsumptionStep(self, type): + if type == 'video': + return HTTPVideoStep(self.wizard) + elif type == 'audio': + return HTTPAudioStep(self.wizard) + elif type == 'audio-video': + return HTTPBothStep(self.wizard) + else: + return HTTPGenericStep(self.wizard, type) diff -Nru flumotion-0.6.1/flumotion/component/consumers/__init__.py flumotion-0.9.1/flumotion/component/consumers/__init__.py --- flumotion-0.6.1/flumotion/component/consumers/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/consumers/Makefile.am flumotion-0.9.1/flumotion/component/consumers/Makefile.am --- flumotion-0.6.1/flumotion/component/consumers/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -11,7 +11,8 @@ SUBDIRS = \ disker \ - gdp \ + fgdp \ httpstreamer \ + pipeline \ preview \ shout2 diff -Nru flumotion-0.6.1/flumotion/component/consumers/Makefile.in flumotion-0.9.1/flumotion/component/consumers/Makefile.in --- flumotion-0.6.1/flumotion/component/consumers/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/Makefile.in 2011-09-11 08:09:19.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -141,6 +140,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -150,18 +150,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -209,6 +202,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -226,16 +220,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -243,7 +239,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -258,6 +253,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -290,7 +286,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -317,8 +312,9 @@ TAGS_FILES = $(component_PYTHON) SUBDIRS = \ disker \ - gdp \ + fgdp \ httpstreamer \ + pipeline \ preview \ shout2 @@ -407,7 +403,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -432,7 +428,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/flumotion/component/consumers/pipeline/__init__.py flumotion-0.9.1/flumotion/component/consumers/pipeline/__init__.py --- flumotion-0.6.1/flumotion/component/consumers/pipeline/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/pipeline/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev: 5969 $" diff -Nru flumotion-0.6.1/flumotion/component/consumers/pipeline/Makefile.am flumotion-0.9.1/flumotion/component/consumers/pipeline/Makefile.am --- flumotion-0.6.1/flumotion/component/consumers/pipeline/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/pipeline/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,10 @@ +include $(top_srcdir)/common/python.mk + +component_PYTHON = __init__.py pipeline.py +componentdir = $(libdir)/flumotion/python/flumotion/component/producers/pipeline +component_DATA = pipeline.xml + +clean-local: + rm -rf *.pyc *.pyo + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/consumers/pipeline/Makefile.in flumotion-0.9.1/flumotion/component/consumers/pipeline/Makefile.in --- flumotion-0.6.1/flumotion/component/consumers/pipeline/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/pipeline/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -0,0 +1,538 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/consumers/pipeline +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +component_PYTHON = __init__.py pipeline.py +componentdir = $(libdir)/flumotion/python/flumotion/component/producers/pipeline +component_DATA = pipeline.xml +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/consumers/pipeline/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/consumers/pipeline/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/consumers/pipeline/pipeline.py flumotion-0.9.1/flumotion/component/consumers/pipeline/pipeline.py --- flumotion-0.6.1/flumotion/component/consumers/pipeline/pipeline.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/pipeline/pipeline.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,28 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from flumotion.component import feedcomponent + +__all__ = ['Producer'] +__version__ = "$Rev: 7162 $" + + +class Producer(feedcomponent.ParseLaunchComponent): + logCategory = 'prod-pipe' + + def get_pipeline_string(self, properties): + return properties['pipeline'] diff -Nru flumotion-0.6.1/flumotion/component/consumers/pipeline/pipeline.xml flumotion-0.9.1/flumotion/component/consumers/pipeline/pipeline.xml --- flumotion-0.6.1/flumotion/component/consumers/pipeline/pipeline.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/pipeline/pipeline.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/preview/__init__.py flumotion-0.9.1/flumotion/component/consumers/preview/__init__.py --- flumotion-0.6.1/flumotion/component/consumers/preview/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/preview/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/consumers/preview/Makefile.in flumotion-0.9.1/flumotion/component/consumers/preview/Makefile.in --- flumotion-0.6.1/flumotion/component/consumers/preview/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/preview/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/consumers/preview/preview.py flumotion-0.9.1/flumotion/component/consumers/preview/preview.py --- flumotion-0.6.1/flumotion/component/consumers/preview/preview.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/preview/preview.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,29 +1,25 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component import feedcomponent from flumotion.common import log, pygobject __all__ = ['Preview'] -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class Preview(feedcomponent.ParseLaunchComponent): diff -Nru flumotion-0.6.1/flumotion/component/consumers/shout2/__init__.py flumotion-0.9.1/flumotion/component/consumers/shout2/__init__.py --- flumotion-0.6.1/flumotion/component/consumers/shout2/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/shout2/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,23 +1,19 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# -# flumotion/component/consumers/shout2/__init__.py -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005 Fluendo, S.L. (www.fluendo.com). All rights reserved. +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/consumers/shout2/Makefile.am flumotion-0.9.1/flumotion/component/consumers/shout2/Makefile.am --- flumotion-0.6.1/flumotion/component/consumers/shout2/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/shout2/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -2,10 +2,11 @@ component_PYTHON = \ __init__.py \ - shout2.py + shout2.py \ + wizard_gtk.py componentdir = $(libdir)/flumotion/python/flumotion/component/consumers/shout2 -component_DATA = shout2.xml +component_DATA = shout2.xml wizard.glade clean-local: rm -rf *.pyc *.pyo diff -Nru flumotion-0.6.1/flumotion/component/consumers/shout2/Makefile.in flumotion-0.9.1/flumotion/component/consumers/shout2/Makefile.in --- flumotion-0.6.1/flumotion/component/consumers/shout2/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/shout2/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -275,10 +270,11 @@ top_srcdir = @top_srcdir@ component_PYTHON = \ __init__.py \ - shout2.py + shout2.py \ + wizard_gtk.py componentdir = $(libdir)/flumotion/python/flumotion/component/consumers/shout2 -component_DATA = shout2.xml +component_DATA = shout2.xml wizard.glade # PYCHECKER_FILES = $(component_PYTHON) EXTRA_DIST = $(component_PYTHON) $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/consumers/shout2/shout2.py flumotion-0.9.1/flumotion/component/consumers/shout2/shout2.py --- flumotion-0.6.1/flumotion/component/consumers/shout2/shout2.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/shout2/shout2.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,24 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# -# flumotion/component/consumers/shout2/shout2.py: stream to icecast2 -# -# Flumotion - a streaming media server -# Copyright (C) 2005,2007 Fluendo, S.L. (www.fluendo.com). All rights reserved. +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + from flumotion.component import feedcomponent -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class Shout2Consumer(feedcomponent.ParseLaunchComponent): diff -Nru flumotion-0.6.1/flumotion/component/consumers/shout2/shout2.xml flumotion-0.9.1/flumotion/component/consumers/shout2/shout2.xml --- flumotion-0.6.1/flumotion/component/consumers/shout2/shout2.xml 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/shout2/shout2.xml 2011-09-11 08:09:04.000000000 +0000 @@ -6,10 +6,18 @@ + + + + + + @@ -44,6 +52,19 @@ + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/shout2/wizard.glade flumotion-0.9.1/flumotion/component/consumers/shout2/wizard.glade --- flumotion-0.6.1/flumotion/component/consumers/shout2/wizard.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/shout2/wizard.glade 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,386 @@ + + + + + + + window1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + False + + + + True + False + 0 + + + + True + 7 + 2 + False + 6 + 12 + + + + True + Server _Port: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + port + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + _Mount point: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + mount_point + + + 0 + 1 + 2 + 3 + fill + + + + + + + 100 + True + True + True + True + 0 + /demo.ogg + True + * + False + + + 1 + 2 + 2 + 3 + + + + + + + True + P_assword: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + password + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + True + True + False + 0 + hackme + True + * + False + + + 1 + 2 + 3 + 4 + + + + + + + True + Server _Hostname: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + ip + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + True + True + True + 0 + 127.0.0.1 + True + * + False + This is the IP address of the existing Icecast server which will receive the stream. + + + 1 + 2 + 0 + 1 + + + + + + + True + _Name: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + short_name + + + 0 + 1 + 4 + 5 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 4 + 5 + + + + + + + True + _Description: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + description + + + 0 + 1 + 5 + 6 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 5 + 6 + + + + + + + True + Associated _URL: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + url + + + 0 + 1 + 6 + 7 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + This is an informative URL which will be associated with the stream. For instance, it may be a descriptive HTML page. + + + 1 + 2 + 6 + 7 + + + + + + + True + 0 + 0.5 + 0 + 1 + 0 + 0 + 0 + 0 + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 8000 1024 65535 1 10 10 + This is the network port on which the existing Icecast server is listening for the stream. + + + + + 1 + 2 + 1 + 2 + fill + fill + + + + + 0 + False + False + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/consumers/shout2/wizard_gtk.py flumotion-0.9.1/flumotion/component/consumers/shout2/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/consumers/shout2/wizard_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/consumers/shout2/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,136 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gettext +import os +from zope.interface import implements + +from flumotion.admin.assistant.interfaces import IConsumerPlugin +from flumotion.admin.assistant.models import Consumer +from flumotion.admin.gtk.basesteps import ConsumerStep + +__version__ = "$Rev$" +_ = gettext.gettext + + +class Shout2Consumer(Consumer): + componentType = 'shout2-consumer' + prefix = 'shout2' + + def __init__(self): + super(Shout2Consumer, self).__init__() + self.properties.ip = '127.0.0.1' + self.properties.mount_point = '/' + self.properties.description = '' + self.properties.short_name = '' + self.properties.url = 'http://localhost/' + self.properties.password = '' + + +class Shout2Step(ConsumerStep): + gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'wizard.glade') + + def __init__(self, wizard): + self.model = Shout2Consumer() + ConsumerStep.__init__(self, wizard) + + # ConsumerStep + + def getConsumerModel(self): + return self.model + + # WizardStep + + def setup(self): + self.ip.data_type = str + self.port.data_type = int + self.mount_point.data_type = str + self.password.data_type = str + self.short_name.data_type = str + self.description.data_type = str + self.url.data_type = str + + self.add_proxy(self.model.properties, + ['ip', + 'port', + 'mount_point', + 'short_name', + 'password', + 'description', + 'url']) + + def workerChanged(self, worker): + self.model.worker = worker + self.wizard.checkElements(worker, 'shout2send') + + +class Shout2BothStep(Shout2Step): + name = 'Icecast streamer (audio & video)' + title = _('Icecast Streamer (Audio and Video)') + sidebarName = _('Icecast audio/video') + docSection = 'help-configuration-assistant-icecast-streaming-both' + docAnchor = '' + docVersion = 'local' + + # ConsumerStep + + def getConsumerType(self): + return 'audio-video' + + +class Shout2AudioStep(Shout2Step): + name = 'Icecast streamer (audio only)' + title = _('Icecast Streamer (Audio Only)') + sidebarName = _('Icecast Audio') + docSection = 'help-configuration-assistant-icecast-streaming-audio-only' + docAnchor = '' + docVersion = 'local' + + # ConsumerStep + + def getConsumerType(self): + return 'audio' + + +class Shout2VideoStep(Shout2Step): + name = 'Icecast streamer (video only)' + title = _('Icecast Streamer (Video Only)') + sidebarName = _('Icecast Video') + docSection = 'help-configuration-assistant-icecast-streaming-video-only' + docAnchor = '' + docVersion = 'local' + + # ConsumerStep + + def getConsumerType(self): + return 'video' + + +class Shout2ConsumerWizardPlugin(object): + implements(IConsumerPlugin) + + def __init__(self, wizard): + self.wizard = wizard + + def getConsumptionStep(self, type): + if type == 'video': + return Shout2VideoStep(self.wizard) + elif type == 'audio': + return Shout2AudioStep(self.wizard) + elif type == 'audio-video': + return Shout2BothStep(self.wizard) diff -Nru flumotion-0.6.1/flumotion/component/converters/__init__.py flumotion-0.9.1/flumotion/component/converters/__init__.py --- flumotion-0.6.1/flumotion/component/converters/__init__.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/converters/Makefile.am flumotion-0.9.1/flumotion/component/converters/Makefile.am --- flumotion-0.6.1/flumotion/component/converters/Makefile.am 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -9,6 +9,8 @@ clean-local: rm -rf *.pyc *.pyo -SUBDIRS = \ +SUBDIRS = \ overlay \ - pipeline + pipeline\ + video + diff -Nru flumotion-0.6.1/flumotion/component/converters/Makefile.in flumotion-0.9.1/flumotion/component/converters/Makefile.in --- flumotion-0.6.1/flumotion/component/converters/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -141,6 +140,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -150,18 +150,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -209,6 +202,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -226,16 +220,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -243,7 +239,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -258,6 +253,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -290,7 +286,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -317,7 +312,8 @@ TAGS_FILES = $(component_PYTHON) SUBDIRS = \ overlay \ - pipeline + pipeline\ + video all: all-recursive @@ -404,7 +400,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -429,7 +425,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/flumotion/component/converters/overlay/cc.24x24.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/flumotion/component/converters/overlay/cc.24x24.png differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/flumotion/component/converters/overlay/cc.36x36.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/flumotion/component/converters/overlay/cc.36x36.png differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/flumotion/component/converters/overlay/fluendo.24x24.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/flumotion/component/converters/overlay/fluendo.24x24.png differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/flumotion/component/converters/overlay/fluendo.36x36.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/flumotion/component/converters/overlay/fluendo.36x36.png differ diff -Nru flumotion-0.6.1/flumotion/component/converters/overlay/genimg.py flumotion-0.9.1/flumotion/component/converters/overlay/genimg.py --- flumotion-0.6.1/flumotion/component/converters/overlay/genimg.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/overlay/genimg.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,38 +1,38 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os - -__version__ = "$Rev: 7875 $" -directory = os.path.split(os.path.abspath(__file__))[0] -fontpath = os.path.join(directory, 'Vera.ttf') -logopath = directory +import cairo +import pango +import pangocairo + +from flumotion.configure import configure + +__version__ = "$Rev$" +FONT = 'sans' +FONT_PROPS = 'normal 22' TEXT_XOFFSET = 6 TEXT_YOFFSET = 6 -WIDTH = 36 BORDER = 4 -FONT_SIZE = 22 +FONT_SIZE = 22528 def generateOverlay(text, + font, showFlumotion, showCC, showXiph, @@ -41,6 +41,8 @@ of it suitable for mixing into a video stream @param text: text to put in the top left corner @type text: str + @param font: font description used to render the text + @type: str @param showFlumotion: if we should show the flumotion logo @type showFlumotion: bool @param showCC: if we should show the Creative Common logo @@ -54,47 +56,69 @@ @returns: raw image and if images or if text overflowed @rtype: 3 sized tuple of string and 2 booleans """ - from PIL import Image - from PIL import ImageDraw - from PIL import ImageFont + from cairo import ImageSurface + from cairo import Context - image = Image.new("RGBA", (width, height)) - draw = ImageDraw.Draw(image) # inheriting color mode + image = ImageSurface(cairo.FORMAT_ARGB32, width, height) + context = Context(image) subImages = [] if showXiph: - subImages.append(os.path.join(logopath, 'xiph.36x36.png')) + subImages.append(os.path.join(configure.imagedir, '36x36', 'xiph.png')) if showCC: - subImages.append(os.path.join(logopath, 'cc.36x36.png')) + subImages.append(os.path.join(configure.imagedir, '36x36', 'cc.png')) if showFlumotion: - subImages.append(os.path.join(logopath, 'fluendo.36x36.png')) + subImages.append(os.path.join(configure.imagedir, '36x36', + 'fluendo.png')) imagesOverflowed = False offsetX = BORDER for subPath in subImages: - sub = Image.open(subPath) - subX, subY = sub.size + sub = ImageSurface.create_from_png(subPath) + subX = sub.get_width() + subY = sub.get_height() offsetY = height - subY - BORDER - image.paste(sub, (offsetX, offsetY), sub) + context.set_source_surface(sub, offsetX, offsetY) + context.paint() if (offsetX + subX) > width: imagesOverflowed = True offsetX += subX + BORDER textOverflowed = False if text: - font = ImageFont.truetype(fontpath, FONT_SIZE) - draw.text((TEXT_XOFFSET+2, TEXT_YOFFSET+2), - text, font=font, fill='black') - draw.text((TEXT_XOFFSET, TEXT_YOFFSET), - text, font=font) - textWidth = draw.textsize(text, font=font)[0] + TEXT_XOFFSET + pcContext = pangocairo.CairoContext(context) + pangoLayout = pcContext.create_layout() + if font is not None: + font = pango.FontDescription(font) + if not font.get_family() or \ + not font.get_family().lower() in [family.get_name().lower() + for family in pangoLayout.get_context().list_families()]: + font.set_family(FONT) + if font.get_size() == 0: + font.set_size(FONT_SIZE) + else: + font = pango.FontDescription('%s %s' % (FONT, FONT_PROPS)) + pangoLayout.set_font_description(font) + + context.move_to(TEXT_XOFFSET+2, TEXT_YOFFSET+2) + pangoLayout.set_markup('%s' % text) + pcContext.show_layout(pangoLayout) + context.move_to(TEXT_XOFFSET, TEXT_YOFFSET) + pangoLayout.set_markup('%s' % text) + pcContext.show_layout(pangoLayout) + + textWidth, textHeight = pangoLayout.get_pixel_size() if textWidth > width: textOverflowed = True - buf = image.tostring() + if cairo.version < '1.2.6': + buf = image.get_data_as_rgba() + else: + buf = image.get_data() return buf, imagesOverflowed, textOverflowed if __name__ == '__main__': - print generateOverlay('Testing', True, True, True, 128, 196)[0] + print generateOverlay('Testing', 'sans normal 22', + True, True, True, 128, 196)[0] diff -Nru flumotion-0.6.1/flumotion/component/converters/overlay/__init__.py flumotion-0.9.1/flumotion/component/converters/overlay/__init__.py --- flumotion-0.6.1/flumotion/component/converters/overlay/__init__.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/overlay/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/converters/overlay/Makefile.am flumotion-0.9.1/flumotion/component/converters/overlay/Makefile.am --- flumotion-0.6.1/flumotion/component/converters/overlay/Makefile.am 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/overlay/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -3,14 +3,7 @@ component_PYTHON = __init__.py genimg.py overlay.py componentdir = $(libdir)/flumotion/python/flumotion/component/converters/overlay component_DATA = \ - Vera.ttf \ - overlay.xml \ - cc.24x24.png \ - fluendo.24x24.png \ - xiph.24x24.png \ - cc.36x36.png \ - fluendo.36x36.png \ - xiph.36x36.png + overlay.xml clean-local: rm -rf *.pyc *.pyo diff -Nru flumotion-0.6.1/flumotion/component/converters/overlay/Makefile.in flumotion-0.9.1/flumotion/component/converters/overlay/Makefile.in --- flumotion-0.6.1/flumotion/component/converters/overlay/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/overlay/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -276,14 +271,7 @@ component_PYTHON = __init__.py genimg.py overlay.py componentdir = $(libdir)/flumotion/python/flumotion/component/converters/overlay component_DATA = \ - Vera.ttf \ - overlay.xml \ - cc.24x24.png \ - fluendo.24x24.png \ - xiph.24x24.png \ - cc.36x36.png \ - fluendo.36x36.png \ - xiph.36x36.png + overlay.xml EXTRA_DIST = $(component_DATA) all: all-am diff -Nru flumotion-0.6.1/flumotion/component/converters/overlay/overlay.py flumotion-0.9.1/flumotion/component/converters/overlay/overlay.py --- flumotion-0.6.1/flumotion/component/converters/overlay/overlay.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/overlay/overlay.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gobject @@ -27,7 +23,7 @@ from flumotion.component import feedcomponent from flumotion.component.converters.overlay import genimg -__version__ = "$Rev: 8117 $" +__version__ = "$Rev$" T_ = gettexter() # FIXME: This class only needed for gst-plugins-base < 0.10.22 @@ -44,6 +40,7 @@ gst.caps_new_any())) imgBuf = "" capsStr = "" + duration = 1.0/25 def __init__(self): gst.BaseSrc.__init__(self) @@ -55,7 +52,7 @@ padcaps = gst.caps_from_string(self.capsStr) gstBuf.set_caps(padcaps) gstBuf.timestamp = 0 - gstBuf.duration = pow(2, 63) -1 + gstBuf.duration = self.duration * gst.SECOND return gst.FLOW_OK, gstBuf @@ -63,27 +60,99 @@ checkTimestamp = True checkOffset = True _filename = None + CAPS_TEMPLATE = "video/x-raw-rgb,bpp=32,depth=32,width=%d,height=%d," \ + "red_mask=-16777216,green_mask=16711680,blue_mask=65280," \ + "alpha_mask=255,endianness=4321,framerate=0/1" def get_pipeline_string(self, properties): - # the order here is important; to have our eater be the reference - # stream for videomixer it needs to be specified last - source_element = "" + pipeline = ('@eater:default@ ! ffmpegcolorspace !' + 'video/x-raw-yuv,format=(fourcc)AYUV ! videomixer name=mix !' + '@feeder:default@') + return pipeline + + def _set_source_image(self, width, height): + imgBuf, imagesOverflowed, textOverflowed = \ + genimg.generateOverlay( + text=self.text, + font=self.font, + showFlumotion=self.showFlumotion, + showCC=self.showCC, + showXiph=self.showXiph, + width=width, height=height) + + if textOverflowed: + m = messages.Warning( + T_(N_("Overlayed text '%s' too wide for the video image."), + self.text), mid="text-too-wide") + self.addMessage(m) + + if imagesOverflowed: + m = messages.Warning( + T_(N_("Overlayed logotypes too wide for the video image.")), + mid="image-too-wide") + self.addMessage(m) + + if self.source.get_factory().get_name() == 'appsrc': + self.imgBuf = imgBuf + else: + self.source.imgBuf = imgBuf + + def _set_source_caps(self, width, height): + self.capsStr = self.CAPS_TEMPLATE % (width, height) + if self.source.get_factory().get_name() == 'appsrc': + self.source.set_property('caps', gst.Caps(self.capsStr)) + else: + self.source.capsStr = self.capsStr + + def _set_source_framerate(self, framerate): + self.duration = float(framerate.denom) / framerate.num + if self.source.get_factory().get_name() != 'appsrc': + self.source.duration = duration + + def _notify_caps_cb(self, pad, param): + caps = pad.get_negotiated_caps() + if caps is None: + return + struct = pad.get_negotiated_caps().get_structure(0) + height = struct['height'] + width = struct['width'] + framerate = struct['framerate'] + + self._set_source_image(width, height) + self._set_source_caps(width, height) + self._set_source_framerate(framerate) + + if not self.sourceBin.get_pad("src").is_linked(): + self.sourceBin.link_filtered(self.videomixer, + gst.Caps("video/x-raw-yuv, format=(fourcc)AYUV")) + self.sourceBin.set_locked_state(False) + self.sourceBin.set_state(gst.STATE_PLAYING) + + def _add_source_bin(self, pipeline): if gstreamer.element_factory_exists("appsrc") and \ gstreamer.get_plugin_version("app") >= (0, 10, 22, 0): - source_element = "appsrc name=source do-timestamp=true" + self.source = gst.element_factory_make('appsrc', 'source') + self.source.set_property('do-timestamp', True) + self.source.connect('need-data', self.push_buffer) else: #FIXME: fluoverlaysrc only needed on gst-plugins-base < 0.10.22 gobject.type_register(OverlayImageSource) - ret = gst.element_register(OverlayImageSource, "fluoverlaysrc", + gst.element_register(OverlayImageSource, "fluoverlaysrc", gst.RANK_MARGINAL) - source_element = "fluoverlaysrc name=source " - pipeline = ( - '%s ! alphacolor ! ' - 'videomixer name=mix ! @feeder:default@ ' - '@eater:default@ ! ffmpegcolorspace ! ' - 'video/x-raw-yuv,format=(fourcc)AYUV ! mix.' % source_element) - - return pipeline + self.source = gst.element_factory_make('fluoverlaysrc', 'source') + # create the source bin + self.sourceBin = gst.Bin() + # create the alphacolor element + alphacolor = gst.element_factory_make('alphacolor') + # add the elements to the source bin and link them + self.sourceBin.add_many(self.source, alphacolor) + self.source.link(alphacolor) + pipeline.add(self.sourceBin) + # create the source ghost pad + self.sourceBin.add_pad(gst.GhostPad('src', alphacolor.get_pad('src'))) + # set the locked state and wait until we get the first caps change + # and we know the widht and height of the input stream + self.sourceBin.set_locked_state(True) def configure_pipeline(self, pipeline, properties): p = properties @@ -93,45 +162,20 @@ ('cc_logo', 'cc-logo'), ('xiph_logo', 'xiph-logo')]) - text = None + if p.get('width', None) is not None: + self.warnDeprecatedProperties(['width']) + if p.get('height', None) is not None: + self.warnDeprecatedProperties(['height']) + + self.font=p.get('font', None) + self.showFlumotion=p.get('fluendo-logo', False) + self.showCC=p.get('cc-logo', False) + self.showXiph=p.get('xiph-logo', False) if p.get('show-text', False): - text = p.get('text', 'set the "text" property') - self.imgBuf, imagesOverflowed, textOverflowed = \ - genimg.generateOverlay( - text=text, - showFlumotion=p.get('fluendo-logo', False), - showCC=p.get('cc-logo', False), - showXiph=p.get('xiph-logo', False), - width=p['width'], - height=p['height']) - - if textOverflowed: - m = messages.Warning( - T_(N_("Overlayed text '%s' too wide for the video image."), - text), mid="text-too-wide") - self.addMessage(m) - - if imagesOverflowed: - m = messages.Warning( - T_(N_("Overlayed logotypes too wide for the video image.")), - mid="image-too-wide") - self.addMessage(m) - self.capsStr = "video/x-raw-rgb,bpp=32,depth=32,width=%d,height=%d," \ - "red_mask=-16777216,green_mask=16711680,blue_mask=65280," \ - "alpha_mask=255,framerate=0/1" % (p['width'], p['height']) - padcaps = gst.caps_from_string(self.capsStr) - source = self.get_element('source') - if source.get_factory().get_name() == 'appsrc': - # push buffer when we need to, currently we push a duration of - # G_MAXINT_64 so we never need to push another one - # but if we want dynamic change of overlay, we should make - # duration tunable in properties - source.connect('need-data', self.push_buffer) - source.props.caps = padcaps + self.text = p.get('text', 'set the "text" property') else: - # FIXME: fluoverlaysrc only needed on gst-plugins-base < 0.10.22 - source.imgBuf = self.imgBuf - source.capsStr = self.capsStr + self.text = None + vmixerVersion = gstreamer.get_plugin_version('videomixer') if vmixerVersion == (0, 10, 7, 0): m = messages.Warning( @@ -141,6 +185,16 @@ mid="videomixer-bug") self.addMessage(m) + self.videomixer = pipeline.get_by_name("mix") + # add a callback for caps change to configure the image source + # properly using the caps of the input stream + self.videomixer.get_pad('sink_0').connect('notify::caps', + self._notify_caps_cb) + # the source is added to the pipeline, but it's not linked yet, and + # remains with a locked state until we have enough info about the + # input stream + self._add_source_bin(pipeline) + def push_buffer(self, source, arg0): """ Pushes buffer to appsrc in GStreamer @@ -148,9 +202,9 @@ @param source: the appsrc element to push to @type source: GstElement """ - self.debug("Pushing buffer") + self.log("Pushing buffer") gstBuf = gst.Buffer(self.imgBuf) padcaps = gst.caps_from_string(self.capsStr) gstBuf.set_caps(padcaps) - gstBuf.duration = pow(2, 63) -1 + gstBuf.duration = int(self.duration * gst.SECOND) source.emit('push-buffer', gstBuf) diff -Nru flumotion-0.6.1/flumotion/component/converters/overlay/overlay.xml flumotion-0.9.1/flumotion/component/converters/overlay/overlay.xml --- flumotion-0.6.1/flumotion/component/converters/overlay/overlay.xml 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/overlay/overlay.xml 2011-09-11 08:09:04.000000000 +0000 @@ -15,6 +15,8 @@ _description="Whether to show text." /> + @@ -23,10 +25,10 @@ - - + + @@ -56,13 +58,6 @@ - - - - - - - Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/flumotion/component/converters/overlay/Vera.ttf and /tmp/Q6pMgKmMEz/flumotion-0.9.1/flumotion/component/converters/overlay/Vera.ttf differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/flumotion/component/converters/overlay/xiph.24x24.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/flumotion/component/converters/overlay/xiph.24x24.png differ Binary files /tmp/7vFydQj6o8/flumotion-0.6.1/flumotion/component/converters/overlay/xiph.36x36.png and /tmp/Q6pMgKmMEz/flumotion-0.9.1/flumotion/component/converters/overlay/xiph.36x36.png differ diff -Nru flumotion-0.6.1/flumotion/component/converters/pipeline/__init__.py flumotion-0.9.1/flumotion/component/converters/pipeline/__init__.py --- flumotion-0.6.1/flumotion/component/converters/pipeline/__init__.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/pipeline/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/converters/pipeline/Makefile.in flumotion-0.9.1/flumotion/component/converters/pipeline/Makefile.in --- flumotion-0.6.1/flumotion/component/converters/pipeline/Makefile.in 2009-09-09 11:37:54.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/pipeline/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/converters/pipeline/pipeline.py flumotion-0.9.1/flumotion/component/converters/pipeline/pipeline.py --- flumotion-0.6.1/flumotion/component/converters/pipeline/pipeline.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/pipeline/pipeline.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,24 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component import feedcomponent __all__ = ['Converter'] -__version__ = "$Rev: 6125 $" +__version__ = "$Rev$" class Converter(feedcomponent.ParseLaunchComponent): diff -Nru flumotion-0.6.1/flumotion/component/converters/video/__init__.py flumotion-0.9.1/flumotion/component/converters/video/__init__.py --- flumotion-0.6.1/flumotion/component/converters/video/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/video/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/converters/video/Makefile.am flumotion-0.9.1/flumotion/component/converters/video/Makefile.am --- flumotion-0.6.1/flumotion/component/converters/video/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/video/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,10 @@ +include $(top_srcdir)/common/python.mk + +component_PYTHON = __init__.py video.py +componentdir = $(libdir)/flumotion/python/flumotion/component/converters/video +component_DATA = video.xml + +clean-local: + rm -rf *.pyc *.pyo + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/converters/video/Makefile.in flumotion-0.9.1/flumotion/component/converters/video/Makefile.in --- flumotion-0.6.1/flumotion/component/converters/video/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/video/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -0,0 +1,538 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/converters/video +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +component_PYTHON = __init__.py video.py +componentdir = $(libdir)/flumotion/python/flumotion/component/converters/video +component_DATA = video.xml +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/converters/video/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/converters/video/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/converters/video/video.py flumotion-0.9.1/flumotion/component/converters/video/video.py --- flumotion-0.6.1/flumotion/component/converters/video/video.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/video/video.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,74 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gst + +from flumotion.common import errors, messages +from flumotion.common.i18n import N_, gettexter +from flumotion.component import feedcomponent +from flumotion.component.effects.videoscale import videoscale +from flumotion.component.effects.deinterlace import deinterlace + +__all__ = ['Converter'] +__version__ = "$Rev$" +T_ = gettexter() + + +class Converter(feedcomponent.ParseLaunchComponent): + logCategory = 'videoconvert' + + def check_properties(self, props, addMessage): + props = self.config['properties'] + deintMode = props.get('deinterlace-mode', 'auto') + deintMethod = props.get('deinterlace-method', 'ffmpeg') + + if deintMode not in deinterlace.DEINTERLACE_MODE: + msg = "'%s' is not a valid deinterlace mode." % deintMode + raise errors.ConfigError(msg) + if deintMethod not in deinterlace.DEINTERLACE_METHOD: + msg = "'%s' is not a valid deinterlace method." % deintMethod + raise errors.ConfigError(msg) + + def get_pipeline_string(self, properties): + return 'identity silent=true name=identity' + + def configure_pipeline(self, pipeline, properties): + self.deintMode = properties.get('deinterlace-mode', "auto") + self.deintMethod = properties.get('deinterlace-method', "ffmpeg") + self.width = properties.get('width', None) + self.height = properties.get('height', None) + self.widthCorrection = properties.get('width-correction', 8) + self.heightCorrection = properties.get('height-correction', 0) + self.is_square = properties.get('is-square', False) + + identity = pipeline.get_by_name("identity") + # FIXME: The deinterlace effect uses a videorate which we don't want in + # the middle of a flow. + # Add deinterlace effect. Deinterlacing must always be done + # before scaling. + #deinterlacer = deinterlace.Deinterlace('deinterlace', + # identity.get_pad("src"), + # pipeline, self.deintMode, self.deintMethod) + #self.addEffect(deinterlacer) + #deinterlacer.plug() + # Add videoscale effect + videoscaler = videoscale.Videoscale('videoscale', self, + identity.get_pad("src"), pipeline, + self.width, self.height, self.is_square, False, + self.widthCorrection, self.heightCorrection) + self.addEffect(videoscaler) + videoscaler.plug() diff -Nru flumotion-0.6.1/flumotion/component/converters/video/video.xml flumotion-0.9.1/flumotion/component/converters/video/video.xml --- flumotion-0.6.1/flumotion/component/converters/video/video.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/converters/video/video.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/decodercomponent.py flumotion-0.9.1/flumotion/component/decodercomponent.py --- flumotion-0.6.1/flumotion/component/decodercomponent.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/decodercomponent.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,147 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +""" +Decoder component, participating in the stream +""" + +import gst +import gst.interfaces + +from flumotion.common.i18n import N_, gettexter +from flumotion.common import errors, messages, gstreamer +from flumotion.component.effects.audioconvert import audioconvert +from flumotion.component.effects.videorate import videorate +from flumotion.component.effects.videoscale import videoscale +from flumotion.component import feedcomponent as fc + +__version__ = "$Rev$" +T_ = gettexter() + + +class DecoderComponent(fc.ReconfigurableComponent): + + disconnectedPads = True + keepStreamheaderForLater = True + swallowNewSegment = False + + _feeders_info = [] + + def configure_pipeline(self, pipeline, properties): + # Handle decoder dynamic pads + eater = self.eaters.values()[0] + depay = self.get_element(eater.depayName) + depay.get_pad("src").add_event_probe(self._depay_reset_event, eater) + + decoder = self.pipeline.get_by_name("decoder") + decoder.connect('new-decoded-pad', self._new_decoded_pad_cb) + + self._add_video_effects() + self._add_audio_effects() + + def get_output_elements(self): + return [self.get_element(i.name + '-output') + for i in self._feeders_info.values()] + + def _depay_reset_event(self, pad, event, eater): + if event.type != gst.EVENT_CUSTOM_DOWNSTREAM: + return True + if not gstreamer.event_is_flumotion_reset(event): + return True + self.info("Received flumotion-reset, not droping buffers anymore") + + self.dropStreamHeaders = False + if self.disconnectedPads: + return False + return True + + def _add_video_effects(self): + # Add the effects to the component but don't plug them until we have a + # valid video pad + props = self.config['properties'] + is_square = props.get('is-square', False) + add_borders = props.get('add-borders', False) + width = props.get('width', None) + height = props.get('height', None) + fr = props.get('framerate', (25, 2)) + framerate = gst.Fraction(fr[0], fr[1]) + + self.vr = videorate.Videorate('videorate', None, + self.pipeline, framerate) + self.addEffect(self.vr) + #self.vr.effectBin.set_state(gst.STATE_PLAYING) + self.debug("Videorate added") + + self.videoscaler = videoscale.Videoscale('videoscale', self, + None, self.pipeline, + width, height, is_square, add_borders) + self.addEffect(self.videoscaler) + #self.videoscaler.effectBin.set_state(gst.STATE_PLAYING) + self.debug("Videoscaler added") + + def _add_audio_effects(self): + # Add the effects to the component but don't plug them until we have a + # valid video pad + props = self.config['properties'] + samplerate = props.get('samplerate', 44100) + channels = props.get('channels', 2) + + self.ar = audioconvert.Audioconvert('audioconvert', None, + self.pipeline, channels=channels, + samplerate=samplerate) + self.addEffect(self.ar) + + def _new_decoded_pad_cb(self, decoder, pad, last): + self.log("Decoder %s got new decoded pad %s", decoder, pad) + + self.dropStreamHeaders = True + new_caps = pad.get_caps() + + # Select a compatible output element + for outelem in self.get_output_elements(): + output_pad = outelem.get_pad('sink') + if output_pad.is_linked(): + continue + + pad_caps = output_pad.get_caps() + if not new_caps.is_subset(pad_caps): + continue + + self.log("Linking decoded pad %s with caps %s to feeder %s", + pad, new_caps.to_string(), outelem.get_name()) + pad.link(output_pad) + self.disconnectedPads = False + + # Plug effects + if 'video' in pad_caps.to_string(): + self._plug_video_effects(pad) + if 'audio' in pad_caps.to_string(): + self._plug_audio_effects(pad) + return + + self.info("No feeder found for decoded pad %s with caps %s", + pad, new_caps.to_string()) + + def _plug_video_effects(self, pad): + self.vr.sourcePad = pad + self.vr.plug() + self.videoscaler.sourcePad = self.vr.effectBin.get_pad("src") + self.videoscaler.plug() + + def _plug_audio_effects(self, pad): + self.ar.sourcePad = pad + self.ar.plug() diff -Nru flumotion-0.6.1/flumotion/component/decoders/decoders.xml flumotion-0.9.1/flumotion/component/decoders/decoders.xml --- flumotion-0.6.1/flumotion/component/decoders/decoders.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/decoders/decoders.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/decoders/generic/generic.py flumotion-0.9.1/flumotion/component/decoders/generic/generic.py --- flumotion-0.6.1/flumotion/component/decoders/generic/generic.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/decoders/generic/generic.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,291 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gst +import gobject +import threading + +from flumotion.component import decodercomponent as dc +from flumotion.common import messages, gstreamer +from flumotion.common.i18n import N_, gettexter + +T_ = gettexter() + +__version__ = "$Rev: 7162 $" + +BASIC_AUDIO_CAPS = "audio/x-raw-int;audio/x-raw-float" +BASIC_VIDEO_CAPS = "video/x-raw-yuv;video/x-raw-rgb" + +# FIXME: The GstAutoplugSelectResult enum has no bindings in gst-python. +# Replace this when the enum is exposed in the bindings. + +GST_AUTOPLUG_SELECT_TRY = 0 +GST_AUTOPLUG_SELECT_SKIP = 2 + + +class FeederInfo(object): + + def __init__(self, name, caps, linked=False): + self.name = name + self.caps = caps + + +class SyncKeeper(gst.Element): + __gstdetails__ = ('SyncKeeper', 'Generic', + 'Retimestamp the output to be contiguous and maintain ' + 'the sync', 'Xavier Queralt') + _audiosink = gst.PadTemplate("audio-in", + gst.PAD_SINK, + gst.PAD_ALWAYS, + gst.caps_from_string(BASIC_AUDIO_CAPS)) + _videosink = gst.PadTemplate("video-in", + gst.PAD_SINK, + gst.PAD_ALWAYS, + gst.caps_from_string(BASIC_VIDEO_CAPS)) + _audiosrc = gst.PadTemplate("audio-out", + gst.PAD_SRC, + gst.PAD_ALWAYS, + gst.caps_from_string(BASIC_AUDIO_CAPS)) + _videosrc = gst.PadTemplate("video-out", + gst.PAD_SRC, + gst.PAD_ALWAYS, + gst.caps_from_string(BASIC_VIDEO_CAPS)) + + def __init__(self): + gst.Element.__init__(self) + + # create source pads + self.audiosrc = gst.Pad(self._audiosrc, "audio-out") + self.add_pad(self.audiosrc) + self.videosrc = gst.Pad(self._videosrc, "video-out") + self.add_pad(self.videosrc) + + # create the sink pads and set the chain and event function + self.audiosink = gst.Pad(self._audiosink, "audio-in") + self.audiosink.set_chain_function(lambda pad, buffer: + self.chainfunc(pad, buffer, self.audiosrc)) + self.audiosink.set_event_function(lambda pad, buffer: + self.eventfunc(pad, buffer, self.audiosrc)) + self.add_pad(self.audiosink) + self.videosink = gst.Pad(self._videosink, "video-in") + self.videosink.set_chain_function(lambda pad, buffer: + self.chainfunc(pad, buffer, self.videosrc)) + self.videosink.set_event_function(lambda pad, buffer: + self.eventfunc(pad, buffer, self.videosrc)) + self.add_pad(self.videosink) + + # all this variables need to be protected with a lock!!! + self._lock = threading.Lock() + self._totalTime = 0L + self._syncTimestamp = 0L + self._syncOffset = 0L + self._resetReceived = True + self._sendNewSegment = True + + def _send_new_segment(self): + for pad in [self.videosrc, self.audiosrc]: + pad.push_event( + gst.event_new_new_segment(True, 1.0, gst.FORMAT_TIME, + self._syncTimestamp, -1, 0)) + self._sendNewSegment = False + + def _update_sync_point(self, start, position): + # Only update the sync point if we haven't received any buffer + # (totalTime == 0) or we received a reset + if not self._totalTime and not self._resetReceived: + return + self._syncTimestamp = self._totalTime + if position >= start: + self._syncOffset = start + (position - start) + else: + self._syncOffset = start + self._resetReceived = False + self.info("Update sync point to % r, offset to %r" % + (gst.TIME_ARGS(self._syncTimestamp), + (gst.TIME_ARGS(self._syncOffset)))) + + def chainfunc(self, pad, buf, srcpad): + self.log("Input %s timestamp: %s, %s" % + (srcpad is self.audiosrc and 'audio' or 'video', + gst.TIME_ARGS(buf.timestamp), + gst.TIME_ARGS(buf.duration))) + + if not self._sendNewSegment: + self._send_new_segment() + + try: + self._lock.acquire() + # Discard buffers outside the configured segment + if buf.timestamp < self._syncOffset: + self.warning("Could not clip buffer to segment") + return gst.FLOW_OK + # Get the input stream time of the buffer + buf.timestamp -= self._syncOffset + # Set the accumulated stream time + buf.timestamp += self._syncTimestamp + duration = 0 + if buf.duration != gst.CLOCK_TIME_NONE: + duration = buf.duration + self._totalTime = max(buf.timestamp + duration, self._totalTime) + + self.log("Output %s timestamp: %s, %s" % + (srcpad is self.audiosrc and 'audio' or 'video', + gst.TIME_ARGS(buf.timestamp), + gst.TIME_ARGS(buf.duration))) + finally: + self._lock.release() + + srcpad.push(buf) + return gst.FLOW_OK + + def eventfunc(self, pad, event, srcpad): + self.debug("Received event %r from %s" % (event, event.src)) + try: + self._lock.acquire() + if event.type == gst.EVENT_NEWSEGMENT: + u, r, f, start, s, position = event.parse_new_segment() + self._update_sync_point(start, position) + if gstreamer.event_is_flumotion_reset(event): + self._resetReceived = True + self._send_new_segment = True + finally: + self._lock.release() + + # forward all the events except the new segment events + if event.type != gst.EVENT_NEWSEGMENT: + return srcpad.push_event(event) + return True + +gobject.type_register(SyncKeeper) +gst.element_register(SyncKeeper, "synckeeper", gst.RANK_MARGINAL) + + +class GenericDecoder(dc.DecoderComponent): + """ + Generic decoder component using decodebin2. + + It listen to the custom gstreamer event flumotion-reset, + and reset the decoding pipeline by removing the old one + and creating a new one. + + Sub-classes must override _get_feeders_info() and return + a list of FeederInfo instances that describe the decoder + output. + + When reset, if the new decoded pads do not match the + previously negotiated caps, feeder will not be connected, + and the decoder will go sad. + """ + + logCategory = "gen-decoder" + feeder_tmpl = ("identity name=%(ename)s single-segment=true " + "silent=true ! %(caps)s ! @feeder:%(pad)s@") + + ### Public Methods ### + + def init(self): + self._feeders_info = None # {FEEDER_NAME: FeederInfo} + + def get_pipeline_string(self, properties): + # Retrieve feeder info and build a dict out of it + finfo = self._get_feeders_info() + assert finfo, "No feeder info specified" + self._feeders_info = dict([(i.name, i) for i in finfo]) + + pipeline_parts = [self._get_base_pipeline_string()] + + for i in self._feeders_info.values(): + ename = self._get_output_element_name(i.name) + pipeline_parts.append( + self.feeder_tmpl % dict(ename=ename, caps=i.caps, pad=i.name)) + + pipeline_str = " ".join(pipeline_parts) + self.log("Decoder pipeline: %s", pipeline_str) + + self._blacklist = properties.get('blacklist', []) + + return pipeline_str + + def configure_pipeline(self, pipeline, properties): + dc.DecoderComponent.configure_pipeline(self, pipeline, + properties) + + decoder = self.pipeline.get_by_name("decoder") + decoder.connect('autoplug-select', self._autoplug_select_cb) + + ### Protected Methods ## + + def _get_base_pipeline_string(self): + return 'decodebin2 name=decoder' + + def _get_feeders_info(self): + """ + Must be overridden to returns a tuple of FeederInfo. + """ + return None + + ### Private Methods ### + + def _get_output_element_name(self, feed_name): + return "%s-output" % feed_name + + ### Callbacks ### + + def _autoplug_select_cb(self, decoder, pad, caps, factory): + if factory.get_name() in self._blacklist: + self.log("Skipping element %s because it's in the blacklist", + factory.get_name()) + return GST_AUTOPLUG_SELECT_SKIP + return GST_AUTOPLUG_SELECT_TRY + + +class SingleGenericDecoder(GenericDecoder): + + logCategory = "sgen-decoder" + + _caps_lookup = {'audio': BASIC_AUDIO_CAPS, + 'video': BASIC_VIDEO_CAPS} + + def init(self): + self._media_type = None + + def check_properties(self, properties, addMessage): + media_type = properties.get("media-type") + if media_type not in ["audio", "video"]: + msg = 'Property media-type can only be "audio" or "video"' + m = messages.Error(T_(N_(msg)), mid="error-decoder-media-type") + addMessage(m) + else: + self._media_type = media_type + + def _get_feeders_info(self): + caps = self._caps_lookup[self._media_type] + return FeederInfo('default', caps), + + +class AVGenericDecoder(GenericDecoder): + + logCategory = "avgen-decoder" + feeder_tmpl = ("identity name=%(ename)s silent=true ! %(caps)s ! " + "sync.%(pad)s-in sync.%(pad)s-out ! @feeder:%(pad)s@") + + def _get_feeders_info(self): + return (FeederInfo('audio', BASIC_AUDIO_CAPS), + FeederInfo('video', BASIC_VIDEO_CAPS)) + + def _get_base_pipeline_string(self): + return 'decodebin2 name=decoder synckeeper name=sync' diff -Nru flumotion-0.6.1/flumotion/component/decoders/generic/generic.xml flumotion-0.9.1/flumotion/component/decoders/generic/generic.xml --- flumotion-0.6.1/flumotion/component/decoders/generic/generic.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/decoders/generic/generic.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/decoders/generic/__init__.py flumotion-0.9.1/flumotion/component/decoders/generic/__init__.py --- flumotion-0.6.1/flumotion/component/decoders/generic/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/decoders/generic/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,16 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. diff -Nru flumotion-0.6.1/flumotion/component/decoders/generic/Makefile.am flumotion-0.9.1/flumotion/component/decoders/generic/Makefile.am --- flumotion-0.6.1/flumotion/component/decoders/generic/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/decoders/generic/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,14 @@ +include $(top_srcdir)/common/python.mk + +component_PYTHON = \ + __init__.py \ + generic.py + +componentdir = $(libdir)/flumotion/python/flumotion/component/decoders/generic +component_DATA = \ + generic.xml + +clean-local: + rm -rf *.pyc *.pyo + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/decoders/generic/Makefile.in flumotion-0.9.1/flumotion/component/decoders/generic/Makefile.in --- flumotion-0.6.1/flumotion/component/decoders/generic/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/decoders/generic/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -0,0 +1,543 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/decoders/generic +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +component_PYTHON = \ + __init__.py \ + generic.py + +componentdir = $(libdir)/flumotion/python/flumotion/component/decoders/generic +component_DATA = \ + generic.xml + +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/decoders/generic/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/decoders/generic/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/decoders/__init__.py flumotion-0.9.1/flumotion/component/decoders/__init__.py --- flumotion-0.6.1/flumotion/component/decoders/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/decoders/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,16 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. diff -Nru flumotion-0.6.1/flumotion/component/decoders/Makefile.am flumotion-0.9.1/flumotion/component/decoders/Makefile.am --- flumotion-0.6.1/flumotion/component/decoders/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/decoders/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,16 @@ +include $(top_srcdir)/common/python.mk + +decodersdir = $(libdir)/flumotion/python/flumotion/component/decoders +decoders_PYTHON = \ + __init__.py +decoders_DATA = decoders.xml + +TAGS_FILES = $(decoders_PYTHON) + +clean-local: + rm -rf *.pyc *.pyo + +SUBDIRS = \ + generic + +EXTRA_DIST = $(decoders_DATA) diff -Nru flumotion-0.6.1/flumotion/component/decoders/Makefile.in flumotion-0.9.1/flumotion/component/decoders/Makefile.in --- flumotion-0.6.1/flumotion/component/decoders/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/decoders/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -0,0 +1,746 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(decoders_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/decoders +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(decodersdir)" \ + "$(DESTDIR)$(decodersdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(decoders_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +decodersdir = $(libdir)/flumotion/python/flumotion/component/decoders +decoders_PYTHON = \ + __init__.py + +decoders_DATA = decoders.xml +TAGS_FILES = $(decoders_PYTHON) +SUBDIRS = \ + generic + +EXTRA_DIST = $(decoders_DATA) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/decoders/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/decoders/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-decodersPYTHON: $(decoders_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(decodersdir)" || $(MKDIR_P) "$(DESTDIR)$(decodersdir)" + @list='$(decoders_PYTHON)'; dlist=; list2=; test -n "$(decodersdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(decodersdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(decodersdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(decodersdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(decodersdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-decodersPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(decoders_PYTHON)'; test -n "$(decodersdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(decodersdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(decodersdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(decodersdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(decodersdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(decodersdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(decodersdir)" && rm -f $$fileso +install-decodersDATA: $(decoders_DATA) + @$(NORMAL_INSTALL) + test -z "$(decodersdir)" || $(MKDIR_P) "$(DESTDIR)$(decodersdir)" + @list='$(decoders_DATA)'; test -n "$(decodersdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(decodersdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(decodersdir)" || exit $$?; \ + done + +uninstall-decodersDATA: + @$(NORMAL_UNINSTALL) + @list='$(decoders_DATA)'; test -n "$(decodersdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(decodersdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(decodersdir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(decodersdir)" "$(DESTDIR)$(decodersdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-decodersDATA install-decodersPYTHON + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-decodersDATA uninstall-decodersPYTHON + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-local ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-decodersDATA install-decodersPYTHON \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-decodersDATA \ + uninstall-decodersPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/eater.py flumotion-0.9.1/flumotion/component/eater.py --- flumotion-0.6.1/flumotion/component/eater.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/eater.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,37 +1,60 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. +# This module should not import or depend on gst +# All timestamps should be in float seconds + import time from twisted.internet import reactor from flumotion.common import componentui -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class Eater: """ This class groups eater-related information as used by a Feed Component. + The UI state contains the following keys: + - eater-alias: str + - eater-name: str + - connection: dict of + - feed-id + - time-timestamp-discont + - timestamp-timestamp-discont + - last-timestamp-discont + - total-timestamp-discont + - count-timestamp-discont + - time-offset-discont + - offset-offset-discont + - last-offset-discont + - total-offset-discont + - count-offset-discont + - last-connect + - last-disconnect + - total-connections + - count-timestamp-discont + - count-offset-discont + - total-timestamp-discont + - total-offset-discont + - fd + @ivar eaterAlias: the alias of this eater (e.g. "default", "video", ...) @ivar feedId: id of the feed this is eating from @@ -45,6 +68,9 @@ self.fd = None self.elementName = 'eater:' + eaterAlias self.depayName = self.elementName + '-depay' + # for use to detect duplicate streamheader buffers + self.streamheaderBufferProbeHandler = None + self.streamheader = [] self.setPadMonitor(None) self.uiState = componentui.WorkerComponentUIState() self.uiState.addKey('eater-alias') diff -Nru flumotion-0.6.1/flumotion/component/effects/audioconvert/audioconvert.py flumotion-0.9.1/flumotion/component/effects/audioconvert/audioconvert.py --- flumotion-0.6.1/flumotion/component/effects/audioconvert/audioconvert.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioconvert/audioconvert.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,182 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import sys + +import gobject +import gst + +from flumotion.common.i18n import gettexter +from flumotion.component import feedcomponent +from flumotion.common import gstreamer + +__version__ = "$Rev$" +T_ = gettexter() + +DEFAULT_TOLERANCE = 20000000 # 20ms + + +class AudioconvertBin(gst.Bin): + """ + I am a GStreamer bin that can convert an an audio stream, changing its + samplerate and the number of channels + """ + logCategory = "audiorate" + RATE_CAPS = ', rate=%d' + CHANNELS_CAPS = ', channels=%d' + CAPS_TEMPLATE = ("audio/x-raw-int %(extra_caps)s ;" + "audio/x-raw-float %(extra_caps)s") + + __gproperties__ = { + 'channels': (gobject.TYPE_UINT, 'channels', + 'Audio channels', 1, 8, 2, + gobject.PARAM_READWRITE), + 'samplerate': (gobject.TYPE_UINT, 'samplerate', + 'Audio samplerate', 1, 200000, 44100, + gobject.PARAM_READWRITE), + 'tolerance': (gobject.TYPE_UINT, 'tolerance', + 'Correct imperfect timestamps when it exeeds the ' + 'tolerance', 0, sys.maxint, DEFAULT_TOLERANCE, + gobject.PARAM_READWRITE)} + + def __init__(self, channels=None, samplerate=None, + tolerance=DEFAULT_TOLERANCE): + gst.Bin.__init__(self) + self._samplerate = samplerate + self._samplerate_caps = '' + self._channels = channels + self._channels_caps = '' + + self._audiorate = gst.element_factory_make("audiorate") + self._audioconv = gst.element_factory_make("audioconvert") + + resampler = 'audioresample' + if gstreamer.element_factory_exists('legacyresample'): + resampler = 'legacyresample' + self._audioresample = gst.element_factory_make(resampler) + + self._capsfilter = gst.element_factory_make("capsfilter") + self._identity = gst.parse_launch("identity silent=true") + self.add(self._audiorate) + self.add(self._audioconv) + self.add(self._audioresample) + self.add(self._capsfilter) + self.add(self._identity) + + self._audiorate.link(self._audioconv) + self._audioconv.link(self._audioresample) + self._audioresample.link(self._capsfilter) + self._capsfilter.link(self._identity) + + # Create source and sink pads + self._sinkPad = gst.GhostPad('sink', self._audiorate.get_pad('sink')) + self._srcPad = gst.GhostPad('src', self._identity.get_pad('src')) + self.add_pad(self._sinkPad) + self.add_pad(self._srcPad) + + self._setSamplerate(samplerate) + self._setChannels(channels) + self._setTolerance(tolerance) + + def _getCapsString(self): + extra_caps = ' '.join([self._samplerate_caps, self._channels_caps]) + return self.CAPS_TEMPLATE % dict(extra_caps=extra_caps) + + def _setChannels(self, channels): + self._channels = channels + self._channels_caps = '' + if self._channels is not None: + self._channels_caps = self.CHANNELS_CAPS % channels + self._capsfilter.set_property('caps', gst.Caps(self._getCapsString())) + + def _setSamplerate(self, samplerate): + self._samplerate = samplerate + self._samplerate_caps = '' + if self._samplerate is not None: + self._samplerate_caps = self.RATE_CAPS % samplerate + self._capsfilter.set_property('caps', gst.Caps(self._getCapsString())) + + def _setTolerance(self, tolerance): + self._tolerance = tolerance + if gstreamer.element_has_property(self._audiorate, 'tolerance'): + self._audiorate.set_property('tolerance', self._tolerance) + else: + self.warning("The 'tolerance' property could not be set in the " + "audiorate element.") + + def do_set_property(self, property, value): + if property.name == 'channels': + self._setChannels(value) + if property.name == 'samplerate': + self._setSamplerate(value) + if property.name == 'tolerance': + self._setTolerance(value) + else: + raise AttributeError('unknown property %s' % property.name) + + def do_get_property(self, property): + if property.name == 'channels': + return self._channels + if property.name == 'samplerate': + return self._samplerate + if property.name == 'tolerance': + return self._tolerance + else: + raise AttributeError('unknown property %s' % property.name) + + +class Audioconvert(feedcomponent.PostProcEffect): + """ + I am an effect that can be added to any component that changes the + samplerate of the audio output. + """ + logCategory = "audioconvert-effect" + + def __init__(self, name, sourcePad, pipeline, channels=None, + samplerate=None, tolerance=DEFAULT_TOLERANCE): + """ + @param element: the video source element on which the post + processing effect will be added + @param sourcePad: source pad used for linking the effect + @param pipeline: the pipeline of the element + @param channels: number of output channels + @param samplerate: output samplerate + @param tolerance: tolerance to correct imperfect timestamps + """ + feedcomponent.PostProcEffect.__init__(self, name, sourcePad, + AudioconvertBin(channels, samplerate, tolerance), pipeline) + + def effect_setTolerance(self, tolerance): + self.effectBin.set_property("tolerance", tolerance) + return tolerance + + def effect_getTolerance(self): + return self.effectBin.get_property('tolerance') + + def effect_setSamplerate(self, samplerate): + self.effectBin.set_property("samplerate", samplerate) + return samplerate + + def effect_getSamplerate(self): + return self.effectBin.get_property('samplerate') + + def effect_setChannels(self, channels): + self.effectBin.set_property("channels", channels) + return channels + + def effect_getChannels(self): + return self.effectBin.get_property('channels') diff -Nru flumotion-0.6.1/flumotion/component/effects/audioconvert/audioconvert.xml flumotion-0.9.1/flumotion/component/effects/audioconvert/audioconvert.xml --- flumotion-0.6.1/flumotion/component/effects/audioconvert/audioconvert.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioconvert/audioconvert.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/effects/audioconvert/__init__.py flumotion-0.9.1/flumotion/component/effects/audioconvert/__init__.py --- flumotion-0.6.1/flumotion/component/effects/audioconvert/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioconvert/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/effects/audioconvert/Makefile.am flumotion-0.9.1/flumotion/component/effects/audioconvert/Makefile.am --- flumotion-0.6.1/flumotion/component/effects/audioconvert/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioconvert/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,12 @@ +include $(top_srcdir)/common/python.mk + +component_PYTHON = __init__.py audioconvert.py +componentdir = $(libdir)/flumotion/python/flumotion/component/effects/audioconvert +component_DATA = audioconvert.xml + +clean-local: + rm -rf *.pyc *.pyo + +# PYCHECKER_FILES = $(component_PYTHON) + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/effects/audioconvert/Makefile.in flumotion-0.9.1/flumotion/component/effects/audioconvert/Makefile.in --- flumotion-0.6.1/flumotion/component/effects/audioconvert/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioconvert/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -0,0 +1,540 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/effects/audioconvert +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +component_PYTHON = __init__.py audioconvert.py +componentdir = $(libdir)/flumotion/python/flumotion/component/effects/audioconvert +component_DATA = audioconvert.xml + +# PYCHECKER_FILES = $(component_PYTHON) +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/effects/audioconvert/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/effects/audioconvert/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/effects/audioresync/admin_gtk.py flumotion-0.9.1/flumotion/component/effects/audioresync/admin_gtk.py --- flumotion-0.6.1/flumotion/component/effects/audioresync/admin_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioresync/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,65 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import os + +# import custom glade handler +from flumotion.ui import glade +from flumotion.component.base.effectsnode import EffectAdminGtkNode + +__version__ = "$Rev$" + + +class AudioresyncAdminGtkNode(EffectAdminGtkNode): + logCategory = 'audioresync-delay' + gladeFile = os.path.join('flumotion', 'component', 'effects', + 'audioresync', 'audioresync.glade') + + uiStateHandlers = None + + def haveWidgetTree(self): + self.widget = self.wtree.get_widget('audioresync-widget') + self._resync_spinbutton = \ + self.wtree.get_widget('delay-spinbutton') + + # do the callbacks for the mode setting + self._resync_spinbutton.connect('value-changed', self._cb_delay_set) + + def setUIState(self, state): + EffectAdminGtkNode.setUIState(self, state) + if not self.uiStateHandlers: + self.uiStateHandlers = {'audioresync-delay': self.delaySet} + for k, handler in self.uiStateHandlers.items(): + handler(state.get(k)) + + def stateSet(self, state, key, value): + handler = self.uiStateHandlers.get(key, None) + if handler: + handler(value) + + def delaySet(self, diff): + self._resync_spinbutton.set_value(diff) + + def setResyncErrback(self, failure): + self.warning("Failure %s setting mode: %s" % ( + failure.type, failure.getErrorMessage())) + return None + + def _cb_delay_set(self, widget): + diff = widget.get_value() + d = self.effectCallRemote("setDelay", diff) + d.addErrback(self.setResyncErrback) diff -Nru flumotion-0.6.1/flumotion/component/effects/audioresync/audioresync.glade flumotion-0.9.1/flumotion/component/effects/audioresync/audioresync.glade --- flumotion-0.6.1/flumotion/component/effects/audioresync/audioresync.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioresync/audioresync.glade 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,39 @@ + + + + + + window1 + + + True + 2 + True + + + True + Resync time (in ms): + + + GTK_FILL + + + + + + True + True + + 0 -1000000 1000000 10 10 10 + + + 1 + 2 + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/effects/audioresync/audioresync.py flumotion-0.9.1/flumotion/component/effects/audioresync/audioresync.py --- flumotion-0.6.1/flumotion/component/effects/audioresync/audioresync.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioresync/audioresync.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,115 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gobject +import gst + +from flumotion.common.i18n import gettexter +from flumotion.component import feedcomponent + +__version__ = "$Rev$" +T_ = gettexter() + + +class AudioResyncer(gst.Element): + ''' + I retimestamp incomming buffers adding a fixed delay. + ''' + + __gproperties__ = { + 'delay': (float, 'delay (in ms)', + 'Resynchronisation delay in milliseconds', + -1000000, 1000000, 0, + gobject.PARAM_READWRITE)} + + _sinkpadtemplate = gst.PadTemplate("sink", + gst.PAD_SINK, + gst.PAD_ALWAYS, + gst.caps_from_string( + "audio/x-raw-float;" + "audio/x-raw-int")) + + _srcpadtemplate = gst.PadTemplate("src", + gst.PAD_SRC, + gst.PAD_ALWAYS, + gst.caps_from_string( + "audio/x-raw-float;" + "audio/x-raw-int")) + + def __init__(self, delay=0): + gst.Element.__init__(self) + + self.sinkpad = gst.Pad(self._sinkpadtemplate, "sink") + self.sinkpad.set_chain_function(self.chainfunc) + self.add_pad(self.sinkpad) + + self.srcpad = gst.Pad(self._srcpadtemplate, "src") + self.add_pad(self.srcpad) + + self._delay = long(delay * gst.MSECOND) + print self._delay + + def do_get_property(self, property): + if property.name == "delay": + return self._delay + else: + raise AttributeError('unknown property %s' % property.name) + + def do_set_property(self, property, value): + if property.name == "delay": + self._delay = long(value * gst.MSECOND) + else: + raise AttributeError('unknown property %s' % property.name) + + def chainfunc(self, pad, buffer): + if self._delay != 0: + buffer.make_metadata_writable + buffer.timestamp = buffer.timestamp + self._delay + self.srcpad.push(buffer) + return gst.FLOW_OK + + +class Audioresync(feedcomponent.PostProcEffect): + """ + Post processing audio effect to increase/decrease the audio delay an + synchronise it on the fly with the video stream. + """ + logCategory = "audioresync-effect" + + def __init__(self, name, sourcePad, pipeline, delay): + """ + @param element: the video source element on which the post + processing effect will be added + @param sourcePad: source pad used for linking the effect + @param pipeline: the pipeline of the element + @param delay: audio delay added + """ + feedcomponent.PostProcEffect.__init__(self, name, sourcePad, + AudioResyncer(delay), pipeline) + + def setUIState(self, state): + feedcomponent.Effect.setUIState(self, state) + if state: + state.addKey('audioresync-delay', + self.effectBin.get_property('delay')) + + def effect_setDelay(self, delay): + self.effectBin.set_property("delay", delay) + return delay + + def effect_getDelay(self): + return self.effectBin.get_property('delay') diff -Nru flumotion-0.6.1/flumotion/component/effects/audioresync/audioresync.xml flumotion-0.9.1/flumotion/component/effects/audioresync/audioresync.xml --- flumotion-0.6.1/flumotion/component/effects/audioresync/audioresync.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioresync/audioresync.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/effects/audioresync/__init__.py flumotion-0.9.1/flumotion/component/effects/audioresync/__init__.py --- flumotion-0.6.1/flumotion/component/effects/audioresync/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioresync/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/effects/audioresync/Makefile.am flumotion-0.9.1/flumotion/component/effects/audioresync/Makefile.am --- flumotion-0.6.1/flumotion/component/effects/audioresync/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioresync/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,12 @@ +include $(top_srcdir)/common/python.mk + +component_PYTHON = __init__.py audioresync.py admin_gtk.py +componentdir = $(libdir)/flumotion/python/flumotion/component/effects/audioresync +component_DATA = audioresync.xml audioresync.glade + +clean-local: + rm -rf *.pyc *.pyo + +# PYCHECKER_FILES = $(component_PYTHON) + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/effects/audioresync/Makefile.in flumotion-0.9.1/flumotion/component/effects/audioresync/Makefile.in --- flumotion-0.6.1/flumotion/component/effects/audioresync/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/audioresync/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -0,0 +1,540 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/effects/audioresync +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +component_PYTHON = __init__.py audioresync.py admin_gtk.py +componentdir = $(libdir)/flumotion/python/flumotion/component/effects/audioresync +component_DATA = audioresync.xml audioresync.glade + +# PYCHECKER_FILES = $(component_PYTHON) +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/effects/audioresync/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/effects/audioresync/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/effects/colorbalance/admin_gtk.py flumotion-0.9.1/flumotion/component/effects/colorbalance/admin_gtk.py --- flumotion-0.6.1/flumotion/component/effects/colorbalance/admin_gtk.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/colorbalance/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,27 +1,23 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component.base.effectsnode import EffectAdminGtkNode -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class ColorbalanceAdminGtkNode(EffectAdminGtkNode): diff -Nru flumotion-0.6.1/flumotion/component/effects/colorbalance/colorbalance.py flumotion-0.9.1/flumotion/component/effects/colorbalance/colorbalance.py --- flumotion-0.6.1/flumotion/component/effects/colorbalance/colorbalance.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/colorbalance/colorbalance.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -24,7 +20,7 @@ from flumotion.component import feedcomponent -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class Colorbalance(feedcomponent.Effect): diff -Nru flumotion-0.6.1/flumotion/component/effects/colorbalance/__init__.py flumotion-0.9.1/flumotion/component/effects/colorbalance/__init__.py --- flumotion-0.6.1/flumotion/component/effects/colorbalance/__init__.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/colorbalance/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/effects/colorbalance/Makefile.in flumotion-0.9.1/flumotion/component/effects/colorbalance/Makefile.in --- flumotion-0.6.1/flumotion/component/effects/colorbalance/Makefile.in 2009-09-09 11:37:54.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/colorbalance/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/effects/deinterlace/admin_gtk.py flumotion-0.9.1/flumotion/component/effects/deinterlace/admin_gtk.py --- flumotion-0.6.1/flumotion/component/effects/deinterlace/admin_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/deinterlace/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,118 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from gettext import gettext as _ + +import gtk +import os + +# import custom glade handler +from flumotion.ui import glade +from flumotion.component.base.effectsnode import EffectAdminGtkNode + +__version__ = "$Rev$" + +DEINTERLACE_MODE = { + _("Automatic detection"): "auto", + _("Force deinterlacing"): "interlaced", +} + +DEINTERLACE_METHOD = { + _("FFmpeg Deinterlacer"): "ffmpeg", + _("Motion Adaptive: Motion Search"): "tomsmocomp", + _("Motion Adaptive: Advanced Detection"): "greedyh", + _("Motion Adaptive: Simple Detection"): "greedyl", + _("Blur: Temporal"): "linearblend", + _("Blur: Vertical"): "vfir", + _("Television: Full resolution"): "linear", + _("Double lines"): "scalerbob", + _("Weave"): "weave", + _("Progressive: Top Field First"): "weavetff", + _("Progressive: Bottom Field First"): "weavebff"} + + +class DeinterlaceAdminGtkNode(EffectAdminGtkNode): + logCategory = 'deinterlace' + gladeFile = os.path.join('flumotion', 'component', 'effects', + 'deinterlace', 'deinterlace.glade') + + uiStateHandlers = None + + def haveWidgetTree(self): + self.widget = self.wtree.get_widget('deinterlace-widget') + self._mode_combobox = \ + self.wtree.get_widget('deinterlace-mode-combobox') + self._method_combobox = \ + self.wtree.get_widget('deinterlace-method-combobox') + + # fill comboboxes + self._mode_combobox.prefill(DEINTERLACE_MODE.items()) + self._method_combobox.prefill(DEINTERLACE_METHOD.items()) + self._mode_combobox.select_item_by_data("auto") + self._method_combobox.select_item_by_data("ffmpeg") + + # do the callbacks for the mode setting + self._mode_combobox.connect('changed', self._cb_mode_set) + # do the callback for the method setting + self._method_combobox.connect('changed', self._cb_method_set) + + def setUIState(self, state): + EffectAdminGtkNode.setUIState(self, state) + if not self.uiStateHandlers: + self.uiStateHandlers = {'deinterlace-mode': self.modeSet, + 'deinterlace-method': self.methodSet} + for k, handler in self.uiStateHandlers.items(): + handler(state.get(k)) + + def stateSet(self, state, key, value): + handler = self.uiStateHandlers.get(key, None) + if handler: + handler(value) + + def modeSet(self, mode): + if mode is not None: + if mode == 'disabled': + self._method_combobox.set_sensitive(False) + self._mode_combobox.set_sensitive(False) + else: + self._mode_combobox.select_item_by_data(mode) + self._method_combobox.set_sensitive(True) + self._mode_combobox.set_sensitive(True) + + def methodSet(self, method): + if method is not None: + self._method_combobox.select_item_by_data(method) + + def setModeErrback(self, failure): + self.warning("Failure %s setting mode: %s" % ( + failure.type, failure.getErrorMessage())) + return None + + def setMethodErrback(self, failure): + self.warning("Failure %s setting method: %s" % ( + failure.type, failure.getErrorMessage())) + return None + + def _cb_mode_set(self, widget): + mode = widget.get_selected_data() + d = self.effectCallRemote("setMode", mode) + d.addErrback(self.setModeErrback) + + def _cb_method_set(self, widget): + method = widget.get_selected_data() + d = self.effectCallRemote("setMethod", method) + d.addErrback(self.setModeErrback) diff -Nru flumotion-0.6.1/flumotion/component/effects/deinterlace/deinterlace.glade flumotion-0.9.1/flumotion/component/effects/deinterlace/deinterlace.glade --- flumotion-0.6.1/flumotion/component/effects/deinterlace/deinterlace.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/deinterlace/deinterlace.glade 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,60 @@ + + + + + + window1 + + + True + 2 + 2 + True + + + True + Deinterlace mode: + + + GTK_FILL + + + + + + True + Deinterlace method: + + + 1 + 2 + GTK_EXPAND + + + + + + True + + + 1 + 2 + + + + + + True + + + 1 + 2 + 1 + 2 + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/effects/deinterlace/deinterlace.py flumotion-0.9.1/flumotion/component/effects/deinterlace/deinterlace.py --- flumotion-0.6.1/flumotion/component/effects/deinterlace/deinterlace.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/deinterlace/deinterlace.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,325 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gst +import gobject +from twisted.internet import reactor + +from flumotion.component import feedcomponent + +__version__ = "$Rev$" + +GST_DEINTERLACER = "deinterlace" +FF_DEINTERLACER = "ffdeinterlace" +PASSTHROUGH_DEINTERLACER = "identity" + +DEINTERLACE_MODE = [ + "auto", + "interlaced", + "disabled"] + +DEINTERLACE_METHOD = { + # deinterlace2 methods + "tomsmocomp": GST_DEINTERLACER, + "greedyh": GST_DEINTERLACER, + "greedyl": GST_DEINTERLACER, + "vfir": GST_DEINTERLACER, + "linear": GST_DEINTERLACER, + "linearblend": GST_DEINTERLACER, + "scalerbob": GST_DEINTERLACER, + "weave": GST_DEINTERLACER, + "weavetff": GST_DEINTERLACER, + "weavebff": GST_DEINTERLACER, + # ffmpeg methods + "ffmpeg": FF_DEINTERLACER} + + +class DeinterlaceBin(gst.Bin): + """ + I am a GStreamer bin that can deinterlace a video stream from its + source pad using different methods. + """ + logCategory = "deinterlace" + DEFAULT_MODE = 'auto' + DEFAULT_METHOD = 'ffmpeg' + + __gproperties__ = { + 'keep-framerate': (gobject.TYPE_BOOLEAN, 'keeps the input framerate', + 'keeps in the output the same framerate as in the output ' + 'even if the deinterlacer changes it', + True, gobject.PARAM_READWRITE), + 'mode': (gobject.TYPE_STRING, 'deinterlace mode', + 'mode used to deinterlace incoming frames', + 'auto', gobject.PARAM_READWRITE), + 'method': (gobject.TYPE_STRING, 'deinterlace method', + 'method/algorithm used to deinterlace incoming frames', + 'ffmpeg', gobject.PARAM_READWRITE)} + + def __init__(self, mode, method): + gst.Bin.__init__(self) + + self.keepFR = True + self.deinterlacerName = PASSTHROUGH_DEINTERLACER + self._interlaced = False + + # Create elements + self._colorspace = gst.element_factory_make("ffmpegcolorspace") + self._colorfilter = gst.element_factory_make("capsfilter") + self._deinterlacer = gst.element_factory_make(PASSTHROUGH_DEINTERLACER) + self._deinterlacer.set_property('silent', True) + self._videorate = gst.element_factory_make("videorate") + self._ratefilter = gst.element_factory_make("capsfilter") + + # Add elements to the bin + self.add(self._colorspace, self._colorfilter, self._deinterlacer, + self._videorate, self._ratefilter) + + # FIXME: I420 is the only format support by the ffmpeg deinterlacer. + # Forcing it simplifies renegotiation issues if the input colorspace + # is different and the ffmpeg deinterlacer is added after the + # negotiation happened in a different colorspace. This makes this + # element not-passthrough. + self._colorfilter.set_property('caps', gst.Caps( + 'video/x-raw-yuv, format=(fourcc)I420')) + + # Link elements + self._colorspace.link(self._colorfilter) + self._colorfilter.link(self._deinterlacer) + self._deinterlacer.link(self._videorate) + self._videorate.link(self._ratefilter) + + # Create source and sink pads + self._sinkPad = gst.GhostPad('sink', self._colorspace.get_pad('sink')) + self._srcPad = gst.GhostPad('src', self._ratefilter.get_pad('src')) + self.add_pad(self._sinkPad) + self.add_pad(self._srcPad) + + # Store deinterlacer's sink and source peer pads + self._sinkPeerPad = self._colorspace.get_pad('src') + self._srcPeerPad = self._videorate.get_pad('sink') + + # Add setcaps callback in the sink pad + self._sinkPad.set_setcaps_function(self._sinkSetCaps) + + # Set the mode and method in the deinterlacer + self._setMethod(method) + self._setMode(mode) + + def isPassthrough(self): + return self.deinterlacerName == PASSTHROUGH_DEINTERLACER + + def _sinkSetCaps(self, pad, caps): + struct = caps[0] + # Set in the source pad the same framerate as in the sink pad + if self.keepFR: + try: + framerate = struct['framerate'] + except KeyError: + framerate = gst.Fraction(25, 1) + fr = '%s/%s' % (framerate.num, framerate.denom) + self._ratefilter.set_property('caps', gst.Caps( + 'video/x-raw-yuv, framerate=%s;' + 'video/x-raw-rgb, framerate=%s' % (fr, fr))) + # Detect if it's an interlaced stream using the 'interlaced' field + try: + interlaced = struct['interlaced'] + except KeyError: + interlaced = False + if interlaced == self._interlaced: + return True + else: + self.debug("Input is%sinterlaced" % + (interlaced and " " or " not ")) + self._interlaced = interlaced + # If we are in 'auto' mode and the interlaced field has changed, + # switch to the appropiate deinterlacer + if self.mode == 'auto': + if self._interlaced and self.isPassthrough(): + self._replaceDeinterlacer(self._sinkPeerPad, + DEINTERLACE_METHOD[self.method]) + elif not self._interlaced and not self.isPassthrough(): + self._replaceDeinterlacer(self._sinkPeerPad, + PASSTHROUGH_DEINTERLACER) + return True + + def _replaceDeinterlacer(self, blockPad, deinterlacerName): + + def unlinkAndReplace(Pad, blocked, deinterlacerName): + oldDeinterlacer = self._deinterlacer + self._deinterlacer = gst.element_factory_make(deinterlacerName) + if deinterlacerName == GST_DEINTERLACER: + self._deinterlacer.set_property("method", self.method) + elif deinterlacerName == PASSTHROUGH_DEINTERLACER: + self._deinterlacer.set_property("silent", True) + self._deinterlacer.set_state(gst.STATE_PLAYING) + self.add(self._deinterlacer) + # unlink the sink and source pad of the old deinterlacer + self._colorfilter.unlink(oldDeinterlacer) + oldDeinterlacer.unlink(self._videorate) + # remove the old deinterlacer from the bin + oldDeinterlacer.set_state(gst.STATE_NULL) + self.remove(oldDeinterlacer) + self._colorfilter.link(self._deinterlacer) + self._deinterlacer.link(self._videorate) + reactor.callFromThread(self._sinkPeerPad.set_blocked, False) + self.debug("%s has been replaced succesfully" % + self.deinterlacerName) + self.deinterlacerName = deinterlacerName + + # We might be called from the streaming thread + self.debug("Replacing %s deinterlacer with %s:%s" % + (self.deinterlacerName, deinterlacerName, self.method)) + reactor.callFromThread(blockPad.set_blocked_async, + True, unlinkAndReplace, deinterlacerName) + + def _setMode(self, mode): + if mode not in DEINTERLACE_MODE: + raise AttributeError('unknown mode %s' % mode) + + self.mode = mode + + # If the new mode is 'disabled' use the passthrough deinterlacer + if self.mode == 'disabled': + if not self.isPassthrough(): + self._replaceDeinterlacer(self._sinkPeerPad, + PASSTHROUGH_DEINTERLACER) + # If the new mode is 'interlaced' force deinterlacing by replacing + # the deinterlacer if it was the passthrough one + elif self.mode == 'interlaced': + if self.isPassthrough(): + self._replaceDeinterlacer(self._sinkPeerPad, + DEINTERLACE_METHOD[self.method]) + # If the new mode is 'auto' replace the deinterlacer if the old one is + # passthough and the input content is interlaced + elif self.mode == 'auto': + if self._interlaced and self.isPassthrough(): + self._replaceDeinterlacer(self._sinkPeerPad, + DEINTERLACE_METHOD[self.method]) + + def _setMethod(self, method): + if method not in DEINTERLACE_METHOD: + raise AttributeError('unknown mode %s' % method) + + self.method = method + deinterlacerName = DEINTERLACE_METHOD[method] + if self.deinterlacerName == deinterlacerName: + # If the deinterlacer is 'deinterlace2', change + # the method property in the component + if self.deinterlacerName == GST_DEINTERLACER \ + and not self._passthrough: + self.debug("Changed method to %s" % method) + self._deinterlacer.set_property("method", method) + return + + if not self.isPassthrough(): + # Replace the deinterlacer + self._replaceDeinterlacer(self._sinkPeerPad, deinterlacerName) + + def do_set_property(self, property, value): + if property.name == 'mode': + if value != self.mode: + self._setMode(value) + elif property.name == 'method': + if value != self.method: + self._setMethod(value) + elif property.name == 'keep-framerate': + self.keepFR = value + else: + raise AttributeError('uknown property %s' % property.name) + + def do_get_property(self, property): + if property.name == 'mode': + return self.mode + elif property.name == 'method': + return self.method + elif property.name == 'keep-framerate': + return self.keepFR + else: + raise AttributeError('uknown property %s' % property.name) + + +class Deinterlace(feedcomponent.PostProcEffect): + """ + I am an effect that can be added to any component that has a deinterlacer + component and a way of changing the deinterlace method. + """ + logCategory = "deinterlace" + + def __init__(self, name, sourcePad, pipeline, mode, method): + """ + @param element: the video source element on which the post + processing effect will be added + @param pipeline: the pipeline of the element + @param mode: deinterlace mode + @param methid: deinterlace method + """ + feedcomponent.PostProcEffect.__init__(self, name, sourcePad, + DeinterlaceBin(mode, method), pipeline) + + def setUIState(self, state): + feedcomponent.Effect.setUIState(self, state) + if state: + for k in 'mode', 'method': + state.addKey('deinterlace-%s' % k, + self.effectBin.get_property(k)) + + def effect_setMethod(self, method): + """ + Sets the deinterlacing method + + @param value: the method to set to deinterlace + + @return: the actual method set to deinterlace + """ + self.effectBin.set_property('method', method) + self.info('Changing deinterlacing method to %s', method) + # notify admin clients + self.uiState.set('deinterlace-method', method) + return method + + def effect_getMethod(self): + """ + Gets the deinterlacing method + + @return: the method set for deinterlacing + @rtype: string + """ + return self.effectBin.get_property('method') + + def effect_setMode(self, mode): + """ + Sets the deinterlacing mode + + @param value: the method to set to deinterlace + + @return: the actual method set to deinterlace + """ + self.effectBin.set_property('mode', mode) + self.info('Changing deinterlacing mode to %s', mode) + # notify admin clients + self.uiState.set('deinterlace-mode', mode) + return mode + + def effect_getMode(self, mode): + """ + GetSets the deinterlacing method + + @param value: the method used for deinterlacing + + Returns: the actual method used to deinterlace + """ + return self.effectBin.get_property('mode') diff -Nru flumotion-0.6.1/flumotion/component/effects/deinterlace/deinterlace.xml flumotion-0.9.1/flumotion/component/effects/deinterlace/deinterlace.xml --- flumotion-0.6.1/flumotion/component/effects/deinterlace/deinterlace.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/deinterlace/deinterlace.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/effects/deinterlace/__init__.py flumotion-0.9.1/flumotion/component/effects/deinterlace/__init__.py --- flumotion-0.6.1/flumotion/component/effects/deinterlace/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/deinterlace/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/effects/deinterlace/Makefile.am flumotion-0.9.1/flumotion/component/effects/deinterlace/Makefile.am --- flumotion-0.6.1/flumotion/component/effects/deinterlace/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/deinterlace/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,12 @@ +include $(top_srcdir)/common/python.mk + +component_PYTHON = __init__.py deinterlace.py admin_gtk.py +componentdir = $(libdir)/flumotion/python/flumotion/component/effects/deinterlace +component_DATA = deinterlace.xml deinterlace.glade + +clean-local: + rm -rf *.pyc *.pyo + +# PYCHECKER_FILES = $(component_PYTHON) + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/effects/deinterlace/Makefile.in flumotion-0.9.1/flumotion/component/effects/deinterlace/Makefile.in --- flumotion-0.6.1/flumotion/component/effects/deinterlace/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/deinterlace/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -0,0 +1,540 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/effects/deinterlace +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +component_PYTHON = __init__.py deinterlace.py admin_gtk.py +componentdir = $(libdir)/flumotion/python/flumotion/component/effects/deinterlace +component_DATA = deinterlace.xml deinterlace.glade + +# PYCHECKER_FILES = $(component_PYTHON) +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/effects/deinterlace/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/effects/deinterlace/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/effects/__init__.py flumotion-0.9.1/flumotion/component/effects/__init__.py --- flumotion-0.6.1/flumotion/component/effects/__init__.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ code shared between components to implement effects """ -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/effects/Makefile.am flumotion-0.9.1/flumotion/component/effects/Makefile.am --- flumotion-0.6.1/flumotion/component/effects/Makefile.am 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -10,5 +10,10 @@ rm -rf *.pyc *.pyo SUBDIRS = \ + audioconvert \ + audioresync \ colorbalance \ + deinterlace \ + videorate \ + videoscale \ volume diff -Nru flumotion-0.6.1/flumotion/component/effects/Makefile.in flumotion-0.9.1/flumotion/component/effects/Makefile.in --- flumotion-0.6.1/flumotion/component/effects/Makefile.in 2009-09-09 11:37:54.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/Makefile.in 2011-09-11 08:09:20.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -141,6 +140,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -150,18 +150,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -209,6 +202,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -226,16 +220,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -243,7 +239,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -258,6 +253,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -290,7 +286,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -316,7 +311,12 @@ TAGS_FILES = $(component_PYTHON) SUBDIRS = \ + audioconvert \ + audioresync \ colorbalance \ + deinterlace \ + videorate \ + videoscale \ volume all: all-recursive @@ -404,7 +404,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -429,7 +429,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/flumotion/component/effects/videorate/__init__.py flumotion-0.9.1/flumotion/component/effects/videorate/__init__.py --- flumotion-0.6.1/flumotion/component/effects/videorate/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videorate/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/effects/videorate/Makefile.am flumotion-0.9.1/flumotion/component/effects/videorate/Makefile.am --- flumotion-0.6.1/flumotion/component/effects/videorate/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videorate/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,12 @@ +include $(top_srcdir)/common/python.mk + +component_PYTHON = __init__.py videorate.py +componentdir = $(libdir)/flumotion/python/flumotion/component/effects/videorate +component_DATA = videorate.xml + +clean-local: + rm -rf *.pyc *.pyo + +# PYCHECKER_FILES = $(component_PYTHON) + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/effects/videorate/Makefile.in flumotion-0.9.1/flumotion/component/effects/videorate/Makefile.in --- flumotion-0.6.1/flumotion/component/effects/videorate/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videorate/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -0,0 +1,540 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/effects/videorate +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +component_PYTHON = __init__.py videorate.py +componentdir = $(libdir)/flumotion/python/flumotion/component/effects/videorate +component_DATA = videorate.xml + +# PYCHECKER_FILES = $(component_PYTHON) +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/effects/videorate/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/effects/videorate/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/effects/videorate/videorate.py flumotion-0.9.1/flumotion/component/effects/videorate/videorate.py --- flumotion-0.6.1/flumotion/component/effects/videorate/videorate.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videorate/videorate.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,109 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from twisted.internet import reactor +import gobject +import gst + +from flumotion.common.i18n import N_, gettexter +from flumotion.component import feedcomponent + +# register serializables +from flumotion.common import messages + +__version__ = "$Rev$" +T_ = gettexter() + + +class VideorateBin(gst.Bin): + """ + I am a GStreamer bin that can change the framerate of a video stream. + """ + logCategory = "videosrate" + CAPS_TEMPLATE = "video/x-raw-yuv%(fr)s;"\ + "video/x-raw-rgb%(fr)s" + + __gproperties__ = { + 'framerate': (gobject.TYPE_OBJECT, 'framerate', + 'Video framerate', gobject.PARAM_READWRITE)} + + def __init__(self, framerate=gst.Fraction(25, 1)): + gst.Bin.__init__(self) + self._framerate = framerate + + self._videorate = gst.element_factory_make("videorate") + self._capsfilter = gst.element_factory_make("capsfilter") + self.add(self._videorate, self._capsfilter) + + self._videorate.link(self._capsfilter) + + # Create source and sink pads + self._sinkPad = gst.GhostPad('sink', self._videorate.get_pad('sink')) + self._srcPad = gst.GhostPad('src', self._capsfilter.get_pad('src')) + self.add_pad(self._sinkPad) + self.add_pad(self._srcPad) + + self._setFramerate(framerate) + + def _setFramerate(self, framerate): + self._framerate = framerate + self._capsfilter.set_property('caps', + gst.Caps(self.CAPS_TEMPLATE % dict(fr=self.framerateToString()))) + + def do_set_property(self, property, value): + if property.name == 'framerate': + self._setFramerate(value) + else: + raise AttributeError('unknown property %s' % property.name) + + def do_get_property(self, property): + if property.name == 'framerate': + return self._framerate + else: + raise AttributeError('unknown property %s' % property.name) + + def framerateToString(self): + if self._framerate is None: + return "" + return ",framerate=(fraction)%d/%d" % (self._framerate.num, + self._framerate.denom) + + +class Videorate(feedcomponent.PostProcEffect): + """ + I am an effect that can be added to any component that has a videorate + component and a way of changing the output framerate. + """ + logCategory = "videorate-effect" + + def __init__(self, name, sourcePad, pipeline, framerate): + """ + @param element: the video source element on which the post + processing effect will be added + @param sourcePad: source pad used for linking the effect + @param pipeline: the pipeline of the element + @param framerate: output framerate + """ + feedcomponent.PostProcEffect.__init__(self, name, sourcePad, + VideorateBin(framerate), pipeline) + + def effect_setFramerate(self, framerate): + self.effectBin.set_property("framerate", framerate) + return framerate + + def effect_getFramerate(self): + return self.effectBin.get_property('framerate') diff -Nru flumotion-0.6.1/flumotion/component/effects/videorate/videorate.xml flumotion-0.9.1/flumotion/component/effects/videorate/videorate.xml --- flumotion-0.6.1/flumotion/component/effects/videorate/videorate.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videorate/videorate.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/effects/videoscale/admin_gtk.py flumotion-0.9.1/flumotion/component/effects/videoscale/admin_gtk.py --- flumotion-0.6.1/flumotion/component/effects/videoscale/admin_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videoscale/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,126 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from gettext import gettext as _ + +import gtk +import os + +# import custom glade handler +from flumotion.ui import glade +from flumotion.component.base.effectsnode import EffectAdminGtkNode + +__version__ = "$Rev$" + + +class VideoscaleAdminGtkNode(EffectAdminGtkNode): + logCategory = 'videoscale-admin' + gladeFile = os.path.join('flumotion', 'component', 'effects', + 'videoscale', 'videoscale.glade') + + uiStateHandlers = None + + def haveWidgetTree(self): + self.widget = self.wtree.get_widget('videoscale-vbox') + self._height = self.wtree.get_widget('videoscale-height') + self._width = self.wtree.get_widget('videoscale-width') + self._par_n = self.wtree.get_widget('videoscale-par_n') + self._par_d = self.wtree.get_widget('videoscale-par_d') + self._is_square = self.wtree.get_widget('videoscale-is_square') + self._add_borders = self.wtree.get_widget('videoscale-add_borders') + self._apply = self.wtree.get_widget('videoscale-apply') + + # do the callbacks for the mode setting + self._height.connect('value-changed', self._cb_height) + self._width.connect('value-changed', self._cb_width) + self._par_n.connect('value-changed', self._cb_par) + self._par_d.connect('value-changed', self._cb_par) + self._is_square.connect('toggled', self._cb_is_square) + self._add_borders.connect('toggled', self._cb_add_borders) + self._apply.connect('clicked', self._cb_apply) + + def setUIState(self, state): + EffectAdminGtkNode.setUIState(self, state) + if not self.uiStateHandlers: + uiStateHandlers = {'videoscale-width': self.widthSet, + 'videoscale-height': self.heightSet, + 'videoscale-is-square': self.isSquareSet, + 'videoscale-add-borders': self.addBordersSet} + self.uiStateHandlers = uiStateHandlers + + for k, handler in self.uiStateHandlers.items(): + handler(state.get(k)) + + def stateSet(self, state, key, value): + handler = self.uiStateHandlers.get(key, None) + if handler: + handler(value) + + def addBordersSet(self, add_borders): + if add_borders is not None: + self._add_borders.set_active(add_borders) + + def isSquareSet(self, is_square): + if is_square is not None: + self._is_square.set_active(is_square) + + def widthSet(self, width): + if width is not None: + self._width.handler_block_by_func(self._cb_width) + self._width.set_value(width) + self._width.handler_unblock_by_func(self._cb_width) + + def heightSet(self, height): + if height is not None: + self._height.handler_block_by_func(self._cb_height) + self._height.set_value(height) + self._height.handler_unblock_by_func(self._cb_height) + + def _cb_height(self, widget): + height = widget.get_value_as_int() + d = self.effectCallRemote("setHeight", height) + d.addErrback(self.setErrback) + + def _cb_width(self, widget): + width = widget.get_value_as_int() + d = self.effectCallRemote("setWidth", width) + d.addErrback(self.setErrback) + + def _cb_par(self, _): + par_n = self._par_n.get_value_as_int() + par_d = self._par_d.get_value_as_int() + d = self.effectCallRemote("setPAR", (par_n, par_d)) + d.addErrback(self.setErrback) + + def _cb_is_square(self, widget): + is_square = self._is_square.get_active() + d = self.effectCallRemote("setIsSquare", is_square) + d.addErrback(self.setErrback) + + def _cb_add_borders(self, widget): + add_borders = self._add_borders.get_active() + d = self.effectCallRemote("setAddBorders", add_borders) + d.addErrback(self.setErrback) + + def _cb_apply(self, widget): + d = self.effectCallRemote("apply") + d.addErrback(self.setErrback) + + def setErrback(self, failure): + self.warning("Failure %s setting property: %s" % ( + failure.type, failure.getErrorMessage())) + return None diff -Nru flumotion-0.6.1/flumotion/component/effects/videoscale/__init__.py flumotion-0.9.1/flumotion/component/effects/videoscale/__init__.py --- flumotion-0.6.1/flumotion/component/effects/videoscale/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videoscale/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/effects/videoscale/Makefile.am flumotion-0.9.1/flumotion/component/effects/videoscale/Makefile.am --- flumotion-0.6.1/flumotion/component/effects/videoscale/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videoscale/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,12 @@ +include $(top_srcdir)/common/python.mk + +component_PYTHON = __init__.py videoscale.py admin_gtk.py +componentdir = $(libdir)/flumotion/python/flumotion/component/effects/videoscale +component_DATA = videoscale.xml videoscale.glade + +clean-local: + rm -rf *.pyc *.pyo + +# PYCHECKER_FILES = $(component_PYTHON) + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/effects/videoscale/Makefile.in flumotion-0.9.1/flumotion/component/effects/videoscale/Makefile.in --- flumotion-0.6.1/flumotion/component/effects/videoscale/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videoscale/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -0,0 +1,540 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/effects/videoscale +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +component_PYTHON = __init__.py videoscale.py admin_gtk.py +componentdir = $(libdir)/flumotion/python/flumotion/component/effects/videoscale +component_DATA = videoscale.xml videoscale.glade + +# PYCHECKER_FILES = $(component_PYTHON) +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/effects/videoscale/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/effects/videoscale/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/effects/videoscale/videoscale.glade flumotion-0.9.1/flumotion/component/effects/videoscale/videoscale.glade --- flumotion-0.6.1/flumotion/component/effects/videoscale/videoscale.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videoscale/videoscale.glade 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,225 @@ + + + + + + window1 + + + True + 5 + + + True + 6 + 2 + 10 + + + True + 0 + Width: + + + GTK_EXPAND + + + + + True + 0 + Height: + + + 1 + 2 + GTK_EXPAND + + + + + True + 10 + + + True + True + + 1 1 4000 1 10 10 + + + 0 + + + + + True + pixels + + + False + 1 + + + + + 1 + 2 + GTK_EXPAND + + + + + True + 10 + + + True + True + + 1 1 4000 1 10 10 + + + 0 + + + + + True + pixels + + + False + 1 + + + + + 1 + 2 + 1 + 2 + GTK_EXPAND + + + + + True + 0 + Aspect-ratio: + + + 4 + 5 + GTK_EXPAND + + + + + True + + + True + True + + 1 1 4000 1 10 10 + + + 0 + + + + + True + / + + + 1 + + + + + True + True + + 1 1 4000 1 10 10 + + + 2 + + + + + 1 + 2 + 4 + 5 + GTK_EXPAND + + + + + Output 1/1 pixel aspect-ratio + True + True + False + True + + + 2 + 2 + 3 + + + + + True + end + + + gtk-apply + True + True + True + True + + + False + False + 0 + + + + + 2 + 5 + 6 + + + + + + + + Add black borders + True + True + False + True + + + 3 + 4 + + + + + False + 5 + 0 + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/effects/videoscale/videoscale.py flumotion-0.9.1/flumotion/component/effects/videoscale/videoscale.py --- flumotion-0.6.1/flumotion/component/effects/videoscale/videoscale.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videoscale/videoscale.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,331 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from twisted.internet import reactor +import gobject +import gst + +from flumotion.common import errors, messages, gstreamer +from flumotion.common.i18n import N_, gettexter +from flumotion.component import feedcomponent + + +__version__ = "$Rev$" +T_ = gettexter() + + +class VideoscaleBin(gst.Bin): + """ + I am a GStreamer bin that can scale a video stream from its source pad. + """ + logCategory = "videoscale" + + __gproperties__ = { + 'width': (gobject.TYPE_UINT, 'width', + 'Output width', + 1, 10000, 100, gobject.PARAM_READWRITE), + 'height': (gobject.TYPE_UINT, 'height', + 'Output height', + 1, 10000, 100, gobject.PARAM_READWRITE), + 'width-correction': (gobject.TYPE_UINT, 'width correction', + 'Corrects with to be a multiple of this value', + 0, 64, 8, gobject.PARAM_READWRITE), + 'height-correction': (gobject.TYPE_UINT, 'height correction', + 'Corrects height to be a multiple of this value', + 0, 64, 0, gobject.PARAM_READWRITE), + 'is-square': (gobject.TYPE_BOOLEAN, 'PAR 1/1', + 'Output with PAR 1/1', + False, gobject.PARAM_READWRITE), + 'add-borders': (gobject.TYPE_BOOLEAN, 'Add borders', + 'Add black borders to keep DAR if needed', + False, gobject.PARAM_READWRITE)} + + def __init__(self, width, height, is_square, add_borders, + width_correction=8, height_correction=0): + gst.Bin.__init__(self) + self._width = width + self._height = height + self._width_correction = width_correction + self._height_correction = height_correction + self._is_square = is_square + self._add_borders = add_borders + + self._inpar = None # will be set when active + self._inwidth = None + self._inheight = None + + self._identity = gst.element_factory_make("identity") + self._videoscaler = gst.element_factory_make("videoscale") + self._capsfilter = gst.element_factory_make("capsfilter") + self._videobox = gst.element_factory_make("videobox") + self.add(self._identity, self._videoscaler, self._capsfilter, + self._videobox) + + self._identity.link(self._videoscaler) + self._videoscaler.link(self._capsfilter) + self._capsfilter.link(self._videobox) + + # Create source and sink pads + self._sinkPad = gst.GhostPad('sink', self._identity.get_pad('sink')) + self._srcPad = gst.GhostPad('src', self._videobox.get_pad('src')) + self.add_pad(self._sinkPad) + self.add_pad(self._srcPad) + + self._configureOutput() + + self._identity.set_property('silent', True) + # Add the setcaps function in the sink pad + self._sinkPad.set_setcaps_function(self._sinkSetCaps) + # Add a callback for caps changes in the videoscaler source pad + # to recalculate the scale correction + self._videoscaler.get_pad('src').connect( + 'notify::caps', self._applyScaleCorrection) + + def _updateFilter(self, blockPad): + + def unlinkAndReplace(pad, blocked): + self._videoscaler.set_state(gst.STATE_NULL) + self._capsfilter.set_state(gst.STATE_NULL) + self._videobox.set_state(gst.STATE_NULL) + + self._configureOutput() + + self._videobox.set_state(gst.STATE_PLAYING) + self._videoscaler.set_state(gst.STATE_PLAYING) + self._capsfilter.set_state(gst.STATE_PLAYING) + + # unlink the sink and source pad of the old deinterlacer + reactor.callFromThread(blockPad.set_blocked, False) + + self._sinkPad.send_event(gstreamer.flumotion_reset_event()) + + # We might be called from the streaming thread + self.info("Replaced capsfilter") + reactor.callFromThread(blockPad.set_blocked_async, + True, unlinkAndReplace) + + def _configureOutput(self): + p = "" + if self._is_square: + p = ",pixel-aspect-ratio=(fraction)1/1" + if self._width: + p = "%s,width=(int)%d" % (p, self._width) + if self._height: + p = "%s,height=(int)%d" % (p, self._height) + p = "video/x-raw-yuv%s;video/x-raw-rgb%s" % (p, p) + self.info("out:%s" % p) + caps = gst.Caps(p) + + self._capsfilter.set_property("caps", caps) + if gstreamer.element_has_property(self._videoscaler, 'add-borders'): + self._videoscaler.set_property('add-borders', self._add_borders) + + def _applyScaleCorrection(self, pad, param): + # The point of the width and height correction is adding a padding to + # the output frame so that its height and width are multiples of a + # given value as many encoders require for instance a width that's a + # multiple of 8. It's unrelated to the aspect ratio correction to get + # to 4:3 or 16:9 + # FIXME: Add the option to strech or reduce the image instead of + # padding with a black line + c = pad.get_negotiated_caps() + if c is None: + return + + width = c[0]['width'] + height = c[0]['height'] + + def correctScale(value, correction, isWidth, propIsSet): + if correction == 0: + return + + name = isWidth and "width" or "height" + scale_correction = value % correction + + if scale_correction == 0: + return + + if propIsSet: + self.warning('%s given, but output is not a ' + 'multiple of %s!' % (name, correction)) + return + + self.info("Correcting %s with %s pixels to be a multiple " + "of %s" % (name, scale_correction, correction)) + if isWidth: + self._videobox.set_property("right", -scale_correction) + else: + self._videobox.set_property("top", -scale_correction) + + correctScale(width, self._width_correction, True, self._width) + correctScale(height, self._height_correction, False, self._height) + + def _sinkSetCaps(self, pad, caps): + self.info("in:%s" % caps.to_string()) + if not caps.is_fixed(): + return + struc = caps[0] + if struc.has_field('pixel-aspect-ratio'): + self._inpar = struc['pixel-aspect-ratio'] + self._inwidth = struc['width'] + self._inheight = struc['height'] + return True + + def do_set_property(self, property, value): + if property.name == 'width': + self._width = value + elif property.name == 'height': + self._height = value + elif property.name == 'width-correction': + self._width_correction = value + elif property.name == 'height-correction': + self._height_correction = value + elif property.name == 'add-borders': + if not gstreamer.element_has_property(self._videoscaler, + 'add-borders'): + self.warning("Can't add black borders because videoscale\ + element doesn't have 'add-borders' property.") + self._add_borders = value + elif property.name == 'is-square': + self._is_square = value + else: + raise AttributeError('unknown property %s' % property.name) + + def do_get_property(self, property): + if property.name == 'width': + return self._width or 0 + elif property.name == 'height': + return self._height or 0 + elif property.name == 'width-correction': + return self._width_correction + elif property.name == 'height-correction': + return self._height_correction + elif property.name == 'add-borders': + return self._add_borders + elif property.name == 'is-square': + return self._is_square or False + else: + raise AttributeError('unknown property %s' % property.name) + + def apply(self): + peer = self._sinkPad.get_peer() + self._updateFilter(peer) + + +class Videoscale(feedcomponent.PostProcEffect): + """ + I am an effect that can be added to any component that has a video scaler + component and a way of changing the size and PAR. + """ + logCategory = "videoscale-effect" + + def __init__(self, name, component, sourcePad, pipeline, + width, height, is_square, add_borders=False, + width_correction=8, height_correction=0): + """ + @param element: the video source element on which the post + processing effect will be added + @param pipeline: the pipeline of the element + """ + feedcomponent.PostProcEffect.__init__(self, name, sourcePad, + VideoscaleBin(width, height, is_square, add_borders, + width_correction, height_correction), pipeline) + self.pipeline = pipeline + self.component = component + + vt = gstreamer.get_plugin_version('videoscale') + if not vt: + raise errors.MissingElementError('videoscale') + # 'add-borders' property was added in gst-plugins-base 0.10.29, + # and it's requiered to respect DAR by adding black borders + if not vt > (0, 10, 29, 0): + self.component.addMessage( + messages.Warning(T_(N_( + "The videoscale element correctly " + "works with GStreamer base newer than 0.10.29.1." + "You should update your version of GStreamer.")))) + + def setUIState(self, state): + feedcomponent.Effect.setUIState(self, state) + if state: + for k in 'width', 'height', 'is-square', 'add-borders': + state.addKey('videoscale-%s' % k, + self.effectBin.get_property(k)) + + def _setHeight(self, height): + self.effectBin.set_property('height', height) + self.info('Changing height to %d' % height) + self.uiState.set('videoscale-height', height) + + def effect_setHeight(self, height): + self._setHeight(height) + if self.effect_getIsSquare(): + self._setWidth(height * + (self.effectBin._inwidth * self.effectBin._inpar.num) / + (self.effectBin._inheight * self.effectBin._inpar.denom)) + return height + + def effect_getHeight(self): + return self.effectBin.get_property('height') + + def _setWidth(self, width): + self.effectBin.set_property('width', width) + self.info('Changing width to %d' % width) + self.uiState.set('videoscale-width', width) + + def effect_setWidth(self, width): + self._setWidth(width) + if self.effect_getIsSquare(): + self._setHeight(width * + (self.effectBin._inheight * self.effectBin._inpar.denom) / + (self.effectBin._inwidth * self.effectBin._inpar.num)) + return width + + def effect_getWidth(self): + return self.effectBin.get_property('width') + + def effect_setIsSquare(self, is_square): + self.effectBin.set_property('is-square', is_square) + self.info('Changing is-square to %r' % is_square) + self.uiState.set('videoscale-is-square', is_square) + return is_square + + def effect_getIsSquare(self): + return self.effectBin.get_property('is-square') + + def effect_setAddBorders(self, add_borders): + self.effectBin.set_property('add-borders', add_borders) + self.info('Changing add-borders to %r' % add_borders) + self.uiState.set('videoscale-add-borders', add_borders) + return add_borders + + def effect_getAddBorders(self): + return self.effectBin.get_property('add-borders') + + def effect_setPAR(self, par): + self.par = par + self.info('Changing PAR to %s' % str(par)) + #self.uiState.set('videoscale-par', self.par) + return repr(par) # FIXME: why does it complain with tuples returns... + + def effect_getPAR(self): + return self.par + + def effect_apply(self): + self.info("apply videoscale") + self.effectBin.apply() + return True diff -Nru flumotion-0.6.1/flumotion/component/effects/videoscale/videoscale.xml flumotion-0.9.1/flumotion/component/effects/videoscale/videoscale.xml --- flumotion-0.6.1/flumotion/component/effects/videoscale/videoscale.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/videoscale/videoscale.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/effects/volume/admin_gtk.py flumotion-0.9.1/flumotion/component/effects/volume/admin_gtk.py --- flumotion-0.6.1/flumotion/component/effects/volume/admin_gtk.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/volume/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from gettext import gettext as _ @@ -30,7 +26,7 @@ from flumotion.ui.fvumeter import FVUMeter from flumotion.component.base.effectsnode import EffectAdminGtkNode -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" def clamp(x, min, max): diff -Nru flumotion-0.6.1/flumotion/component/effects/volume/__init__.py flumotion-0.9.1/flumotion/component/effects/volume/__init__.py --- flumotion-0.6.1/flumotion/component/effects/volume/__init__.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/volume/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/effects/volume/Makefile.in flumotion-0.9.1/flumotion/component/effects/volume/Makefile.in --- flumotion-0.6.1/flumotion/component/effects/volume/Makefile.in 2009-09-09 11:37:54.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/volume/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/effects/volume/volume.py flumotion-0.9.1/flumotion/component/effects/volume/volume.py --- flumotion-0.6.1/flumotion/component/effects/volume/volume.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/effects/volume/volume.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,24 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from math import frexp from flumotion.component import feedcomponent -__version__ = "$Rev: 6125 $" +__version__ = "$Rev$" class Volume(feedcomponent.Effect): diff -Nru flumotion-0.6.1/flumotion/component/encoders/dirac/dirac.py flumotion-0.9.1/flumotion/component/encoders/dirac/dirac.py --- flumotion-0.6.1/flumotion/component/encoders/dirac/dirac.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/dirac/dirac.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import gstreamer, messages @@ -28,7 +24,7 @@ T_ = gettexter() -class Dirac(feedcomponent.ParseLaunchComponent): +class Dirac(feedcomponent.EncoderComponent): checkTimestamp = True checkOffset = True diff -Nru flumotion-0.6.1/flumotion/component/encoders/dirac/__init__.py flumotion-0.9.1/flumotion/component/encoders/dirac/__init__.py --- flumotion-0.6.1/flumotion/component/encoders/dirac/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/dirac/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,20 +1,16 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. diff -Nru flumotion-0.6.1/flumotion/component/encoders/dirac/wizard_gtk.py flumotion-0.9.1/flumotion/component/encoders/dirac/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/encoders/dirac/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/dirac/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext diff -Nru flumotion-0.6.1/flumotion/component/encoders/__init__.py flumotion-0.9.1/flumotion/component/encoders/__init__.py --- flumotion-0.6.1/flumotion/component/encoders/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/encoders/jpeg/__init__.py flumotion-0.9.1/flumotion/component/encoders/jpeg/__init__.py --- flumotion-0.6.1/flumotion/component/encoders/jpeg/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/jpeg/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/encoders/jpeg/jpeg.py flumotion-0.9.1/flumotion/component/encoders/jpeg/jpeg.py --- flumotion-0.6.1/flumotion/component/encoders/jpeg/jpeg.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/jpeg/jpeg.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,32 +1,28 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component import feedcomponent import gst -__version__ = "$Rev: 7161 $" +__version__ = "$Rev$" -class JPEG(feedcomponent.ParseLaunchComponent): +class JPEG(feedcomponent.EncoderComponent): def get_pipeline_string(self, properties): framerate = '' diff -Nru flumotion-0.6.1/flumotion/component/encoders/jpeg/wizard_gtk.py flumotion-0.9.1/flumotion/component/encoders/jpeg/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/encoders/jpeg/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/jpeg/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -28,7 +24,7 @@ from flumotion.admin.assistant.models import VideoEncoder from flumotion.admin.gtk.basesteps import VideoEncoderStep -__version__ = "$Rev: 7268 $" +__version__ = "$Rev$" _ = gettext.gettext diff -Nru flumotion-0.6.1/flumotion/component/encoders/Makefile.am flumotion-0.9.1/flumotion/component/encoders/Makefile.am --- flumotion-0.6.1/flumotion/component/encoders/Makefile.am 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -69,10 +69,19 @@ vorbis/vorbis.xml \ vorbis/wizard.glade +vp8dir = $(componentdir)/vp8 +vp8_PYTHON = \ + vp8/__init__.py \ + vp8/vp8.py \ + vp8/wizard_gtk.py +vp8_DATA = \ + vp8/vp8.xml \ + vp8/wizard.glade + clean-local: rm -rf *.pyc *.pyo */*.pyc */*.pyo EXTRA_DIST = \ $(component_DATA) \ $(dirac_DATA) $(jpeg_DATA) $(mulaw_DATA) $(smoke_DATA) \ - $(speex_DATA) $(theora_DATA) $(vorbis_DATA) + $(speex_DATA) $(theora_DATA) $(vorbis_DATA) $(vp8_DATA) diff -Nru flumotion-0.6.1/flumotion/component/encoders/Makefile.in flumotion-0.9.1/flumotion/component/encoders/Makefile.in --- flumotion-0.6.1/flumotion/component/encoders/Makefile.in 2009-09-09 11:37:54.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -39,21 +39,20 @@ DIST_COMMON = $(component_PYTHON) $(dirac_PYTHON) $(jpeg_PYTHON) \ $(mulaw_PYTHON) $(smoke_PYTHON) $(speex_PYTHON) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in $(theora_PYTHON) \ - $(top_srcdir)/common/python.mk $(vorbis_PYTHON) + $(top_srcdir)/common/python.mk $(vorbis_PYTHON) $(vp8_PYTHON) subdir = flumotion/component/encoders ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -86,13 +85,14 @@ "$(DESTDIR)$(jpegdir)" "$(DESTDIR)$(mulawdir)" \ "$(DESTDIR)$(smokedir)" "$(DESTDIR)$(speexdir)" \ "$(DESTDIR)$(theoradir)" "$(DESTDIR)$(vorbisdir)" \ - "$(DESTDIR)$(diracdir)" "$(DESTDIR)$(jpegdir)" \ - "$(DESTDIR)$(mulawdir)" "$(DESTDIR)$(smokedir)" \ - "$(DESTDIR)$(speexdir)" "$(DESTDIR)$(theoradir)" \ - "$(DESTDIR)$(vorbisdir)" + "$(DESTDIR)$(vp8dir)" "$(DESTDIR)$(diracdir)" \ + "$(DESTDIR)$(jpegdir)" "$(DESTDIR)$(mulawdir)" \ + "$(DESTDIR)$(smokedir)" "$(DESTDIR)$(speexdir)" \ + "$(DESTDIR)$(theoradir)" "$(DESTDIR)$(vorbisdir)" \ + "$(DESTDIR)$(vp8dir)" py_compile = $(top_srcdir)/py-compile DATA = $(dirac_DATA) $(jpeg_DATA) $(mulaw_DATA) $(smoke_DATA) \ - $(speex_DATA) $(theora_DATA) $(vorbis_DATA) + $(speex_DATA) $(theora_DATA) $(vorbis_DATA) $(vp8_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ @@ -113,6 +113,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -122,18 +123,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -181,6 +175,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -198,16 +193,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -215,7 +212,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -230,6 +226,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -262,7 +259,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -357,10 +353,20 @@ vorbis/vorbis.xml \ vorbis/wizard.glade +vp8dir = $(componentdir)/vp8 +vp8_PYTHON = \ + vp8/__init__.py \ + vp8/vp8.py \ + vp8/wizard_gtk.py + +vp8_DATA = \ + vp8/vp8.xml \ + vp8/wizard.glade + EXTRA_DIST = \ $(component_DATA) \ $(dirac_DATA) $(jpeg_DATA) $(mulaw_DATA) $(smoke_DATA) \ - $(speex_DATA) $(theora_DATA) $(vorbis_DATA) + $(speex_DATA) $(theora_DATA) $(vorbis_DATA) $(vp8_DATA) all: all-am @@ -705,6 +711,44 @@ cd "$(DESTDIR)$(vorbisdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(vorbisdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(vorbisdir)" && rm -f $$fileso +install-vp8PYTHON: $(vp8_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(vp8dir)" || $(MKDIR_P) "$(DESTDIR)$(vp8dir)" + @list='$(vp8_PYTHON)'; dlist=; list2=; test -n "$(vp8dir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vp8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(vp8dir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(vp8dir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(vp8dir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-vp8PYTHON: + @$(NORMAL_UNINSTALL) + @list='$(vp8_PYTHON)'; test -n "$(vp8dir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(vp8dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(vp8dir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(vp8dir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(vp8dir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(vp8dir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(vp8dir)" && rm -f $$fileso install-diracDATA: $(dirac_DATA) @$(NORMAL_INSTALL) test -z "$(diracdir)" || $(MKDIR_P) "$(DESTDIR)$(diracdir)" @@ -845,6 +889,26 @@ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(vorbisdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(vorbisdir)" && rm -f $$files +install-vp8DATA: $(vp8_DATA) + @$(NORMAL_INSTALL) + test -z "$(vp8dir)" || $(MKDIR_P) "$(DESTDIR)$(vp8dir)" + @list='$(vp8_DATA)'; test -n "$(vp8dir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vp8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(vp8dir)" || exit $$?; \ + done + +uninstall-vp8DATA: + @$(NORMAL_UNINSTALL) + @list='$(vp8_DATA)'; test -n "$(vp8dir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(vp8dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(vp8dir)" && rm -f $$files tags: TAGS TAGS: @@ -886,7 +950,7 @@ check: check-am all-am: Makefile $(DATA) installdirs: - for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(diracdir)" "$(DESTDIR)$(jpegdir)" "$(DESTDIR)$(mulawdir)" "$(DESTDIR)$(smokedir)" "$(DESTDIR)$(speexdir)" "$(DESTDIR)$(theoradir)" "$(DESTDIR)$(vorbisdir)" "$(DESTDIR)$(diracdir)" "$(DESTDIR)$(jpegdir)" "$(DESTDIR)$(mulawdir)" "$(DESTDIR)$(smokedir)" "$(DESTDIR)$(speexdir)" "$(DESTDIR)$(theoradir)" "$(DESTDIR)$(vorbisdir)"; do \ + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(diracdir)" "$(DESTDIR)$(jpegdir)" "$(DESTDIR)$(mulawdir)" "$(DESTDIR)$(smokedir)" "$(DESTDIR)$(speexdir)" "$(DESTDIR)$(theoradir)" "$(DESTDIR)$(vorbisdir)" "$(DESTDIR)$(vp8dir)" "$(DESTDIR)$(diracdir)" "$(DESTDIR)$(jpegdir)" "$(DESTDIR)$(mulawdir)" "$(DESTDIR)$(smokedir)" "$(DESTDIR)$(speexdir)" "$(DESTDIR)$(theoradir)" "$(DESTDIR)$(vorbisdir)" "$(DESTDIR)$(vp8dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -939,7 +1003,7 @@ install-mulawDATA install-mulawPYTHON install-smokeDATA \ install-smokePYTHON install-speexDATA install-speexPYTHON \ install-theoraDATA install-theoraPYTHON install-vorbisDATA \ - install-vorbisPYTHON + install-vorbisPYTHON install-vp8DATA install-vp8PYTHON install-dvi: install-dvi-am @@ -989,7 +1053,7 @@ uninstall-smokePYTHON uninstall-speexDATA \ uninstall-speexPYTHON uninstall-theoraDATA \ uninstall-theoraPYTHON uninstall-vorbisDATA \ - uninstall-vorbisPYTHON + uninstall-vorbisPYTHON uninstall-vp8DATA uninstall-vp8PYTHON .MAKE: install-am install-strip @@ -1005,17 +1069,17 @@ install-pdf-am install-ps install-ps-am install-smokeDATA \ install-smokePYTHON install-speexDATA install-speexPYTHON \ install-strip install-theoraDATA install-theoraPYTHON \ - install-vorbisDATA install-vorbisPYTHON installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-componentPYTHON uninstall-diracDATA \ - uninstall-diracPYTHON uninstall-jpegDATA uninstall-jpegPYTHON \ - uninstall-mulawDATA uninstall-mulawPYTHON uninstall-smokeDATA \ - uninstall-smokePYTHON uninstall-speexDATA \ + install-vorbisDATA install-vorbisPYTHON install-vp8DATA \ + install-vp8PYTHON installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-componentPYTHON \ + uninstall-diracDATA uninstall-diracPYTHON uninstall-jpegDATA \ + uninstall-jpegPYTHON uninstall-mulawDATA uninstall-mulawPYTHON \ + uninstall-smokeDATA uninstall-smokePYTHON uninstall-speexDATA \ uninstall-speexPYTHON uninstall-theoraDATA \ uninstall-theoraPYTHON uninstall-vorbisDATA \ - uninstall-vorbisPYTHON + uninstall-vorbisPYTHON uninstall-vp8DATA uninstall-vp8PYTHON #if HAVE_PYCHECKER diff -Nru flumotion-0.6.1/flumotion/component/encoders/mulaw/__init__.py flumotion-0.9.1/flumotion/component/encoders/mulaw/__init__.py --- flumotion-0.6.1/flumotion/component/encoders/mulaw/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/mulaw/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/encoders/mulaw/mulaw.py flumotion-0.9.1/flumotion/component/encoders/mulaw/mulaw.py --- flumotion-0.6.1/flumotion/component/encoders/mulaw/mulaw.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/mulaw/mulaw.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,31 +1,27 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import gstreamer from flumotion.component import feedcomponent -__version__ = "$Rev: 8168 $" +__version__ = "$Rev$" -class Mulaw(feedcomponent.ParseLaunchComponent): +class Mulaw(feedcomponent.EncoderComponent): def get_pipeline_string(self, properties): resampler = 'audioresample' diff -Nru flumotion-0.6.1/flumotion/component/encoders/mulaw/wizard_gtk.py flumotion-0.9.1/flumotion/component/encoders/mulaw/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/encoders/mulaw/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/mulaw/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext diff -Nru flumotion-0.6.1/flumotion/component/encoders/smoke/__init__.py flumotion-0.9.1/flumotion/component/encoders/smoke/__init__.py --- flumotion-0.6.1/flumotion/component/encoders/smoke/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/smoke/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/encoders/smoke/smoke.py flumotion-0.9.1/flumotion/component/encoders/smoke/smoke.py --- flumotion-0.6.1/flumotion/component/encoders/smoke/smoke.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/smoke/smoke.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,33 +1,29 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component import feedcomponent from flumotion.common import messages, gstreamer from flumotion.common.i18n import N_, gettexter -__version__ = "$Rev: 8057 $" +__version__ = "$Rev$" T_ = gettexter() -class Smoke(feedcomponent.ParseLaunchComponent): +class Smoke(feedcomponent.EncoderComponent): def get_pipeline_string(self, properties): return 'ffmpegcolorspace ! smokeenc name=encoder' diff -Nru flumotion-0.6.1/flumotion/component/encoders/smoke/wizard_gtk.py flumotion-0.9.1/flumotion/component/encoders/smoke/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/encoders/smoke/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/smoke/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -29,7 +25,7 @@ from flumotion.admin.gtk.basesteps import VideoEncoderStep from flumotion.common.fraction import fractionAsFloat -__version__ = "$Rev: 7781 $" +__version__ = "$Rev$" _ = gettext.gettext diff -Nru flumotion-0.6.1/flumotion/component/encoders/speex/__init__.py flumotion-0.9.1/flumotion/component/encoders/speex/__init__.py --- flumotion-0.6.1/flumotion/component/encoders/speex/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/speex/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/encoders/speex/speex.py flumotion-0.9.1/flumotion/component/encoders/speex/speex.py --- flumotion-0.6.1/flumotion/component/encoders/speex/speex.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/speex/speex.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,30 +1,26 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component import feedcomponent -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" -class Speex(feedcomponent.ParseLaunchComponent): +class Speex(feedcomponent.EncoderComponent): def get_pipeline_string(self, properties): return 'speexenc name=encoder' diff -Nru flumotion-0.6.1/flumotion/component/encoders/speex/wizard_gtk.py flumotion-0.9.1/flumotion/component/encoders/speex/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/encoders/speex/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/speex/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -27,7 +23,7 @@ from flumotion.admin.assistant.models import AudioEncoder from flumotion.admin.gtk.basesteps import AudioEncoderStep -__version__ = "$Rev: 7268 $" +__version__ = "$Rev$" _ = gettext.gettext diff -Nru flumotion-0.6.1/flumotion/component/encoders/theora/__init__.py flumotion-0.9.1/flumotion/component/encoders/theora/__init__.py --- flumotion-0.6.1/flumotion/component/encoders/theora/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/theora/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/encoders/theora/theora.py flumotion-0.9.1/flumotion/component/encoders/theora/theora.py --- flumotion-0.6.1/flumotion/component/encoders/theora/theora.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/theora/theora.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,35 +1,31 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -from flumotion.common import messages +from flumotion.common import messages, errors, gstreamer from flumotion.common.i18n import N_, gettexter from flumotion.component import feedcomponent from flumotion.worker.checks import check -__version__ = "$Rev: 7161 $" +__version__ = "$Rev$" T_ = gettexter() -class Theora(feedcomponent.ParseLaunchComponent): +class Theora(feedcomponent.EncoderComponent): checkTimestamp = True checkOffset = True @@ -38,34 +34,32 @@ from flumotion.worker.checks import encoder return check.do_check(self, encoder.checkTheora) + def check_properties(self, props, addMessage): + props = self.config['properties'] + speed = props.get('speed', 3) + + if speed > 3: + msg = messages.Error(T_(N_( + "The configuration property 'speed' can only take " + "values from 0 to 3")), mid='speed') + addMessage(msg) + raise errors.ConfigError(msg) + def get_pipeline_string(self, properties): return "ffmpegcolorspace ! theoraenc name=encoder" def configure_pipeline(self, pipeline, properties): element = pipeline.get_by_name('encoder') + for p in ['sharpness', 'quick-compress', 'noise-sensitivity']: + if properties.get(p, None) is not None: + self.warnDeprecatedProperties([p]) + props = ('bitrate', 'quality', - 'keyframe-mindistance', - ('quick-compress', 'quick'), - ('keyframe-maxdistance', 'keyframe-freq'), - ('keyframe-maxdistance', 'keyframe-force'), - 'noise-sensitivity', - 'sharpness') - - # F0.6: remove this code - # before 0.3.2, bitrate was interpreted as kbps, inconsistent - # with other flumotion components - # safe to assume that nobody will want less than 10 kbit/sec - # also, MikeS *requires* a kbit/sec to be seen as 1000 bit/sec - if 'bitrate' in properties: - if properties['bitrate'] < 10000: - self.addMessage( - messages.Warning(T_(N_( - "Your configuration uses 'bitrate' expressed in " - "kbit/sec. Please convert it to a value in bit/sec by" - " multiplying the value by 1000.")), mid='bitrate')) - properties['bitrate'] *= 1000 + ('speed', 'speed-level'), + ('keyframe-mindistance', 'keyframe-freq'), + ('keyframe-maxdistance', 'keyframe-force')) for p in props: if isinstance(p, tuple): @@ -84,4 +78,20 @@ # with all other elements, so fix it up if pproperty == 'bitrate': value = int(value/1000) + # Check for the speed-level property, introduced in + # gst-plugins-base-0.10.24 + if eproperty == 'speed-level': + if not gstreamer.element_has_property(element, 'speed-level'): + self.warning("Trying to set the 'speed-level' property " + "in a old version of gstreamer's theora " + "encoder element") + self.warning("We will fallback to the 'quick' property") + eproperty = 'quick' + value = value > 0 and True or False element.set_property(eproperty, value) + + def modify_property_Bitrate(self, value): + if not self.checkPropertyType('bitrate', value, int): + return False + self.modify_element_property('encoder', 'bitrate', value/1000) + return True diff -Nru flumotion-0.6.1/flumotion/component/encoders/theora/theora.xml flumotion-0.9.1/flumotion/component/encoders/theora/theora.xml --- flumotion-0.6.1/flumotion/component/encoders/theora/theora.xml 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/theora/theora.xml 2011-09-11 08:09:04.000000000 +0000 @@ -28,13 +28,14 @@ _description="The minimum distance between key frames (in frames)." /> + + _description="(Deprecated) Whether to use quick, lower-quality compression."/> - + _description="(Dreprecated) The noise sensitivity (defaults to 1)" /> + _description="(Deprecated) The sharpness encoder parameter: 0, 1, or 2."/> diff -Nru flumotion-0.6.1/flumotion/component/encoders/theora/wizard.glade flumotion-0.9.1/flumotion/component/encoders/theora/wizard.glade --- flumotion-0.6.1/flumotion/component/encoders/theora/wizard.glade 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/theora/wizard.glade 2011-09-11 08:09:04.000000000 +0000 @@ -1,388 +1,219 @@ - - - + - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - False - - - - True - 3 - 3 - False - 6 - 6 - - - - True - kbit/s - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 2 - 3 - 0 - 1 - fill - - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 400 0 4000 1 10 10 - - - 1 - 2 - 0 - 1 - fill - - - - - - - True - False - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 16 0 63 1 10 10 - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - True - Bit _rate: - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - True - _Quality: - True - GTK_RELIEF_NORMAL - True - False - False - True - has_bitrate - - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - True - False - 0 - - - - 6 - True - 3 - 3 - False - 6 - 6 - - - - True - A shorter time between key frames reduces playback latency at the cost of a higher bit rate or lower quality. - True - 1 - 3 - False - GTK_UPDATE_ALWAYS - True - False - 2 0 60 0.0399999991059 1 1 - - - 1 - 2 - 0 - 1 - fill - - - - - - - True - seconds - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 2 - 3 - 0 - 1 - fill - - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 0 100 1 10 10 - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - % - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 2 - 3 - 1 - 2 - fill - - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 0 2 1 1 1 - - - 1 - 2 - 2 - 3 - fill - - - - - - - True - Time between _key frames: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - keyframe_delta - - - 0 - 1 - 0 - 1 - 12 - fill - - - - - - - True - _Noise sensitivity: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - noise_sensitivity - - - 0 - 1 - 1 - 2 - 12 - fill - - - - - - - True - _Sharpness: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - sharpness - - - 0 - 1 - 2 - 3 - 12 - fill - - - - - - - - - True - Advanced settings - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - 3 - 2 - 3 - fill - - - - - - + + + + window1 + + + True + 3 + 3 + 6 + 6 + + + True + 0 + kbit/s + + + 2 + 3 + GTK_FILL + + + + + + True + True + 400 0 4000 1 10 10 + 1 + + + 1 + 2 + GTK_FILL + + + + + + True + False + True + 16 0 63 1 10 10 + 1 + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + Bit _rate: + True + True + False + True + True + + + + GTK_FILL + + + + + + _Quality: + True + True + False + True + True + has_bitrate + + + + 1 + 2 + GTK_FILL + + + + + + True + True + + + True + 6 + 2 + 3 + 6 + 6 + + + True + True + A shorter time between key frames reduces playback latency at the cost of a higher bit rate or lower quality. + 1.9999999552949999 0 60 0.039999999105899998 1 1 + 1 + 3 + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + seconds + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Time between _key frames: + True + keyframe_delta + + + GTK_FILL + + 12 + + + + + True + Speed: + + + 1 + 2 + GTK_FILL + + + + + + True + True + + 3 0 3 1 10 10 + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + + + True + Advanced settings + + + label_item + + + + + 3 + 2 + 3 + GTK_FILL + + + + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/encoders/theora/wizard_gtk.py flumotion-0.9.1/flumotion/component/encoders/theora/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/encoders/theora/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/theora/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -29,7 +25,7 @@ from flumotion.common.fraction import fractionAsFloat from flumotion.admin.gtk.basesteps import VideoEncoderStep -__version__ = "$Rev: 7626 $" +__version__ = "$Rev$" _ = gettext.gettext @@ -46,11 +42,10 @@ self.has_bitrate = True self.framerate = 25.0 - self.properties.noise_sensitivity = 0 self.properties.keyframe_delta = 2.0 self.properties.bitrate = 400 self.properties.quality = 16 - self.properties.sharpness = 0 + self.properties.speed = 3 def getProperties(self): properties = super(TheoraVideoEncoder, self).getProperties() @@ -62,9 +57,6 @@ else: raise AssertionError - properties.noise_sensitivity = max( - int(properties.noise_sensitivity * (32768 / 100.)), 1) - # convert the human-friendly delta to maxdistance # FIXME: I think the theora-encoder component should not expose # the theora element properties directly, but just have keyframe-delta @@ -97,17 +89,15 @@ def setup(self): self.bitrate.data_type = int self.quality.data_type = int - self.noise_sensitivity.data_type = int self.keyframe_delta.data_type = float - self.sharpness.data_type = int + self.speed_type = int self.has_quality.data_type = bool self.has_bitrate.data_type = bool self.add_proxy(self.model, ['has_quality', 'has_bitrate']) self.add_proxy(self.model.properties, - ['bitrate', 'quality', 'keyframe_delta', - 'noise_sensitivity', 'sharpness']) + ['bitrate', 'quality', 'keyframe_delta', 'speed']) # we specify keyframe_delta in seconds, but theora expects # a number of frames, so we need the framerate and calculate diff -Nru flumotion-0.6.1/flumotion/component/encoders/vorbis/__init__.py flumotion-0.9.1/flumotion/component/encoders/vorbis/__init__.py --- flumotion-0.6.1/flumotion/component/encoders/vorbis/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/vorbis/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/encoders/vorbis/vorbis010.py flumotion-0.9.1/flumotion/component/encoders/vorbis/vorbis010.py --- flumotion-0.6.1/flumotion/component/encoders/vorbis/vorbis010.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/vorbis/vorbis010.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -25,12 +21,14 @@ from flumotion.component import feedcomponent from vorbisutils import get_max_sample_rate, get_preferred_sample_rate -__version__ = "$Rev: 7889 $" +__version__ = "$Rev$" -class Vorbis(feedcomponent.ParseLaunchComponent): +class Vorbis(feedcomponent.EncoderComponent): checkTimestamp = True checkOffset = True + # Add a tolerance of 20ms to audiorate to fix cracking audio + DEFAULT_TOLERANCE = 20000000 #20ms def do_check(self): self.debug('running Vorbis check') @@ -52,21 +50,26 @@ resampler = 'audioresample' if gstreamer.element_factory_exists('legacyresample'): resampler = 'legacyresample' - return ('%s name=ar ! audioconvert ! capsfilter name=cf ' + return ('audiorate name=art ! ' + '%s name=ar ! audioconvert ! capsfilter name=cf ' '! vorbisenc name=enc' % resampler) def configure_pipeline(self, pipeline, properties): enc = pipeline.get_by_name('enc') cf = pipeline.get_by_name('cf') ar = pipeline.get_by_name('ar') + art = pipeline.get_by_name('art') - assert enc and cf and ar + assert enc and cf and ar and art if self.bitrate > -1: enc.set_property('bitrate', self.bitrate) else: enc.set_property('quality', self.quality) + if gstreamer.element_has_property(art, 'tolerance'): + art.set_property('tolerance', self.DEFAULT_TOLERANCE) + pad = ar.get_pad('sink') handle = None @@ -76,18 +79,19 @@ in_rate = caps[0]['rate'] # now do necessary filtercaps - rate = in_rate + self.rate = in_rate if self.bitrate > -1: maxsamplerate = get_max_sample_rate( self.bitrate, self.channels) if in_rate > maxsamplerate: - rate = get_preferred_sample_rate(maxsamplerate) + self.rate = get_preferred_sample_rate(maxsamplerate) self.debug( 'rate %d > max rate %d (for %d kbit/sec), ' 'selecting rate %d instead' % ( - in_rate, maxsamplerate, self.bitrate, rate)) + in_rate, maxsamplerate, self.bitrate, self.rate)) - caps_str = 'audio/x-raw-float, rate=%d, channels=%d' % (rate, + + caps_str = 'audio/x-raw-float, rate=%d, channels=%d' % (self.rate, self.channels) cf.set_property('caps', gst.caps_from_string(caps_str)) @@ -95,3 +99,15 @@ return True handle = pad.add_buffer_probe(buffer_probe) + + def modify_property_Bitrate(self, value): + if not self.checkPropertyType('bitrate', value, int): + return False + maxsamplerate = get_max_sample_rate(value, self.channels) + if self.rate > maxsamplerate: + self.warning("Could not set property 'bitrate' on the theora " + "encoder: rate %d > max rate %d (for %d kbit/sec)" % ( + self.rate, maxsamplerate, value)) + return False + self.modify_element_property('enc', 'bitrate', value, needs_reset=True) + return True diff -Nru flumotion-0.6.1/flumotion/component/encoders/vorbis/vorbis.py flumotion-0.9.1/flumotion/component/encoders/vorbis/vorbis.py --- flumotion-0.6.1/flumotion/component/encoders/vorbis/vorbis.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/vorbis/vorbis.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst from vorbis010 import Vorbis -__version__ = "$Rev: 6125 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/encoders/vorbis/vorbisutils.py flumotion-0.9.1/flumotion/component/encoders/vorbis/vorbisutils.py --- flumotion-0.6.1/flumotion/component/encoders/vorbis/vorbisutils.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/vorbis/vorbisutils.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,25 +1,21 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" def get_preferred_sample_rate(maxrate): diff -Nru flumotion-0.6.1/flumotion/component/encoders/vorbis/wizard_gtk.py flumotion-0.9.1/flumotion/component/encoders/vorbis/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/encoders/vorbis/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/vorbis/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -28,7 +24,7 @@ from flumotion.admin.assistant.models import AudioEncoder from flumotion.admin.gtk.basesteps import AudioEncoderStep -__version__ = "$Rev: 7268 $" +__version__ = "$Rev$" _ = gettext.gettext diff -Nru flumotion-0.6.1/flumotion/component/encoders/vp8/__init__.py flumotion-0.9.1/flumotion/component/encoders/vp8/__init__.py --- flumotion-0.6.1/flumotion/component/encoders/vp8/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/vp8/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/encoders/vp8/vp8.py flumotion-0.9.1/flumotion/component/encoders/vp8/vp8.py --- flumotion-0.6.1/flumotion/component/encoders/vp8/vp8.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/vp8/vp8.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,77 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from flumotion.common import messages, errors +from flumotion.common.i18n import N_, gettexter +from flumotion.component import feedcomponent + + +__version__ = "$Rev$" +T_ = gettexter() + + +class VP8(feedcomponent.EncoderComponent): + checkTimestamp = True + checkOffset = True + + def check_properties(self, props, addMessage): + + def check_limit(prop_name, lower_limit, upper_limit): + val = props.get(prop_name, None) + if val is None: + return + if val < lower_limit or val > upper_limit: + msg = messages.Error(T_(N_( + "The configuration property '%s' can only take " + "values from %d to %d"), + prop_name, lower_limit, upper_limit), mid='config') + addMessage(msg) + raise errors.ConfigError(msg) + + check_limit('speed', 0, 7) + check_limit('threads', 1, 64) + + def get_pipeline_string(self, properties): + return "ffmpegcolorspace ! vp8enc name=encoder" + + def configure_pipeline(self, pipeline, properties): + element = pipeline.get_by_name('encoder') + + props = (('bitrate', 'bitrate', 400), + ('quality', 'quality', None), + ('speed', 'speed', 2), + ('threads', 'threads', 4), + ('keyframe-maxdistance', 'max-keyframe-distance', 50)) + + for pproperty, eproperty, default in props: + if eproperty is None: + eproperty = properties + + if not pproperty in properties and default is None: + continue + + value = properties.get(pproperty, default) + self.debug('Setting GStreamer property %s to %r' % ( + eproperty, value)) + + element.set_property(eproperty, value) + + def modify_property_Bitrate(self, value): + if not self.checkPropertyType('bitrate', value, int): + return False + self.modify_element_property('encoder', 'bitrate', value) + return True diff -Nru flumotion-0.6.1/flumotion/component/encoders/vp8/vp8.xml flumotion-0.9.1/flumotion/component/encoders/vp8/vp8.xml --- flumotion-0.6.1/flumotion/component/encoders/vp8/vp8.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/vp8/vp8.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/encoders/vp8/wizard.glade flumotion-0.9.1/flumotion/component/encoders/vp8/wizard.glade --- flumotion-0.6.1/flumotion/component/encoders/vp8/wizard.glade 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/vp8/wizard.glade 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,171 @@ + + + + + + window1 + + + True + 3 + 3 + 6 + 6 + + + True + 0 + kbit/s + + + 2 + 3 + GTK_FILL + + + + + + True + True + 400 0 4000 1 10 10 + 1 + + + 1 + 2 + GTK_FILL + + + + + + True + False + True + 16 0 63 1 10 10 + 1 + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + Bit _rate: + True + True + False + True + True + + + + GTK_FILL + + + + + + _Quality: + True + True + False + True + True + has_bitrate + + + + 1 + 2 + GTK_FILL + + + + + + True + True + + + True + 6 + 3 + 6 + 6 + + + True + True + A shorter time between key frames reduces playback latency at the cost of a higher bit rate or lower quality. + 2 0 60 0.039999999105899998 1 1 + 1 + 3 + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + seconds + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Time between _key frames: + True + keyframe_delta + + + GTK_FILL + + 12 + + + + + + + True + Advanced settings + + + label_item + + + + + 3 + 2 + 3 + GTK_FILL + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/encoders/vp8/wizard_gtk.py flumotion-0.9.1/flumotion/component/encoders/vp8/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/encoders/vp8/wizard_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/encoders/vp8/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,129 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gettext +import os + +from zope.interface import implements + +from flumotion.admin.assistant.interfaces import IEncoderPlugin +from flumotion.admin.assistant.models import VideoEncoder +from flumotion.common.fraction import fractionAsFloat +from flumotion.admin.gtk.basesteps import VideoEncoderStep + +__version__ = "$Rev$" +_ = gettext.gettext + + +class VP8VideoEncoder(VideoEncoder): + """ + @ivar framerate: number of frames per second; to be set by view + @type framerate: float + """ + componentType = 'vp8-encoder' + + def __init__(self): + super(VP8VideoEncoder, self).__init__() + self.has_quality = False + self.has_bitrate = True + self.framerate = 25.0 + + self.properties.keyframe_delta = 2.0 + self.properties.bitrate = 400 + self.properties.quality = 16 + + def getProperties(self): + properties = super(VP8VideoEncoder, self).getProperties() + if self.has_bitrate: + del properties.quality + properties.bitrate *= 1000 + elif self.has_quality: + del properties.bitrate + else: + raise AssertionError + + # convert the human-friendly delta to maxdistance + properties.keyframe_maxdistance = int(properties.keyframe_delta * + self.framerate) + del properties.keyframe_delta + + self.debug('keyframe_maxdistance: %r', + properties.keyframe_maxdistance) + + return properties + + +class VP8Step(VideoEncoderStep): + name = 'VP8Encoder' + title = _('VP8 Encoder') + sidebarName = _('VP8') + gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'wizard.glade') + componentType = 'vp8' + docSection = 'help-configuration-assistant-encoder-vp8' + docAnchor = '' + docVersion = 'local' + + # WizardStep + + def setup(self): + self.bitrate.data_type = int + self.quality.data_type = int + self.keyframe_delta.data_type = float + self.has_quality.data_type = bool + self.has_bitrate.data_type = bool + + self.add_proxy(self.model, + ['has_quality', 'has_bitrate']) + self.add_proxy(self.model.properties, + ['bitrate', 'quality', 'keyframe_delta']) + + # we specify keyframe_delta in seconds, but vp8 expects + # a number of frames, so we need the framerate and calculate + # we need to go through the Step (which is the view) because models + # don't have references to other models + producer = self.wizard.getScenario().getVideoProducer(self.wizard) + self.model.framerate = fractionAsFloat(producer.getFramerate()) + self.debug('Framerate of video producer: %r' % self.model.framerate) + step = 1 / self.model.framerate + page = 1.0 + self.keyframe_delta.set_increments(step, page) + + def workerChanged(self, worker): + self.model.worker = worker + self.wizard.requireElements(worker, 'vp8enc') + + # Callbacks + + def on_radiobutton_toggled(self, button): + # This is bound to both radiobutton_bitrate and radiobutton_quality + self.bitrate.set_sensitive(self.has_bitrate.get_active()) + self.quality.set_sensitive(self.has_quality.get_active()) + + self.model.has_bitrate = self.has_bitrate.get_active() + self.model.has_quality = self.has_quality.get_active() + + +class VP8WizardPlugin(object): + implements(IEncoderPlugin) + + def __init__(self, wizard): + self.wizard = wizard + self.model = VP8VideoEncoder() + + def getConversionStep(self): + return VP8Step(self.wizard, self.model) diff -Nru flumotion-0.6.1/flumotion/component/feedcomponent010.py flumotion-0.9.1/flumotion/component/feedcomponent010.py --- flumotion-0.6.1/flumotion/component/feedcomponent010.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/feedcomponent010.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -32,21 +28,27 @@ from flumotion.common.i18n import N_, gettexter from flumotion.common.planet import moods from flumotion.component import component as basecomponent -from flumotion.component import feed, padmonitor +from flumotion.component import padmonitor from flumotion.component.feeder import Feeder from flumotion.component.eater import Eater -__version__ = "$Rev: 7901 $" +__version__ = "$Rev$" T_ = gettexter() class FeedComponent(basecomponent.BaseComponent): """ I am a base class for all Flumotion feed components. + + @type eaters: dict of str -> L{Eater} + @type feeders: dict of str -> L{Feeder} """ # how often to update the UIState feeder statistics FEEDER_STATS_UPDATE_FREQUENCY = 12.5 + keepStreamheaderForLater = False + dropStreamHeaders = True + swallowNewSegment = True logCategory = 'feedcomponent' @@ -58,6 +60,7 @@ self.eaters = {} # eater eaterAlias -> Eater self.uiState.addListKey('feeders') self.uiState.addListKey('eaters') + self.uiState.addKey('gst-debug') self.pipeline = None self.pipeline_signals = [] @@ -121,6 +124,7 @@ self.connect_feeders(pipeline) self.set_pipeline(pipeline) + self.uiState.set('gst-debug', os.environ.get('GST_DEBUG', '*:0')) self.debug("FeedComponent.do_setup(): setup finished") self.try_start_pipeline() @@ -162,7 +166,19 @@ raise errors.ComponentError("No such feeder %s" % feederName) pad = element.get_pad('src') - self._pad_monitors.attach(pad, elementName) + self._pad_monitors.attach(pad, "%s:%s" % (self.name, elementName)) + + def attachPadMonitorToElement(self, elementName, + setActive=None, setInactive=None): + element = self.pipeline.get_by_name(elementName) + if not element: + raise error.ComponentError("No such element %s" % elementName) + pad = element.get_pad('src') + name = "%s:%s" % (self.name, elementName) + self._pad_monitors.attach(pad, name) + + if setActive and setInactive: + self._pad_monitors[name].addWatch(setActive, setInactive) ### FeedComponent methods @@ -233,6 +249,10 @@ if src == self.pipeline: old, new, pending = message.parse_state_changed() self._change_monitor.state_changed(old, new) + dump_filename = "%s.%s_%s" % (self.name, + gst.element_state_get_name(old), + gst.element_state_get_name(new)) + self.dump_gstreamer_debug_dot_file(dump_filename, True) def error(): gerror, debug = message.parse_error() @@ -292,12 +312,25 @@ prevTs = s["prev-timestamp"] prevDuration = s["prev-duration"] curTs = s["cur-timestamp"] + + if prevTs == gst.CLOCK_TIME_NONE: + self.debug("no previous timestamp") + return + if prevDuration == gst.CLOCK_TIME_NONE: + self.debug("no previous duration") + return + if curTs == gst.CLOCK_TIME_NONE: + self.debug("no current timestamp") + return + discont = curTs - (prevTs + prevDuration) dSeconds = discont / float(gst.SECOND) - self.debug("we have a discont on eater %s of %f s " + self.debug("we have a discont on eater %s of %.9f s " "between %s and %s ", eater.eaterAlias, - dSeconds, gst.TIME_ARGS(prevTs + prevDuration), + dSeconds, + gst.TIME_ARGS(prevTs + prevDuration), gst.TIME_ARGS(curTs)) + eater.timestampDiscont(dSeconds, float(curTs) / float(gst.SECOND)) @@ -351,7 +384,9 @@ self.info("Subsequent new segment event received on " "depay on eater %s", eater.eaterAlias) # swallow (gulp) - return False + eater.streamheader = [] + if self.swallowNewSegment: + return False else: eater._gotFirstNewSegment = True return True @@ -399,11 +434,12 @@ for eater in self.eaters.values(): self.install_eater_event_probes(eater) pad = self.get_element(eater.elementName).get_pad('src') - self._pad_monitors.attach(pad, eater.elementName, + name = "%s:%s" % (self.name, eater.elementName) + self._pad_monitors.attach(pad, name, padmonitor.EaterPadMonitor, self.reconnectEater, eater.eaterAlias) - eater.setPadMonitor(self._pad_monitors[eater.elementName]) + eater.setPadMonitor(self._pad_monitors[name]) def stop_pipeline(self): if not self.pipeline: @@ -437,7 +473,7 @@ # clean up checkEater callLaters for eater in self.eaters.values(): - self._pad_monitors.remove(eater.elementName) + self._pad_monitors.remove("%s:%s" % (self.name, eater.elementName)) eater.setPadMonitor(None) def do_stop(self): @@ -525,6 +561,22 @@ else: return defer.maybeDeferred(pipelinePaused, None) + def dump_gstreamer_debug_dot_file(self, filename, with_timestamp=False): + """ + Dumps a graphviz dot file of the pipeline's current state to disk. + This will only actually do anything if the environment variable + GST_DEBUG_DUMP_DOT_DIR is set. + + @param filename: filename to store + @param with_timestamp: if True, then timestamp will be prepended to + filename + """ + if hasattr(gst, "DEBUG_BIN_TO_DOT_FILE"): + method = gst.DEBUG_BIN_TO_DOT_FILE + if with_timestamp: + method = gst.DEBUG_BIN_TO_DOT_FILE_WITH_TS + method(self.pipeline, gst.DEBUG_GRAPH_SHOW_ALL, filename) + ### BaseComponent interface implementation def try_start_pipeline(self, force=False): @@ -624,6 +676,82 @@ return value + def modify_element_property(self, element_name, property_name, value, + mutable_state=gst.STATE_READY, + needs_reset=False): + ''' + Sets a property on the fly on a gstreamer element + + @param element_name: Name of the gstreamer element + @type element_name: str + @param property_name: Name of the property to change + @type property_name: str + @param value: Value to set + @param mutable_state: Minimum state required to set the property + @type mutable_state: L{gst.Enum} + @param needs_reset: Whether setting this property requires sending a + 'flumotion-reset' event + @type needs_reset: bool + ''' + + def drop_stream_headers(pad, buf): + if buf.flag_is_set(gst.BUFFER_FLAG_IN_CAPS): + return False + pad.remove_buffer_probe(probes[pad]) + return True + + probes = {} + element = self.get_element(element_name) + if not element: + self.warning("The property %s cannot be set because the " + "element %s could not be found", + property_name, element_name) + return + + state = self.pipeline.get_state(0)[1] + + # get the peer pad for each sink pad + sink_pads = [p.get_peer() for p in element.pads() + if p.get_direction() == gst.PAD_SINK] + src_pads = [p for p in element.pads() + if p.get_direction() == gst.PAD_SRC] + + # Iterate over all the sink pads and block them + for pad in sink_pads: + pad.set_blocked(True) + + # If the state of the element is above the mutable state of the + # property, we need to change its state to the mutable one, block the + # sink pads, set the property, unblock the sink pads and set the + # element's state back to its original state + if state > mutable_state: + element.set_state(mutable_state) + element.get_state(0) + + element.set_property(property_name, value) + + # If the property change cause creating new streamheaders, + # sending a 'flumotion-reset' event is needed to instruct the + # downstream elements like muxers to reset them self + if needs_reset: + for pad in src_pads: + pad.push_event(gstreamer.flumotion_reset_event()) + + # If a reset is not needed we must make sure to drop the duplicated + # streamheaders, iterating over all the src pads and installing a + # pad_probe to drop them. (eg: theora restarted after a bitrate change + # re-sending the headers again) + else: + for pad in src_pads: + probes[pad] = pad.add_buffer_probe(drop_stream_headers) + + if state > mutable_state: + element.set_state(state) + + # Unblock all sink pads + for pad in sink_pads: + pad.set_blocked(False) + def set_element_property(self, element_name, property, value): 'Sets a property on an element in the GStreamer pipeline.' self.debug("%s: setting property %s of element %s to %s" % ( @@ -742,6 +870,52 @@ def _block_cb(pad, blocked): pass srcpad.set_blocked_async(True, _block_cb) + # add buffer probe to drop buffers that are flagged as IN_CAPS + # needs to be done to gdpdepay's src pad + depay = self.get_element(eater.depayName) + + def remove_in_caps_buffers(pad, buffer, eater): + if buffer.flag_is_set(gst.BUFFER_FLAG_IN_CAPS): + if self.keepStreamheaderForLater: + self.log("We got buffer with IN_CAPS which we are " + "keeping for later %r", eater) + eater.streamheader.append(buffer) + return False + self.info("We got streamheader buffer which " \ + "we are dropping because we do not want this just " \ + "after a reconnect because it breaks everything ") + return False + + # now we have a buffer with no flag set + # we should remove the handler + self.log("We got buffer with no in caps flag set on " + "eater %r", eater) + if eater.streamheaderBufferProbeHandler: + self.log("Removing buffer probe on depay src pad on " + "eater %r", eater) + pad.remove_buffer_probe( + eater.streamheaderBufferProbeHandler) + eater.streamheaderBufferProbeHandler = None + else: + self.warning("buffer probe handler is None, bad news on " + "eater %r", eater) + + if not self.dropStreamHeaders: + self.log("Pushing earlier buffers with IN_CAPS flag") + for buff in eater.streamheader: + pad.push(buff) + self.dropStreamHeaders = True + + eater.streamheader = [] + return True + + if not eater.streamheaderBufferProbeHandler: + self.log("Adding buffer probe on depay src pad on " + "eater %r", eater) + eater.streamheaderBufferProbeHandler = \ + depay.get_pad("src").add_buffer_probe( + remove_in_caps_buffers, eater) + self.unblock_eater(eaterAlias) # Now, we can switch FD with this mess diff -Nru flumotion-0.6.1/flumotion/component/feedcomponent.py flumotion-0.9.1/flumotion/component/feedcomponent.py --- flumotion-0.6.1/flumotion/component/feedcomponent.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/feedcomponent.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -33,7 +29,6 @@ from twisted.spread import pb from zope.interface import implements -from flumotion.configure import configure from flumotion.component import component as basecomponent from flumotion.component import feed from flumotion.common import common, interfaces, errors, log, pygobject, \ @@ -43,7 +38,7 @@ from flumotion.common.planet import moods from flumotion.common.pygobject import gsignal -__version__ = "$Rev: 7970 $" +__version__ = "$Rev$" T_ = gettexter() @@ -110,6 +105,8 @@ else: gst.debug_set_default_threshold(value) + self.comp.uiState.set('gst-debug', debug) + def remote_eatFrom(self, eaterAlias, fullFeedId, host, port): """ Tell the component the host and port for the FeedServer through which @@ -274,6 +271,9 @@ self.debug("effect: result: %r" % result) return result + def remote_dumpGstreamerDotFile(self, filename): + self.comp.dump_gstreamer_debug_dot_file(filename) + from feedcomponent010 import FeedComponent FeedComponent.componentMediumClass = FeedComponentMedium @@ -343,7 +343,8 @@ self.warning('Could not parse pipeline: %s' % e.message) m = messages.Error(T_(N_( "GStreamer error: could not parse component pipeline.")), - debug=e.message) + debug="Reason: %s\nPipeline: %s" % ( + e.message, self.pipeline_string)) self.addMessage(m) raise errors.PipelineParseError(e.message) @@ -434,6 +435,13 @@ return ''.join(out) def parse_pipeline(self, pipeline): + """ + Parse the pipeline template into a fully expanded pipeline string. + + @type pipeline: str + + @rtype: str + """ pipeline = " ".join(pipeline.split()) self.debug('Creating pipeline, template is %s', pipeline) @@ -473,6 +481,32 @@ """ return '!' + def get_eater_srcpad(self, eaterAlias): + """ + Method that returns the source pad of the final element in an eater. + + @returns: the GStreamer source pad of the final element in an eater + @rtype: L{gst.Pad} + """ + e = self.eaters[eaterAlias] + identity = self.get_element(e.elementName + '-identity') + depay = self.get_element(e.depayName) + srcpad = depay.get_pad("src") + if identity: + srcpad = identity.get_pad("src") + return srcpad + + def get_feeder_sinkpad(self, feederAlias): + """ + Method that returns the sink pad of the first element in a feeder + + @returns: the GStreamer sink pad of the first element in a feeder + @rtype: L{gst.Pad} + """ + e = self.feeders[feederAlias] + gdppay = self.get_element(e.elementName + '-pay') + return gdppay.get_static_pad("sink") + class Effect(log.Loggable): """ @@ -522,12 +556,68 @@ return self.component +class PostProcEffect (Effect): + """ + I am an effect that is plugged in the pipeline to do a post processing + job and can be chained to other effect of the same class. + + @ivar name: name of the effect + @type name: string + @ivar component: component owning the effect + @type component: L{FeedComponent} + @ivar sourcePad: pad of the source after which I'm plugged + @type sourcePad: L{GstPad} + @ivar effectBin: gstreamer bin doing the post processing effect + @type source: L{GstBin} + @ivar pipeline: pipeline holding the gstreamer elements + @type pipeline: L{GstPipeline} + + """ + logCategory = "effect" + + def __init__(self, name, sourcePad, effectBin, pipeline): + """ + @param name: the name of the effect + @param sourcePad: pad of the source after which I'm plugged + @param effectBin: gstreamer bin doing the post processing effect + @param pipeline: pipeline holding the gstreamer elements + """ + Effect.__init__(self, name) + self.sourcePad = sourcePad + self.effectBin = effectBin + self.pipeline = pipeline + self.plugged = False + + def plug(self): + """ + Plug the effect in the pipeline unlinking the source element with it's + downstream peer + """ + if self.plugged: + return + # Unlink the source pad of the source element after which we need + # are going to be plugged + peerSinkPad = self.sourcePad + peerSrcPad = peerSinkPad.get_peer() + peerSinkPad.unlink(peerSrcPad) + + # Add the deinterlacer bin to the pipeline + self.effectBin.set_state(gst.STATE_PLAYING) + self.pipeline.add(self.effectBin) + + # link it with the element src pad and its peer's sink pad + peerSinkPad.link(self.effectBin.get_pad('sink')) + self.effectBin.get_pad('src').link(peerSrcPad) + self.plugged = True + + class MultiInputParseLaunchComponent(ParseLaunchComponent): """ This class provides for multi-input ParseLaunchComponents, such as muxers, with a queue attached to each input. """ QUEUE_SIZE_BUFFERS = 16 + LINK_MUXER = True def get_muxer_string(self, properties): """ @@ -556,7 +646,9 @@ pipeline = '' for e in eaters: for feed, alias in eaters[e]: - pipeline += '@ eater:%s @ ! muxer. ' % alias + pipeline += '@ eater:%s @ ' % alias + if self.LINK_MUXER: + pipeline += ' ! muxer. ' pipeline += self.get_muxer_string(properties) + ' ' @@ -594,3 +686,325 @@ pad.set_blocked_async(False, _block_cb) signalid = queue.connect("underrun", _underrun_cb) + + +class ReconfigurableComponent(ParseLaunchComponent): + + disconnectedPads = False + + def _get_base_pipeline_string(self): + """Should be overrided by subclasses to provide the pipeline the + component uses. + """ + return "" + + def init(self): + self.EATER_TMPL += ' ! queue name=input-%(name)s' + self._reset_count = 0 + + self.uiState.addKey('reset-count', 0) + + def setup_completed(self): + ParseLaunchComponent.setup_completed(self) + self._install_changes_probes() + + # Public methods + + def get_output_elements(self): + return [self.get_element(f.elementName + '-pay') + for f in self.feeders.values()] + + def get_input_elements(self): + return [self.get_element('input-' + f.elementName) + for f in self.eaters.values()] + + def get_base_pipeline_string(self): + raise NotImplementedError('Subclasses should implement ' + 'get_base_pipeline_string') + + def get_eater_srcpad(self, eaterAlias): + e = self.eaters[eaterAlias] + inputq = self.get_element('input-' + e.elementName) + return inputq.get_pad('src') + + # Private methods + + def _install_changes_probes(self): + """ + Add the event probes that will check for the flumotion-reset event. + + Those will trigger the pipeline's blocking and posterior reload + """ + # FIXME: Add documentation + + def input_reset_event(pad, event): + if event.type != gst.EVENT_CUSTOM_DOWNSTREAM: + return True + if not gstreamer.event_is_flumotion_reset(event): + return True + if self.disconnectedPads: + return False + + self.log('RESET: in reset event received on input pad %r', pad) + self._reset_count = len(self.feeders) + # Block all the eaters and send an eos downstream the pipeline to + # drain all the elements. It will also unlink the pipeline from the + # input queues. + self._block_eaters() + # Do not propagate the event. It is sent from the other side of + # the pipeline after it has been drained. + return False + + def output_reset_event(pad, event): + if event.type != gst.EVENT_EOS: + return True + + self.log('RESET: out reset event received on output pad %r', pad) + # TODO: Can we use EVENT_FLUSH_{START,STOP} for the same purpose? + # The component only waits for the first eos to come. After that + # all the elements inside the pipeline will be down and won't + # process any more events. + # Pads cannot be blocked from the streaming thread. They have to be + # manipulated from outside according gstreamer's documentation + self._reset_count -= 1 + if self._reset_count > 0: + return False + + self._send_reset_event() + reactor.callFromThread(self._on_pipeline_drained) + # Do not let the eos pass. + return False + + self.log('RESET: installing event probes for detecting changes') + # Listen for incoming flumotion-reset events on eaters + for elem in self.get_input_elements(): + self.debug('RESET: adding event probe for %s', elem.get_name()) + elem.get_pad('sink').add_event_probe(input_reset_event) + + for elem in self.get_output_elements(): + self.debug('RESET: adding event probe for %s', elem.get_name()) + elem.get_pad('sink').add_event_probe(output_reset_event) + + def _block_eaters(self): + """ + Function that blocks all the identities of the eaters + """ + for elem in self.get_input_elements(): + pad = elem.get_pad('src') + self.debug("RESET: Blocking pad %s", pad) + pad.set_blocked_async(True, self._on_eater_blocked) + + def _unblock_eaters(self): + for elem in self.get_input_elements(): + pad = elem.get_pad('src') + self.debug("RESET: Unblocking pad %s", pad) + pad.set_blocked_async(False, self._on_eater_blocked) + + def _send_reset_event(self): + for elem in self.get_output_elements(): + pad = elem.get_pad('sink') + pad.send_event(gstreamer.flumotion_reset_event()) + + def _unlink_pads(self, element, directions): + for pad in element.pads(): + ppad = pad.get_peer() + if not ppad: + continue + if (pad.get_direction() in directions and + pad.get_direction() == gst.PAD_SINK): + self.debug('RESET: unlink %s with %s', pad, ppad) + ppad.unlink(pad) + elif (pad.get_direction() in directions and + pad.get_direction() == gst.PAD_SRC): + self.debug('RESET: unlink %s with %s', pad, ppad) + pad.unlink(ppad) + + def _remove_pipeline(self, pipeline, element, end, done=None): + if done is None: + done = [] + if not element: + return + if element in done: + return + if element in end: + return + + for src in element.src_pads(): + self.log('going to start by pad %r', src) + if not src.get_peer(): + continue + peer = src.get_peer().get_parent() + self._remove_pipeline(pipeline, peer, end, done) + done.append(peer) + element.unlink(peer) + + self.log("RESET: removing old element %s from pipeline", element) + element.set_state(gst.STATE_NULL) + pipeline.remove(element) + + def _rebuild_pipeline(self): + # TODO: Probably this would be easier and clearer if we used a bin to + # wrap the component's functionality.Then the component would only need + # to reset the bin and connect the resulting pads to the {eat,feed}ers. + + self.log('RESET: Going to rebuild the pipeline') + + base_pipe = self._get_base_pipeline_string() + + # Place a fakesrc element so we can know from where to start + # rebuilding the pipeline. + fake_pipeline = 'fakesrc name=start ! %s' % base_pipe + pipeline = gst.parse_launch(fake_pipeline) + + def move_element(element, orig, dest): + if not element: + return + if element in done: + return + + to_link = [] + done.append(element) + self.log("RESET: going to remove %s", element) + for src in element.src_pads(): + self.log("RESET: got src pad element %s", src) + if not src.get_peer(): + continue + peer = src.get_peer().get_parent() + to_link.append(peer) + + move_element(to_link[-1], orig, dest) + + self._unlink_pads(element, [gst.PAD_SRC, gst.PAD_SINK]) + orig.remove(element) + dest.add(element) + + self.log("RESET: new element %s added to the pipeline", element) + for peer in to_link: + self.log("RESET: linking peers %s -> %s", element, peer) + element.link(peer) + + done = [] + start = pipeline.get_by_name('start').get_pad('src').get_peer() + move_element(start.get_parent(), pipeline, self.pipeline) + + # Link eaters to the first element in the pipeline + # By now we there can only be two situations: + # 1. Encoders, where there is only one eater connected to the encoder + # 2. Muxers, where multiple eaters are connected directly to the muxer + # TODO: Probably we'd like the link process to check the caps + if len(self.get_input_elements()) == 1: + elem = self.get_input_elements()[0] + self.log("RESET: linking eater %r to %r", elem, done[0]) + elem.link(done[0]) + + # Link the last element in the pipeline to the feeders. + if len(self.get_output_elements()) == 1: + elem = self.get_output_elements()[0] + self.log("RESET: linking %r to feeder %r", done[-1], elem) + done[-1].link(elem) + + self.configure_pipeline(self.pipeline, self.config['properties']) + self.pipeline.set_state(gst.STATE_PLAYING) + self._unblock_eaters() + + resets = self.uiState.get('reset-count') + self.uiState.set('reset-count', resets+1) + + # Callbacks + + def _on_pad_blocked(self, pad, blocked): + self.log("RESET: Pad %s %s", pad, + (blocked and "blocked") or "unblocked") + + def _on_eater_blocked(self, pad, blocked): + self._on_pad_blocked(pad, blocked) + if blocked: + peer = pad.get_peer() + peer.send_event(gst.event_new_eos()) + #self._unlink_pads(pad.get_parent(), [gst.PAD_SRC]) + + def _on_pipeline_drained(self): + self.debug('RESET: Proceed to unlink pipeline') + start = self.get_input_elements() + end = self.get_output_elements() + done = [] + for element in start: + element = element.get_pad('src').get_peer().get_parent() + self._remove_pipeline(self.pipeline, element, end, done) + self._rebuild_pipeline() + + +class EncoderComponent(ParseLaunchComponent): + """ + Component that is reconfigured when new changes arrive through the + flumotion-reset event (sent by the fms producer). + """ + pass + + +class MuxerComponent(MultiInputParseLaunchComponent): + """ + This class provides for multi-input ParseLaunchComponents, such as muxers, + that handle flumotion-reset events for reconfiguration. + """ + + LINK_MUXER = False + + def get_link_pad(self, muxer, srcpad, caps): + return muxer.get_compatible_pad(srcpad, caps) + + def buffer_probe_cb(self, pad, buffer, depay, eaterAlias): + pad = depay.get_pad("src") + caps = pad.get_negotiated_caps() + if not caps: + return False + srcpad_to_link = self.get_eater_srcpad(eaterAlias) + muxer = self.pipeline.get_by_name("muxer") + self.debug("Trying to get compatible pad for pad %r with caps %s", + srcpad_to_link, caps) + linkpad = self.get_link_pad(muxer, srcpad_to_link, caps) + if not linkpad: + m = messages.Error(T_(N_( + "The incoming data is not compatible with this muxer.")), + debug="Caps %s not compatible with this muxer." % ( + caps.to_string())) + self.addMessage(m) + # this is the streaming thread, cannot set state here + # so we do it in the mainloop + reactor.callLater(0, self.pipeline.set_state, gst.STATE_NULL) + return True + self.debug("Got link pad %r", linkpad) + srcpad_to_link.link(linkpad) + depay.get_pad("src").remove_buffer_probe(self._probes[eaterAlias]) + if srcpad_to_link.is_blocked(): + self.is_blocked_cb(srcpad_to_link, True) + else: + srcpad_to_link.set_blocked_async(True, self.is_blocked_cb) + return True + + def configure_pipeline(self, pipeline, properties): + """ + Method not overridable by muxer subclasses. + """ + # link the muxers' sink pads when data comes in so we get compatible + # sink pads with input data + # gone are the days when we know we only have one pad template in + # muxers + self.fired_eaters = 0 + self._probes = {} # depay element -> id + + for e in self.eaters: + depay = self.get_element(self.eaters[e].depayName) + self._probes[e] = \ + depay.get_pad("src").add_buffer_probe( + self.buffer_probe_cb, depay, e) + + def is_blocked_cb(self, pad, is_blocked): + if is_blocked: + self.fired_eaters = self.fired_eaters + 1 + if self.fired_eaters == len(self.eaters): + self.debug("All pads are now blocked") + self.disconnectedPads = False + for e in self.eaters: + srcpad = self.get_eater_srcpad(e) + srcpad.set_blocked_async(False, self.is_blocked_cb) diff -Nru flumotion-0.6.1/flumotion/component/feeder.py flumotion-0.9.1/flumotion/component/feeder.py --- flumotion-0.6.1/flumotion/component/feeder.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/feeder.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import time @@ -27,7 +23,7 @@ from flumotion.common import componentui -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class Feeder: diff -Nru flumotion-0.6.1/flumotion/component/feed.py flumotion-0.9.1/flumotion/component/feed.py --- flumotion-0.6.1/flumotion/component/feed.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/feed.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_worker_feed -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -33,7 +29,7 @@ from flumotion.common import log, common, interfaces from flumotion.twisted import pb as fpb -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" # copied from fdserver.py so that it can be bundled diff -Nru flumotion-0.6.1/flumotion/component/__init__.py flumotion-0.9.1/flumotion/component/__init__.py --- flumotion-0.6.1/flumotion/component/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/__init__.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ code executed by components in workers and for components in admin clients """ -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/Makefile.am flumotion-0.9.1/flumotion/component/Makefile.am --- flumotion-0.6.1/flumotion/component/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/Makefile.am 2011-09-11 08:09:03.000000000 +0000 @@ -5,6 +5,7 @@ component_PYTHON = \ __init__.py \ component.py \ + decodercomponent.py \ eater.py \ feed.py \ feeder.py \ @@ -20,9 +21,11 @@ SUBDIRS = \ base \ bouncers \ + common \ combiners \ consumers \ converters \ + decoders \ effects \ encoders \ misc \ diff -Nru flumotion-0.6.1/flumotion/component/Makefile.in flumotion-0.9.1/flumotion/component/Makefile.in --- flumotion-0.6.1/flumotion/component/Makefile.in 2009-09-09 11:37:53.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/Makefile.in 2011-09-11 08:09:19.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -144,6 +143,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -153,18 +153,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -212,6 +205,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -229,16 +223,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -246,7 +242,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -261,6 +256,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -293,7 +289,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -318,6 +313,7 @@ component_PYTHON = \ __init__.py \ component.py \ + decodercomponent.py \ eater.py \ feed.py \ feeder.py \ @@ -329,9 +325,11 @@ SUBDIRS = \ base \ bouncers \ + common \ combiners \ consumers \ converters \ + decoders \ effects \ encoders \ misc \ @@ -445,7 +443,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -470,7 +468,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/admin_gtk.py flumotion-0.9.1/flumotion/component/misc/httpserver/admin_gtk.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/admin_gtk.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,36 +1,34 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import time import gettext import os import webbrowser +import gtk from flumotion.common.i18n import N_ -from flumotion.common.format import formatTime, formatStorage, formatTimeStamp +from flumotion.common import format as formatting from flumotion.component.base.admin_gtk import BaseAdminGtk from flumotion.component.base.baseadminnode import BaseAdminGtkNode from flumotion.ui.linkwidget import LinkWidget +from flumotion.component.misc.httpserver.ondemandbrowser import OnDemandBrowser -__version__ = "$Rev: 7618 $" +__version__ = "$Rev$" _ = gettext.gettext @@ -99,30 +97,30 @@ # Private - def _regReqStat(self, name, converter=str, format="%s", default=0): + def _regReqStat(self, name, converter=str, formatString="%s", default=0): widget = self.wtree.get_widget('label-' + name) if not widget: self.warning("FIXME: no widget %s" % name) return - self._reqStats[name] = (widget, converter, format, default) + self._reqStats[name] = (widget, converter, formatString, default) def _refreshStatistics(self, state): for name in self._reqStats: - widget, converter, format, default = self._reqStats[name] + widget, converter, formatString, default = self._reqStats[name] value = state.get(name) if value is not None: - widget.set_text(format % converter(value)) + widget.set_text(formatString % converter(value)) else: - widget.set_text(format % converter(default)) + widget.set_text(formatString % converter(default)) def _updateStatistic(self, name, value): if name not in self._reqStats: return - widget, converter, format, default = self._reqStats[name] + widget, converter, formatString, default = self._reqStats[name] if value is not None: - widget.set_text(format % converter(value)) + widget.set_text(formatString % converter(value)) else: - widget.set_text(format % converter(default)) + widget.set_text(formatString % converter(default)) class ServerStatsAdminGtkNode(StatisticsAdminGtkNode): @@ -175,14 +173,15 @@ # Update the URI uri = state.get('stream-url') if uri is not None: - if not self._link: + if not self._link and uri: self._link = self._createLinkWidget(uri) - else: + elif self._link: self._link.set_uri(uri) + self._link.set_label(uri) # Update Server Uptime uptime = state.get('server-uptime') - self._uptime.set_text(formatTime(uptime)) + self._uptime.set_text(formatting.formatTime(uptime)) # Private @@ -248,10 +247,12 @@ def _formatClientCount(value): if isinstance(value, (int, long)): - format = gettext.ngettext(N_("%d client"), N_("%d clients"), value) + template = gettext.ngettext( + N_("%d client"), N_("%d clients"), value) else: - format = gettext.ngettext(N_("%.2f client"), N_("%.2f clients"), value) - return format % value + template = gettext.ngettext( + N_("%.2f client"), N_("%.2f clients"), value) + return template % value def _formatTimeStamp(value): @@ -263,23 +264,74 @@ def _formatBytes(value): - return formatStorage(value) + _('Byte') + return formatting.formatStorage(value) + _('Byte') def _formatBitrate(value): - return formatStorage(value) + _('bit/s') + return formatting.formatStorage(value) + _('bit/s') def _formatPercent(value): return "%.2f %%" % (value * 100.0) +class BrowserAdminGtkNode(BaseAdminGtkNode): + gladeFile = os.path.join('flumotion', 'component', 'misc', + 'httpserver', 'httpserver.glade') + + def __init__(self, state, admin, title=None): + BaseAdminGtkNode.__init__(self, state, admin, title) + self.browser = self._create_browser() + self._path = self.state.get('config').get('properties').get('path') + + def haveWidgetTree(self): + self.widget = self.wtree.get_widget('browser_vbox') + self.widget.connect('realize', self._on_realize) + self.widget.pack_start(self.browser) + self.browser.show() + self.widget.show_all() + return self.widget + + def setUIState(self, state): + BaseAdminGtkNode.setUIState(self, state) + if self._path and state.hasKey('allow-browsing') \ + and state.get('allow-browsing'): + self.browser.setBaseUri(state.get('stream-url')) + else: + self.browser.hide_all() + warning = gtk.Label() + warning.set_markup(_('Browsing files is not allowed.')) + warning.show() + self.widget.pack_start(warning) + + def _create_browser(self): + browser = OnDemandBrowser(self.widget, self.admin) + worker_name = self.state.get('workerRequested') + browser.setWorkerName(worker_name) + browser.connect('selected', self._on_file_selector__selected) + return browser + + def _configure_browser(self): + if self._path: + self.browser.setRoot(self._path) + + def _on_realize(self, widget): + self._configure_browser() + + def _on_file_selector__selected(self, browser, vfsFile): + webbrowser.open_new(vfsFile.filename) + + class HTTPFileAdminGtk(BaseAdminGtk): def setup(self): statistics = ServerStatsAdminGtkNode(self.state, self.admin, _("Statistics")) + + browser = BrowserAdminGtkNode(self.state, self.admin, + _("Browser")) self.nodes['Statistics'] = statistics + self.nodes['Browser'] = browser #FIXME: We need to figure out how to create or delete # a nodes after receiving the UI State, # so we do not have a cache tab when not using a caching plug. diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/cachedprovider.py flumotion-0.9.1/flumotion/component/misc/httpserver/cachedprovider.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/cachedprovider.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/cachedprovider.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import errno @@ -26,10 +22,11 @@ import threading import time -from twisted.internet import defer, reactor, abstract +from twisted.internet import defer, reactor, threads, abstract -from flumotion.common import log, format, common, python +from flumotion.common import log, common from flumotion.component.misc.httpserver import cachestats +from flumotion.component.misc.httpserver import cachemanager from flumotion.component.misc.httpserver import fileprovider from flumotion.component.misc.httpserver import localpath from flumotion.component.misc.httpserver.fileprovider import FileClosedError @@ -38,23 +35,39 @@ SEEK_SET = 0 # os.SEEK_SET is not defined in python 2.4 -DEFAULT_CACHE_SIZE = 1000 -DEFAULT_CLEANUP_HIGH_WATERMARK = 1.0 -DEFAULT_CLEANUP_LOW_WATERMARK = 0.6 FILE_COPY_BUFFER_SIZE = abstract.FileDescriptor.bufferSize -TEMP_FILE_POSTFIX = ".tmp" MAX_LOGNAME_SIZE = 30 # maximum number of characters to use for logging a path -ID_CACHE_MAX_SIZE = 1024 LOG_CATEGORY = "fileprovider-localcached" -_errorLookup = {errno.ENOENT: NotFoundError, - errno.EISDIR: fileprovider.CannotOpenError, - errno.EACCES: fileprovider.AccessError} + +errnoLookup = {errno.ENOENT: fileprovider.NotFoundError, + errno.EISDIR: fileprovider.CannotOpenError, + errno.EACCES: fileprovider.AccessError} + + +def open_stat(path, mode='rb'): + """ + @rtype: (file, statinfo) + """ + try: + handle = open(path, mode) + fd = handle.fileno() + except IOError, e: + cls = errnoLookup.get(e.errno, fileprovider.FileError) + raise cls("Failed to open file '%s': %s" % (path, str(e))) + try: + info = os.fstat(fd) + except OSError, e: + handle.close() + cls = errnoLookup.get(e.errno, fileprovider.FileError) + raise cls("Failed to stat file '%s': %s" % (path, str(e))) + return handle, info -class FileProviderLocalCachedPlug(fileprovider.FileProviderPlug, log.Loggable): +class FileProviderLocalCachedPlug(fileprovider.FileProviderPlug, + log.Loggable): """ WARNING: Currently does not work properly in combination with rate-control. @@ -82,47 +95,48 @@ def __init__(self, args): props = args['properties'] self._sourceDir = props.get('path') - self._cacheDir = props.get('cache-dir', "/tmp") - cacheSizeInMB = int(props.get('cache-size', DEFAULT_CACHE_SIZE)) - self._cacheSize = cacheSizeInMB * 10 ** 6 # in bytes - self._cleanupEnabled = props.get('cleanup-enabled', True) - highWatermark = props.get('cleanup-high-watermark', - DEFAULT_CLEANUP_HIGH_WATERMARK) - highWatermark = max(0.0, min(1.0, float(highWatermark))) - lowWatermark = props.get('cleanup-low-watermark', - DEFAULT_CLEANUP_LOW_WATERMARK) - lowWatermark = max(0.0, min(1.0, float(lowWatermark))) - self._identifiers = {} # {path: identifier} + cacheDir = props.get('cache-dir') + cacheSizeInMB = props.get('cache-size') + if cacheSizeInMB is not None: + cacheSize = cacheSizeInMB * 10 ** 6 # in bytes + else: + cacheSize = None + cleanupEnabled = props.get('cleanup-enabled') + cleanupHighWatermark = props.get('cleanup-high-watermark') + cleanupLowWatermark = props.get('cleanup-low-watermark') + self._sessions = {} # {CopySession: None} self._index = {} # {path: CopySession} - self.info("Cached file provider initialized") - self.debug("Source directory: '%s'", self._sourceDir) - self.debug("Cache directory: '%s'", self._cacheDir) - self.debug("Cache size: %d bytes", self._cacheSize) - self.debug("Cache cleanup enabled: %s", self._cleanupEnabled) - - common.ensureDir(self._sourceDir, "source") - common.ensureDir(self._cacheDir, "cache") - - self._cacheUsage = None # in bytes - self._cacheUsageLastUpdate = None - self._lastCacheTime = None - self._cacheMaxUsage = self._cacheSize * highWatermark # in bytes - self._cacheMinUsage = self._cacheSize * lowWatermark # in bytes self.stats = cachestats.CacheStatistics() - # Initialize cache usage - self.updateCacheUsage() + self.cache = cachemanager.CacheManager(self.stats, + cacheDir, cacheSize, + cleanupEnabled, + cleanupHighWatermark, + cleanupLowWatermark) + + common.ensureDir(self._sourceDir, "source") # Startup copy thread self._thread = CopyThread(self) def start(self, component): - self._thread.start() + self.debug('Starting cachedprovider plug for component %r', component) + d = self.cache.setUp() + d.addCallback(lambda x: self._thread.start()) + return d def stop(self, component): + self.debug('Stopping cachedprovider plug for component %r', component) self._thread.stop() + dl = [] + for s in self._index.values(): + d = s.close() + if d: + dl.append(d) + if len(dl) != 0: + return defer.DeferredList(dl) def startStatsUpdates(self, updater): #FIXME: This is temporary. Should be done with plug UI. @@ -157,159 +171,6 @@ basename = basename[:prefixMaxLen-1] + "*" return basename + postfix - def getIdentifier(self, path): - """ - Returns an identifier for a path. - The identifier is a digest of the path encoded in hex string. - The hash function used is SHA1. - It caches the identifiers in a dictionary indexed by path and with - a maximum number of entry specified by the constant ID_CACHE_MAX_SIZE. - """ - ident = self._identifiers.get(path, None) - if ident is None: - hash = python.sha1() - hash.update(path) - ident = hash.digest().encode("hex").strip('\n') - # Prevent the cache from growing endlessly - if len(self._identifiers) >= ID_CACHE_MAX_SIZE: - self._identifiers.clear() - self._identifiers[path] = ident - return ident - - def getCachePath(self, path): - ident = self.getIdentifier(path) - return os.path.join(self._cacheDir, ident) - - def getTempPath(self, path): - ident = self.getIdentifier(path) - return os.path.join(self._cacheDir, ident + TEMP_FILE_POSTFIX) - - def updateCacheUsageStatistics(self): - self.stats.onEstimateCacheUsage(self._cacheUsage, self._cacheSize) - - def updateCacheUsage(self): - """ - @returns: the cache usage, in bytes - """ - # Only calculate cache usage if the cache directory - # modification time changed since the last time we looked at it. - cacheTime = os.path.getmtime(self._cacheDir) - if ((self._cacheUsage is None) or (self._lastCacheTime < cacheTime)): - self._lastCacheTime = cacheTime - os.chdir(self._cacheDir) - - # There's a possibility here that we got the filename from - # os.listdir, but before we get to os.stat, the file is gone. We'll - # get a OSError with a ENOENT errno and we should ignore that file, - # since we're just estimating the amount of space taken by the - # cache - sizes = [] - for f in os.listdir('.'): - try: - sizes.append(os.path.getsize(f)) - except OSError, e: - if e.errno == errno.ENOENT: - pass - else: - raise - - self._cacheUsage = sum(sizes) - self.updateCacheUsageStatistics() - self._cacheUsageLastUpdate = time.time() - return self._cacheUsage - - def allocateCacheSpace(self, size): - """ - Try to reserve cache space. - - If there is not enough space and the cache cleanup is enabled, - it will delete files from the cache starting with the ones - with oldest access time until the cache usage drops below - the fraction specified by the property cleanup-low-threshold. - - Returns a 'tag' that should be used to 'free' the cache space - using releaseCacheSpace. - This tag is needed to better estimate the cache usage, - if the cache usage has been updated since cache space - has been allocated, freeing up the space should not change - the cache usage estimation. - - @param size: size to reserve, in bytes - @type size: int - - @returns: an allocation tag or None if the allocation failed. - @rtype: tuple - """ - usage = self.updateCacheUsage() - if (usage + size) < self._cacheMaxUsage: - self._cacheUsage += size - self.updateCacheUsageStatistics() - return (self._cacheUsageLastUpdate, size) - - self.debug('cache usage will be %sbytes, need more cache', - format.formatStorage(usage + size)) - - if not self._cleanupEnabled: - self.debug('not allowed to clean up cache, so cannot cache') - # No space available and cleanup disabled: allocation failed. - return None - - # Update cleanup statistics - self.stats.onCleanup() - # List the cached files with file state - os.chdir(self._cacheDir) - - files = [] - for f in os.listdir('.'): - # There's a possibility of getting an error on os.stat here. See - # similar comment in updateCacheUsage() - try: - files.append((f, os.stat(f))) - except OSError, e: - if e.errno == errno.ENOENT: - pass - else: - raise - - # Calculate the cached file total size - usage = sum([d[1].st_size for d in files]) - # Delete the cached file starting by the oldest accessed ones - files.sort(key=lambda d: d[1].st_atime) - for path, info in files: - try: - os.remove(path) - usage -= info.st_size - except OSError, e: - if e.errno == errno.ENOENT: - # Already been deleted by another process, - # but subtract the size anyway - usage -= info.st_size - else: - self.warning("Error cleaning cached file: %s", str(e)) - if usage <= self._cacheMinUsage: - # We reach the cleanup limit - self.debug('cleaned up, cache use is now %sbytes', - format.formatStorage(usage)) - break - - # Update the cache usage - self._cacheUsage = usage - self._cacheUsageLastUpdate = time.time() - if (usage + size) < self._cacheSize: - # There is enough space to allocate, allocation succeed - self._cacheUsage += size - self.updateCacheUsageStatistics() - return (self._cacheUsageLastUpdate, size) - # There is no enough space, allocation failed - self.updateCacheUsageStatistics() - return None - - def releaseCacheSpace(self, tag): - lastUpdate, size = tag - if lastUpdate == self._cacheUsageLastUpdate: - self._cacheUsage -= size - self.updateCacheUsageStatistics() - def getCopySession(self, path): return self._index.get(path, None) @@ -369,18 +230,14 @@ return LocalPath(self.plug, childpath) def open(self): - if not os.path.exists(self.path): - # Delete the cached file and outdate the copying session - self.plug.outdateCopySession(self.path) - self._removeCachedFile(self.path) - raise NotFoundError("Path '%s' not found" % self.path) - return CachedFile(self.plug, self.path, self.mimeType) + f = CachedFile(self.plug, self._path, self.mimeType) + return f.open() ## Private Methods ## def _removeCachedFile(self, sourcePath): - cachePath = self.plug.getCachePath(sourcePath) + cachePath = self.plug.cache.getCachePath(sourcePath) try: os.remove(cachePath) self.debug("Deleted cached file '%s'", cachePath) @@ -461,8 +318,8 @@ self.logName = plug.getLogName(sourcePath, sourceFile.fileno()) self.copying = None # Not yet started self.sourcePath = sourcePath - self.tempPath = plug.getTempPath(sourcePath) - self.cachePath = plug.getCachePath(sourcePath) + self.tempPath = plug.cache.getTempPath(sourcePath) + self.cachePath = plug.cache.getCachePath(sourcePath) # The size and modification time is not supposed to change over time self.mtime = sourceInfo[stat.ST_MTIME] self.size = sourceInfo[stat.ST_SIZE] @@ -477,7 +334,7 @@ self._refCount = 0 self._copied = 0 # None when the file is fully copied self._correction = 0 # Used to take into account copies data for stats - self._startCopying() + self._startCopyingDefer = self._startCopying() def outdate(self): self.log("Copy session outdated") @@ -535,7 +392,7 @@ stats.onBytesRead(len(data), 0, 0) return data except IOError, e: - cls = _errorLookup.get(e.errno, FileError) + cls = errnoLookup.get(e.errno, FileError) raise cls("Failed to read source file: %s" % str(e)) def incRef(self): @@ -548,18 +405,24 @@ if (self._refCount == 1) and self._cancelled: # Cancel the copy and close the writing temporary file. self._cancelCopy(False, True) - # We close if not still copying source file - if (self._refCount == 0) and (self._wTempFile is None): + # We close if the copy is finished (if _copied is None) + if (self._refCount == 0) and (self._copied is None): self.close() + def _close(self): + self.log("Closing copy session") + # Cancel the copy, close the source file and the writing temp file. + self._cancelCopy(True, True) + self._closeReadTempFile() + self.plug.removeCopySession(self) + self.plug = None + def close(self): - if self.plug is not None: - self.log("Closing copy session") - # Cancel the copy, close the source file and the writing temp file. - self._cancelCopy(True, True) - self._closeReadTempFile() - self.plug.removeCopySession(self) - self.plug = None + if self._startCopyingDefer: + d = self._startCopyingDefer + self._startCopyingDefer = None + d.addCallback(lambda _: self._close()) + return d def doServe(self): if not (self.copying and self._pending): @@ -608,7 +471,7 @@ reactor.callFromThread(self._onCopyFinished) cont = False # Check for cancellation - if self._waitCancel: + if self._waitCancel and self.copying: # Copy has been cancelled self.copying = False reactor.callFromThread(self.plug.disableSession, self) @@ -621,15 +484,11 @@ def _allocCacheSpace(self): # Retrieve a cache allocation tag, used to track the cache free space - tag = self.plug.allocateCacheSpace(self.size) - if tag is None: - return False - self._allocTag = tag - return True + return self.plug.cache.allocateCacheSpace(self.size) def _releaseCacheSpace(self): if not (self._cancelled or self._allocTag is None): - self.plug.releaseCacheSpace(self._allocTag) + self.plug.cache.releaseCacheSpace(self._allocTag) self._allocTag = None def _cancelSession(self):# @@ -643,12 +502,10 @@ # Cancel and close the temp write file. self._cancelCopy(False, True) - def _startCopying(self): - self.log("Start copy session") - # First ensure there is not already a temporary file - self._removeTempFile() - # Reserve cache space, may trigger a cache cleanup - if not self._allocCacheSpace(): + def _gotCacheSpace(self, tag): + self._allocTag = tag + + if not tag: # No free space, proxying source file directly self._cancelSession() return @@ -691,6 +548,15 @@ self.copying = True self.plug.activateSession(self) + def _startCopying(self): + self.log("Start copy session") + # First ensure there is not already a temporary file + self._removeTempFile() + # Reserve cache space, may trigger a cache cleanup + d = self._allocCacheSpace() + d.addCallback(self._gotCacheSpace) + return d + def _cancelCopy(self, closeSource, closeTempWrite): if self.copying: self.log("Canceling file copy") @@ -736,6 +602,8 @@ self._closeWriteTempFile() def _onCopyFinished(self): + if self._sourceFile is None: + return # Called when the copy thread really stopped to read/write self.debug("Finished caching '%s' [fd %d]", self.sourcePath, self._sourceFile.fileno()) @@ -903,21 +771,21 @@ try: return self._file.tell() except IOError, e: - cls = _errorLookup.get(e.errno, FileError) + cls = errnoLookup.get(e.errno, FileError) raise cls("Failed to tell position in file: %s" % str(e)) def seek(self, offset): try: self._file.seek(offset, SEEK_SET) except IOError, e: - cls = _errorLookup.get(e.errno, FileError) + cls = errnoLookup.get(e.errno, FileError) raise cls("Failed to seek in cached file: %s" % str(e)) def read(self, size): try: return self._file.read(size) except IOError, e: - cls = _errorLookup.get(e.errno, FileError) + cls = errnoLookup.get(e.errno, FileError) raise cls("Failed to read data from file: %s" % str(e)) def close(self): @@ -928,7 +796,7 @@ finally: self._file = None except IOError, e: - cls = _errorLookup.get(e.errno, FileError) + cls = errnoLookup.get(e.errno, FileError) raise cls("Failed to close file: %s" % str(e)) @@ -961,7 +829,27 @@ self._path = path self.mimeType = mimeType self.stats = cachestats.RequestStatistics(plug.stats) - self._delegate = self._selectDelegate() + self._delegate = None + + def open(self): + # Opening source file in a separate thread, as it usually involves + # accessing a network filesystem (which would block the reactor) + d = threads.deferToThread(open_stat, self._path) + d.addCallbacks(self._selectDelegate, self._sourceOpenFailed) + + def _setDelegate(delegate): + self._delegate = delegate + d.addCallback(_setDelegate) + d.addCallback(lambda _: self) + return d + + def _sourceOpenFailed(self, failure): + failure.trap(NotFoundError) + self.debug("Source file %r not found", self._path) + self.plug.outdateCopySession(self._path) + cachedPath = self.plug.cache.getCachePath(self._path) + self._removeCachedFile(cachedPath) + raise failure def __str__(self): return "" % self._path @@ -995,7 +883,7 @@ return d return defer.succeed(d) except IOError, e: - cls = _errorLookup.get(e.errno, FileError) + cls = errnoLookup.get(e.errno, FileError) return defer.fail(cls("Failed to read cached data: %s", str(e))) except: return defer.fail() @@ -1015,23 +903,6 @@ ## Private Methods ## - def _open(self, path): - """ - @rtype: (file, statinfo) - """ - try: - file = open(path, 'rb') - fd = file.fileno() - except IOError, e: - cls = _errorLookup.get(e.errno, FileError) - raise cls("Failed to open file '%s': %s" % (path, str(e))) - try: - info = os.fstat(fd) - except OSError, e: - cls = _errorLookup.get(e.errno, FileError) - raise cls("Failed to stat file '%s': %s" % (path, str(e))) - return file, info - def _closeSourceFile(self, sourceFile): self.log("Closing source file [fd %d]", sourceFile.fileno()) try: @@ -1040,23 +911,16 @@ self.warning("Failed to close source file: %s", log.getExceptionMessage(e)) - def _selectDelegate(self): + def _selectDelegate(self, (sourceFile, sourceInfo)): sourcePath = self._path - cachedPath = self.plug.getCachePath(sourcePath) - # Opening source file - try: - sourceFile, sourceInfo = self._open(sourcePath) - self.log("Opened source file [fd %d]", sourceFile.fileno()) - except NotFoundError: - self.debug("Source file not found") - self.plug.outdateCopySession(sourcePath) - self._removeCachedFile(cachedPath) - raise + self.log("Selecting delegate for source file %r [fd %d]", + sourcePath, sourceFile.fileno()) # Update the log name self.logName = self.plug.getLogName(self._path, sourceFile.fileno()) # Opening cached file + cachedPath = self.plug.cache.getCachePath(sourcePath) try: - cachedFile, cachedInfo = self._open(cachedPath) + cachedFile, cachedInfo = open_stat(cachedPath) self.log("Opened cached file [fd %d]", cachedFile.fileno()) except NotFoundError: self.debug("Did not find cached file '%s'", cachedPath) diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/cachemanager.py flumotion-0.9.1/flumotion/component/misc/httpserver/cachemanager.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/cachemanager.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/cachemanager.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,604 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import errno +import os +import tempfile +import time +import stat + +from twisted.internet import defer, threads, reactor, utils + +from flumotion.common import log, common, python, errors +from flumotion.common import format as formatting + +LOG_CATEGORY = "cache-manager" + +DEFAULT_CACHE_SIZE = 1000 * 1024 * 1024 +DEFAULT_CACHE_DIR = "/tmp/httpserver" +DEFAULT_CLEANUP_ENABLED = True +DEFAULT_CLEANUP_HIGH_WATERMARK = 1.0 +DEFAULT_CLEANUP_LOW_WATERMARK = 0.6 +ID_CACHE_MAX_SIZE = 1024 +TEMP_FILE_POSTFIX = ".tmp" + + +class CacheManager(object, log.Loggable): + + logCategory = LOG_CATEGORY + + def __init__(self, stats, + cacheDir = None, + cacheSize = None, + cleanupEnabled = None, + cleanupHighWatermark = None, + cleanupLowWatermark = None, + cacheRealm = None): + + if cacheDir is None: + cacheDir = DEFAULT_CACHE_DIR + if cacheSize is None: + cacheSize = DEFAULT_CACHE_SIZE + if cleanupEnabled is None: + cleanupEnabled = DEFAULT_CLEANUP_ENABLED + if cleanupHighWatermark is None: + cleanupHighWatermark = DEFAULT_CLEANUP_HIGH_WATERMARK + if cleanupLowWatermark is None: + cleanupLowWatermark = DEFAULT_CLEANUP_LOW_WATERMARK + + self.stats = stats + self._cacheDir = cacheDir + self._cacheSize = cacheSize # in bytes + self._cleanupEnabled = cleanupEnabled + highWatermark = max(0.0, min(1.0, float(cleanupHighWatermark))) + lowWatermark = max(0.0, min(1.0, float(cleanupLowWatermark))) + + self._cachePrefix = (cacheRealm and (cacheRealm + ":")) or "" + + self._identifiers = {} # {path: identifier} + + self.info("Cache Manager initialized") + self.debug("Cache directory: '%s'", self._cacheDir) + self.debug("Cache size: %d bytes", self._cacheSize) + self.debug("Cache cleanup enabled: %s", self._cleanupEnabled) + + common.ensureDir(self._cacheDir, "cache") + + self._cacheUsage = None + self._cacheUsageLastUpdate = None + self._lastCacheTime = None + + self._cacheMaxUsage = self._cacheSize * highWatermark # in bytes + self._cacheMinUsage = self._cacheSize * lowWatermark # in bytes + + def setUp(self): + """ + Initialize the cache manager + + @return a defer + @raise: OSError or FlumotionError + """ + # Initialize cache usage + return self.updateCacheUsage() + + def getIdentifier(self, path): + """ + The returned identifier is a digest of the path encoded in hex string. + The hash function used is SHA1. + It caches the identifiers in a dictionary indexed by path and with + a maximum number of entry specified by the constant ID_CACHE_MAX_SIZE. + + @return: an identifier for path. + """ + ident = self._identifiers.get(path, None) + if ident is None: + sha1Hash = python.sha1() + sha1Hash.update(self._cachePrefix + path) + ident = sha1Hash.digest().encode("hex").strip('\n') + # Prevent the cache from growing endlessly + if len(self._identifiers) >= ID_CACHE_MAX_SIZE: + self._identifiers.clear() + self._identifiers[path] = ident + return ident + + def getCachePath(self, path): + """ + @return: the cached file path for a path. + """ + ident = self.getIdentifier(path) + return os.path.join(self._cacheDir, ident) + + def getTempPath(self, path): + """ + @return: a temporary file path for a path. + + Don't use this function, it's provided for compatibility. + Use newTempFile() instead. + """ + ident = self.getIdentifier(path) + return os.path.join(self._cacheDir, ident + TEMP_FILE_POSTFIX) + + def updateCacheUsageStatistics(self): + self.stats.onEstimateCacheUsage(self._cacheUsage, self._cacheSize) + + def _updateCacheUsage(self, usage): + self.log('Disk usage for path %r is %d bytes', self._cacheDir, usage) + self._cacheUsageLastUpdate = time.time() + self._cacheUsage = usage + self.updateCacheUsageStatistics() + return usage + + def updateCacheUsage(self): + """ + @return: a defered with the cache usage in bytes. + @raise: OSError or FlumotionError + """ + + # Only calculate cache usage if the cache directory + # modification time changed since the last time we looked at it. + try: + cacheTime = os.path.getmtime(self._cacheDir) + except OSError, e: + return defer.fail(e) + + if ((self._cacheUsage is None) or (self._lastCacheTime < cacheTime)): + self._lastCacheTime = cacheTime + self.log('Getting disk usage for path %r', self._cacheDir) + d = utils.getProcessOutput('du', ['-bs', self._cacheDir]) + d.addCallback(lambda o: int(o.split('\t', 1)[0])) + d.addCallback(self._updateCacheUsage) + return d + else: + return defer.succeed(self._cacheUsage) + + def _rmfiles(self, files): + try: + for path in files: + os.remove(path) + except OSError, e: + if e.errno != errno.ENOENT: + # TODO: is warning() thread safe? + self.warning("Error cleaning cached file: %s", str(e)) + + def _setCacheUsage(self, _, usage): + # Update the cache usage + self._cacheUsage = usage + self._cacheUsageLastUpdate = time.time() + return usage + + def _cleanUp(self): + # Update cleanup statistics + self.stats.onCleanup() + # List the cached files with file state + try: + listdir = os.listdir(self._cacheDir) + except OSError, e: + return defer.fail(e) + + files = [] + for f in listdir: + f = os.path.join(self._cacheDir, f) + # There's a possibility of getting an error on os.stat here. + try: + files.append((f, os.stat(f))) + except OSError, e: + if e.errno == errno.ENOENT: + pass + else: + return defer.fail(e) + + # Calculate the cached file total size + usage = sum([d[1].st_size for d in files]) + # Delete the cached file starting by the oldest accessed ones + files.sort(key=lambda d: d[1].st_atime) + rmlist = [] + for path, info in files: + usage -= info.st_size + rmlist.append(path) + if usage <= self._cacheMinUsage: + # We reach the cleanup limit + self.debug('cleaned up, cache use is now %sbytes', + formatting.formatStorage(usage)) + break + d = threads.deferToThread(self._rmfiles, rmlist) + d.addBoth(self._setCacheUsage, usage) + return d + + def _allocateCacheSpaceAfterCleanUp(self, usage, size): + if (self._cacheUsage + size) >= self._cacheSize: + # There is not enough space, allocation failed + self.updateCacheUsageStatistics() + self.debug('not enough space in cache, ' + 'cannot cache %d > %d' % + (self._cacheUsage + size, self._cacheSize)) + return None + + # There is enough space to allocate, allocation succeed + self._cacheUsage += size + self.updateCacheUsageStatistics() + return (self._cacheUsageLastUpdate, size) + + def _allocateCacheSpace(self, usage, size): + if usage + size < self._cacheMaxUsage: + self._cacheUsage += size + self.updateCacheUsageStatistics() + return defer.succeed((self._cacheUsageLastUpdate, size)) + + self.debug('cache usage will be %sbytes, need more cache', + formatting.formatStorage(usage + size)) + + if not self._cleanupEnabled: + # No space available and cleanup disabled: allocation failed. + self.debug('not allowed to clean up cache, ' + 'so cannot cache %d' % size) + return defer.succeed(None) + + d = self._cleanUp() + d.addCallback(self._allocateCacheSpaceAfterCleanUp, size) + return d + + def allocateCacheSpace(self, size): + """ + Try to reserve cache space. + + If there is not enough space and the cache cleanup is enabled, + it will delete files from the cache starting with the ones + with oldest access time until the cache usage drops below + the fraction specified by the property cleanup-low-threshold. + + Returns a 'tag' that should be used to 'free' the cache space + using releaseCacheSpace. + This tag is needed to better estimate the cache usage, + if the cache usage has been updated since cache space + has been allocated, freeing up the space should not change + the cache usage estimation. + + @param size: size to reserve, in bytes + @type size: int + + @return: an allocation tag or None if the allocation failed. + @rtype: defer to tuple + """ + d = self.updateCacheUsage() + d.addCallback(self._allocateCacheSpace, size) + return d + + def releaseCacheSpace(self, tag): + """ + Low-level function to release reserved cache space. + """ + lastUpdate, size = tag + if lastUpdate == self._cacheUsageLastUpdate: + self._cacheUsage -= size + self.updateCacheUsageStatistics() + + def openCacheFile(self, path): + """ + @return: a defer to a CacheFile instance or None + """ + try: + return defer.succeed(CachedFile(self, path)) + except: + return defer.succeed(None) + + def _newTempFile(self, tag, path, size, mtime=None): + # if allocation fails + if tag is None: + return None + + try: + return TempFile(self, path, tag, size, mtime) + except OSError: + return None + + def newTempFile(self, path, size, mtime=None): + """ + @return: a defer to a TempFile instance or None + """ + d = self.allocateCacheSpace(size) + d.addCallback(self._newTempFile, path, size, mtime) + return d + + +class CachedFile: + """ + Read only. + + See cachedprovider.py + @raise: OSError + """ + + def __init__(self, cachemgr, resPath): + cachedPath = cachemgr.getCachePath(resPath) + handle = open(cachedPath, 'rb') + stat = os.fstat(handle.fileno()) + + cachemgr.log("Opened cached file %s [fd %d]", + cachedPath, handle.fileno()) + + self.name = cachedPath + self.file = handle + self.stat = stat + + def unlink(self): + """ + Delete the cached file from filesystem, unless the current + file is more recent. However, this is not done atomically... + """ + try: + s = os.stat(self.name) + if (s[stat.ST_MTIME] > self.stat[stat.ST_MTIME]): + return + os.unlink(self.name) + except OSError: + pass + + def __getattr__(self, name): + a = getattr(self.__dict__['file'], name) + if type(a) != type(0): + setattr(self, name, a) + return a + + +class TempFile: + """ + See cachedprovider.py + """ + + def __init__(self, cachemgr, resPath, tag, size, mtime=None): + """ + @raise: OSError + """ + self.tag = tag + self.cachemgr = cachemgr + self._completed = False + self._finishPath = cachemgr.getCachePath(resPath) + self.mtime = mtime + self.file = None + self.size = size + + fd, tempPath = tempfile.mkstemp(TEMP_FILE_POSTFIX, + LOG_CATEGORY, cachemgr._cacheDir) + cachemgr.log("Created temporary file '%s' [fd %d]", + tempPath, fd) + self.file = os.fdopen(fd, "w+b") + cachemgr.log("Truncating temporary file to size %d", size) + self.file.truncate(size) + self.stat = os.fstat(self.file.fileno()) + self.name = tempPath + + def __getattr__(self, name): + a = getattr(self.__dict__['file'], name) + if type(a) != type(0): + setattr(self, name, a) + return a + + def setModificationTime(self, mtime=None): + """ + Set file modification time. + """ + if (mtime): + self.mtime = mtime + try: + if self.mtime: + mtime = self.mtime + atime = int(time.time()) + self.cachemgr.log("Setting cache file " + "modification time to %d", mtime) + # FIXME: Should use futimes, but it's not wrapped by python + os.utime(self.name, (atime, mtime)) + except OSError, e: + if e.errno == errno.ENOENT: + self.cachemgr.releaseCacheSpace(self.tag) + else: + self.cachemgr.warning( + "Failed to update modification time of temporary " + "file: %s", log.getExceptionMessage(e)) + + def close(self): + """ + @raise: OSError + """ + if self.cachemgr is None: + return + + try: + if not self._completed: + self.cachemgr.log("Temporary file canceled '%s' [fd %d]", + self.name, self.fileno()) + self.cachemgr.releaseCacheSpace(self.tag) + os.unlink(self.name) + except OSError: + pass + + self.file.close() + self.setModificationTime() + self.file = None + self.cachemgr = None + + def write(self, str): + """ + @raise: OSError + @raise: IOError + allocated size + """ + if (self.file.tell() + len(str) > self.size): + raise IOError("Cache size overrun (%d > %d)" % + (self.file.tell() + len(str), self.size)) + return self.file.write(str) + + def complete(self, checkSize=False): + """ + Make the temporary file available as a cached file. + Do NOT close the file, afterward the file can be used + as a normal CachedFile instance. + Do not raise exceptions on rename error. + + @raise: IOError if checkSize and tell() != size + """ + if self.cachemgr is None: + return + if self._completed: + return + self._completed = True + + _, size = self.tag + if (self.tell() != size and checkSize): + raise IOError("Did not reach end of file") + + self.cachemgr.log("Temporary file completed '%s' [fd %d]", + self.name, self.fileno()) + try: + if self.mtime is not None: + mtime = os.path.getmtime(self._finishPath) + if mtime > self.mtime: + self.cachemgr.log("Did not complete(), " + "a more recent version exists already") + os.unlink(self.name) + self.name = self._finishPath + return + except OSError, e: + pass + + try: + os.rename(self.name, self._finishPath) + except OSError, e: + if e.errno == errno.ENOENT: + self.cachemgr.releaseCacheSpace(self.tag) + self.cachemgr.warning( + "Failed to rename file '%s': %s" % + (self.name, str(e))) + return + + self.setModificationTime() + + self.name = self._finishPath + self.cachemgr.log("Temporary file renamed to '%s' [fd %d]", + self._finishPath, self.fileno()) + + +def main(argv=None): + # Functional tests + import random + + CACHE_SIZE = 1 * 1024 * 1024 + MAX_CLEANUPS = 512 + + class DummyStats: + + def __init__(self): + self.oncleanup = 0 + + def info(): + pass + + def onEstimateCacheUsage(self, usage, size): + #print "Stat: " + str(usage / (1024))\ + # + "k / " + str(size / (1024)) + "k" + pass + + def onCleanup(self): + self.oncleanup += 1 + print "OnCleanup" + + def makeTemp(tag, size, m, name): + t = TempFile(m, name, tag, size) + return t + + def completeAndClose(t): + try: + t.complete() + t.close() + except: + print "Got a complete exception" + + def fillTestCache(manager): + i = 0 + while (manager.stats.oncleanup < MAX_CLEANUPS): + i += 1 + filesize = 4096 * random.randint(1, 30) + d = manager.newTempFile(str(i), filesize) + d.addCallback(completeAndClose) + + def releaseCacheSpace(tag, m): + print "gotCacheSpace: ", tag + m.releaseCacheSpace(tag) + + def checkUsage(usage, m, check): + if (not check(m._cacheUsage)): + print "Cache overrun!!! %d/%d" % (m._cacheUsage, m._cacheSize) + + def openCacheAndClose(_, m, name): + d = m.openCacheFile(name) + d.addCallback(lambda f: f.close()) + return d + + def checkMiss(_): + if (_ == "cacheMiss"): + return + raise errors.FlumotionError("an error") + + def runTests(): + # low-level cache requests + d = m.allocateCacheSpace(1024) + d.addCallback(releaseCacheSpace, m) + d.addCallback(checkUsage, m, lambda u: u == 0) + + d = m.allocateCacheSpace(CACHE_SIZE / 2) + d.addCallback(makeTemp, CACHE_SIZE / 2, m, "test") + d.addCallback(lambda t: t.close()) + d.addCallback(checkUsage, m, lambda u: u == 0) + + d = m.allocateCacheSpace(CACHE_SIZE / 2) + d.addCallback(makeTemp, CACHE_SIZE / 2, m, "test2") + d.addCallback(completeAndClose) + d.addCallback(checkUsage, m, lambda u: u > 0) + + # check hit and miss + m2 = CacheManager(DummyStats(), cachedir, CACHE_SIZE, True, 0.5, 0.3) + d = m2.newTempFile("test3", 12000) + d.addCallback(completeAndClose) + d.addCallback(openCacheAndClose, m, "test3") + + d = openCacheAndClose(None, m, "test4_do_not_exists") + d.addErrback(lambda _: "cacheMiss") + d.addCallback(checkMiss) + + # multi-thread test, full of races :) + threads.deferToThread(fillTestCache, m) + threads.deferToThread(fillTestCache, m) + threads.deferToThread(fillTestCache, m) + + # check usage + m.updateCacheUsage().addCallback(checkUsage, m, + lambda u: u < CACHE_SIZE * 1.10) + + + cachedir = os.environ['HOME'] + "/tmp/cache" + m = CacheManager(DummyStats(), cachedir, CACHE_SIZE, True, 0.0, 0.0) + d = m.setUp() + + m.addCallback(lambda x: runTests()) + + reactor.callLater(3, reactor.stop) + reactor.run() + return 0 + +if __name__ == '__main__': + import sys + status = main() + sys.exit(status) diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/cachestats.py flumotion-0.9.1/flumotion/component/misc/httpserver/cachestats.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/cachestats.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/cachestats.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import time diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/fileprovider.py flumotion-0.9.1/flumotion/component/misc/httpserver/fileprovider.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/fileprovider.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/fileprovider.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component.plugs import base as plugbase @@ -29,6 +25,14 @@ """ +class FileOutOfDate(FileError): + """ + I am raised when trying an operation on a file that changed since + it has been open, and nothing can be done to ensure the integrity + of the data. + """ + + class InsecureError(FileError): """ I am raised when trying to build an insecure path using FilePath. @@ -62,6 +66,12 @@ """ +class UnavailableError(FileError): + """ + I am raised when a plug cannot provide the requested service. + """ + + class FilePath(object): """ I am pointing at a path in the file repository. @@ -91,7 +101,8 @@ def open(self): """ @return: the pointed file opened as an asynchronous file - @rtype: L{AsyncFile} + or a deferred that will be called back with one. + @rtype: L{AsyncFile} | L{defer.Deferred} @raises NotFoundError: if the file does not exists anymore @raises AccessError: if the file cannot be opened because of right restriction diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/common.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/common.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/common.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/common.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,98 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import time + + +# Stream Errors +INTERNAL_ERROR = 500 +NOT_IMPLEMENTED = 501 +SERVER_UNAVAILABLE = 503 +RANGE_NOT_SATISFIABLE = 416 +STREAM_NOTFOUND = 404 +STREAM_FORBIDDEN = 403 +# The following error codes should only be used +# when the connection with the server has been established. +SERVER_DISCONNECTED = 502 +SERVER_TIMEOUT = 504 + +# Condition Errors +STREAM_NOT_MODIFIED = 304 +STREAM_MODIFIED = 412 + + +class StreamConsumer(object): + """ + Interface of the stream consumer object. + No need to inherit from this class, + it's here just for documentation. + """ + + def serverError(self, getter, code, message): + pass + + def conditionFail(self, getter, code, message): + pass + + def streamNotAvailable(self, getter, code, message): + pass + + def onInfo(self, getter, info): + pass + + def onData(self, getter, data): + pass + + def streamDone(self, getter): + pass + + +class StreamInfo(object): + """ + Base stream's information container. + No need to inherit from this class, + it's here just for documentation. + """ + expires = None + mtime = None + length = 0 + start = 0 + size = 0 + + +class ServerInfo(object): + + def __init__(self): + self.adress = None + self.protocol = "http" + + +def log_id(obj): + """ + Gives a unique string identifier for an instance. + Used in the log to trace instances. + """ + result = id(obj) + if result < 0: + result += 1L << 32 + if result < 0: + # 64bit, not sure how to detect the machine address width + result -= 1L << 32 + result += 1L << 64 + assert result > 0, "Address space fatter than 64 bits" + result = (result << 16) + (int(time.time()) & 0xFFFF) + return hex(result)[2:] diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/file_provider.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/file_provider.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/file_provider.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/file_provider.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,83 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from twisted.internet import defer + +from flumotion.common import log +from flumotion.component.misc.httpserver import fileprovider +from flumotion.component.misc.httpserver import localpath +from flumotion.component.misc.httpserver.httpcached import file_reader + + +BASE_PATH = "/" + +LOG_CATEGORY = "fileprovider-httpcached" + + +class FileProviderHTTPCachedPlug(fileprovider.FileProviderPlug, log.Loggable): + """ + Implements the FileProviderPlug interface over a FileReader instance. + + Needed because FileReader do not support file browsing. + """ + + logCategory = LOG_CATEGORY + + def __init__(self, args): + self._reader = file_reader.FileReaderHTTPCachedPlug(args) + + def start(self, component): + d = defer.Deferred() + d.addCallback(lambda _: self._reader.start()) + d.addCallback(lambda _: self) # Don't return internal references + d.callback(None) + return d + + def stop(self, component): + d = defer.Deferred() + d.addCallback(lambda _: self._reader.stop()) + d.addCallback(lambda _: self) # Don't return internal references + d.callback(None) + return d + + def startStatsUpdates(self, updater): + #FIXME: This is temporary. Should be done with plug UI. + # Used for the UI to know which plug is used + updater.update("provider-name", "fileprovider-httpcached") + self._reader.stats.startUpdates(updater) + + def stopStatsUpdates(self): + self._reader.stats.stopUpdates() + + def getRootPath(self): + return VirtualPath(self, BASE_PATH) + + +class VirtualPath(localpath.LocalPath, log.Loggable): + + logCategory = LOG_CATEGORY + + def __init__(self, plug, path): + localpath.LocalPath.__init__(self, path) + self.plug = plug + + def child(self, name): + childpath = self._getChildPath(name) + return VirtualPath(self.plug, childpath) + + def open(self): + return self.plug._reader.open(self._path) diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/file_reader.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/file_reader.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/file_reader.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/file_reader.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,149 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from twisted.internet import defer + +from flumotion.common import log +from flumotion.component.misc.httpserver import cachemanager +from flumotion.component.misc.httpserver import cachestats +from flumotion.component.misc.httpserver import localpath +from flumotion.component.misc.httpserver.httpcached import http_client +from flumotion.component.misc.httpserver.httpcached import http_utils +from flumotion.component.misc.httpserver.httpcached import request_manager +from flumotion.component.misc.httpserver.httpcached import resource_manager +from flumotion.component.misc.httpserver.httpcached import server_selection +from flumotion.component.misc.httpserver.httpcached import strategy_basic + + +LOG_CATEGORY = "filereader-httpcached" + +DEFAULT_CACHE_TTL = 5*60 +DEFAULT_DNS_REFRESH = 60 +DEFAULT_VIRTUAL_PORT = 80 +DEFAULT_VIRTUAL_PATH = "" +DEFAULT_SERVER_PORT = 3128 +DEFAULT_PROXY_PRIORITY = 1 +DEFAULT_CONN_TIMEOUT = 2 +DEFAULT_IDLE_TIMEOUT = 5 + + +class FileReaderHTTPCachedPlug(log.Loggable): + """ + Offers a file-like interface to streams retrieved using HTTP. + It supports: + - Local caching with TTL expiration, and cooperative managment. + - Load-balanced HTTP servers with priority level (fall-back). + - More than one IP by server hostname with periodic DNS refresh. + - Connection resuming if HTTP connection got disconnected. + """ + + logCategory = LOG_CATEGORY + + def __init__(self, args): + props = args['properties'] + + cacheDir = props.get('cache-dir') + cacheSizeInMB = props.get('cache-size') + if cacheSizeInMB is not None: + cacheSize = cacheSizeInMB * 10 ** 6 # in bytes + else: + cacheSize = None + cleanupEnabled = props.get('cleanup-enabled') + cleanupHighWatermark = props.get('cleanup-high-watermark') + cleanupLowWatermark = props.get('cleanup-low-watermark') + + self.virtualHost = props.get('virtual-hostname') + self.virtualPort = props.get('virtual-port', DEFAULT_VIRTUAL_PORT) + self.virtualPath = props.get('virtual-path', DEFAULT_VIRTUAL_PATH) + dnsRefresh = props.get('dns-refresh-period', DEFAULT_DNS_REFRESH) + servers = props.get('http-server') + compat_servers = props.get('http-server-old') + + self.stats = cachestats.CacheStatistics() + + self.cachemgr = cachemanager.CacheManager(self.stats, + cacheDir, cacheSize, + cleanupEnabled, + cleanupHighWatermark, + cleanupLowWatermark, + self.virtualHost) + + selector = server_selection.ServerSelector(dnsRefresh) + + if not (servers or compat_servers): + selector.addServer(self.virtualHost, self.virtualPort) + else: + if compat_servers: + # Add the servers specified by name + for hostname in compat_servers: + if '#' in hostname: + hostname, priostr = hostname.split('#', 1) + priority = int(priostr) + else: + priority = DEFAULT_PROXY_PRIORITY + if ':' in hostname: + hostname, portstr = hostname.split(':', 1) + port = int(portstr) + else: + port = DEFAULT_SERVER_PORT + selector.addServer(hostname, port, priority) + + + if servers: + # Add the servers specified by compound properties + for serverProps in servers: + hostname = serverProps.get('hostname') + port = serverProps.get('port', DEFAULT_SERVER_PORT) + priority = serverProps.get('priority', + DEFAULT_PROXY_PRIORITY) + selector.addServer(hostname, port, priority) + + connTimeout = props.get('connection-timeout', DEFAULT_CONN_TIMEOUT) + idleTimeout = props.get('idle-timeout', DEFAULT_IDLE_TIMEOUT) + + client = http_client.StreamRequester(connTimeout, idleTimeout) + + reqmgr = request_manager.RequestManager(selector, client) + + cacheTTL = props.get('cache-ttl', DEFAULT_CACHE_TTL) + + self.strategy = strategy_basic.CachingStrategy(self.cachemgr, + reqmgr, cacheTTL) + + self.resmgr = resource_manager.ResourceManager(self.strategy, + self.stats) + + def start(self): + d = defer.Deferred() + d.addCallback(lambda _: self.cachemgr.setUp()) + d.addCallback(lambda _: self.strategy.setup()) + d.addCallback(lambda _: self) # Don't return internal references + d.callback(None) + return d + + def stop(self): + d = defer.Deferred() + d.addCallback(lambda _: self.strategy.cleanup()) + d.addCallback(lambda _: self) # Don't return internal references + d.callback(None) + return d + + def open(self, path): + url = http_utils.Url(hostname=self.virtualHost, + port=self.virtualPort, + path=self.virtualPath + path) + return self.resmgr.getResourceFor(url) diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/httpcached.xml flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/httpcached.xml --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/httpcached.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/httpcached.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/http_client.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/http_client.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/http_client.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/http_client.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,438 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import datetime +import cgi + +from twisted.internet import defer, protocol, reactor +from twisted.python.util import InsensitiveDict +from twisted.web import http + +from flumotion.common import log +from flumotion.common import errors +from flumotion.component.misc.httpserver.httpcached import common +from flumotion.component.misc.httpserver.httpcached import http_utils + + +LOG_CATEGORY = "stream-provider" + +USER_AGENT = "FlumotionClient/0.1" + + +def ts2str(ts): + if ts: + return datetime.datetime.fromtimestamp(ts).isoformat() + return "???" + + +class StreamInfo(object): + """ + Provides information about a stream in a standard way. + The information is retrieved by parsing HTTP headers. + """ + + def __init__(self, headers): + self.expires = None + self.mtime = None + self.length = 0 + self.start = 0 + self.size = 0 + self.mimeType = None + + headers = InsensitiveDict(headers) + + encoding = headers.get("Transfer-Encoding", None) + if encoding == 'chunked': + raise errors.FlumotionError("Chunked transfer not supported") + + expires = headers.get("Expires", None) + if expires is not None: + try: + self.expires = http.stringToDatetime(expires) + except: + self.expires = 0 + + lastmod = headers.get("Last-Modified", None) + if lastmod is not None: + self.mtime = http.stringToDatetime(lastmod) + + range = headers.get("Content-Range", None) + length = headers.get("Content-Length", None) + if range is not None: + start, end, total = http.parseContentRange(range) + self.start = start + self.length = total + if length is not None: + self.size = int(length) + else: + self.size = end - start + elif length is not None: + self.length = int(length) + self.size = int(length) + else: + raise errors.FlumotionError("Can't get length/size from headers", + headers) + + ctype = headers.get("Content-Type", None) + if ctype is not None: + self.mimeType, _pdict = cgi.parse_header(ctype) + + +class StreamRequester(log.Loggable): + """ + Allows retrieval of data streams using HTTP 1.0. + """ + + logCategory = LOG_CATEGORY + + def __init__(self, connTimeout=0, idleTimeout=0): + self.connTimeout = connTimeout + self.idleTimeout = idleTimeout + + def retrieve(self, consumer, url, proxyAddress=None, proxyPort=None, + ifModifiedSince=None, ifUnmodifiedSince=None, + start=None, size=None): + self.log("Requesting %s%s%s%s%s%s", + size and (" %d bytes" % size) or "", + start and (" starting at %d" % start) or "", + (size or start) and " from " or "", + url.toString(), + ifModifiedSince and (" if modified since %s" + % ts2str(ifModifiedSince)) or "", + ifUnmodifiedSince and (" if not modified since %s" + % ts2str(ifUnmodifiedSince)) or "") + + getter = StreamGetter(consumer, url, + ifModifiedSince, ifUnmodifiedSince, + start, size, self.idleTimeout) + getter.connect(proxyAddress, proxyPort, self.connTimeout) + return getter + + +class StreamGetter(protocol.ClientFactory, http.HTTPClient, log.Loggable): + """ + Retrieves a stream using HTTP 1.0. + + This class is at the same time a Factory and a Protocol, + this can be done because it's a client and in twisted + client factories only create on protocol. + + The outcome, the stream info and stream data is forwarded + to a common.StreamConsumer instance given at creating time. + + It supports range requests and some conditional request types + (ifModified and ifUnmodified). + """ + + logCategory = LOG_CATEGORY + + HTTP_METHOD = 'GET' + + host = None + port = None + + def __init__(self, consumer, url, + ifModifiedSince=None, ifUnmodifiedSince=None, + start=None, size=None, timeout=0): + self.consumer = consumer + self.url = url + + self.ifModifiedSince = ifModifiedSince + self.ifUnmodifiedSince = ifUnmodifiedSince + + self.start = start + self.size = size + self.timeout = timeout + + self.headers = {} + self.peer = None + self.status = None + self.info = None + + self._connected = False + self._canceled = False + self._remaining = None + self._idlecheck = None + + self.logName = common.log_id(self) # To be able to track the instance + + def __repr__(self): + return "<%s: %s>" % (type(self).__name__, self.url) + + ### Public Methods ### + + def connect(self, proxyAddress=None, proxyPort=None, timeout=0): + assert not self._connected, "Already connected" + self._connected = True + url = self.url + self.host = proxyAddress or url.hostname + self.port = proxyPort or url.port + if url.scheme != 'http': + msg = "URL scheme %s not implemented" % url.scheme + self._serverError(common.NOT_IMPLEMENTED, msg) + else: + self.log("Connecting to %s:%s for %s", + self.host, self.port, self.url) + reactor.connectTCP(self.host, self.port, self, timeout) + + def pause(self): + if not self.paused and self.transport is not None: + self.pauseProducing() + self.log("Request paused for %s", self.url) + + def resume(self): + if self.paused and self.transport is not None: + self.resumeProducing() + self.log("Request resumed for %s", self.url) + + def cancel(self): + if self._connected and self.transport is not None: + self.transport.loseConnection() + self._cancelIdleCheck() + self.log("Request canceled for %s", self.url) + self._canceled = True + + ### Overridden Methods ### + + def buildProtocol(self, addr): + assert self.peer is None, "Protocol already built" + self.peer = addr + return self + + def clientConnectionFailed(self, connector, reason): + self._serverError(common.SERVER_UNAVAILABLE, reason.getErrorMessage()) + + def connectionMade(self): + self.log("Connection made for %s", self.url) + self.sendCommand(self.HTTP_METHOD, self.url.location) + self.sendHeader('Host', self.url.host) + self.sendHeader('User-Agent', USER_AGENT) + self.sendHeader('Connection', "close") # Pipeline not yet supported + + if self.ifModifiedSince: + datestr = http.datetimeToString(self.ifModifiedSince) + self.sendHeader('If-Modified-Since', datestr) + + if self.ifUnmodifiedSince: + datestr = http.datetimeToString(self.ifUnmodifiedSince) + self.sendHeader('If-Unmodified-Since', datestr) + + if self.start or self.size: + start = self.start or 0 + end = (self.size and (start + self.size - 1)) or None + rangeSpecs = "bytes=%s-%s" % (start, end or "") + self.sendHeader('Range', rangeSpecs) + + self.endHeaders() + + self._resetIdleCheck() + + def connectionLost(self, reason): + self.log("Connection lost for %s", self.url) + self.handleResponseEnd() + if not self._canceled: + self._serverError(common.SERVER_DISCONNECTED, + reason.getErrorMessage()) + + def handleStatus(self, version, status_str, message): + self._keepActive() + status = int(status_str) + self.status = status + + if status in (http.OK, http.NO_CONTENT, http.PARTIAL_CONTENT): + return + + if status == http.REQUESTED_RANGE_NOT_SATISFIABLE: + self._serverError(common.RANGE_NOT_SATISFIABLE, + "HTTP range not satisfiable") + if status == http.NOT_MODIFIED: + self._conditionFail(common.STREAM_NOT_MODIFIED, + "Stream not modified") + elif status == http.PRECONDITION_FAILED: + self._conditionFail(common.STREAM_MODIFIED, "Stream Modified") + elif status == http.NOT_FOUND: + self._streamNotAvailable(common.STREAM_NOTFOUND, + "Resource Not Found") + elif status == http.FORBIDDEN: + self._streamNotAvailable(common.STREAM_FORBIDDEN, + "Resource Forbidden") + if status in (http.MOVED_PERMANENTLY, http.FOUND): + self._serverError(common.NOT_IMPLEMENTED, + "HTTP redirection not supported") + else: + self._serverError(common.NOT_IMPLEMENTED, + "Unsupported HTTP response: %s (%s)" + % (message, status)) + + def handleHeader(self, key, val): + self._keepActive() + self.headers[key] = val + + def handleEndHeaders(self): + self._keepActive() + self.info = StreamInfo(self.headers) + if self.size and self.size < self.info.size: + self.warning("Response size bigger than the requested size, " + "expecting %s bytes and response length is %s", + self.size, self.info.size) + self._remaining = self.info.size + self._onInfo(self.info) + + def handleResponsePart(self, data): + self._keepActive() + size = len(data) + if self._remaining > 0 and self._remaining < size: + self.warning("More than %s bytes have been received", + self.info.size) + self._remaining -= size + self._onData(data) + + def handleResponseEnd(self): + if self.info is not None: + if self._remaining == 0: + self.log("Request done, got %d bytes starting at %d from %s, " + "last modified on %s", self.info.size, + self.info.start, self.url.toString(), + ts2str(self.info.mtime)) + self._streamDone() + return + if self.info: + self.log("Incomplete request, missing %d bytes from the expected " + "%d bytes starting at %d from %s", self._remaining, + self.info.size, self.info.start, self.url.toString()) + else: + self.log("Incomplete request %s", self.url.toString()) + + def sendCommand(self, command, path): + # We want HTTP/1.1 for conditional GET and range requests + self.transport.write('%s %s HTTP/1.1\r\n' % (command, path)) + + ### Private Methods ### + + def _keepActive(self): + self._updateCount += 1 + + def _resetIdleCheck(self): + self._cancelIdleCheck() + self._idlecheck = reactor.callLater(self.timeout, self._onIdleCheck) + + def _cancelIdleCheck(self): + if self._idlecheck: + self._idlecheck.cancel() + self._idlecheck = None + self._updateCount = 0 + + def _onIdleCheck(self): + self._idlecheck = None + if not self._updateCount: + self._onTimeout() + else: + self._resetIdleCheck() + + def _onTimeout(self): + self._idlecheck = None + self._serverError(common.SERVER_TIMEOUT, "Server timeout") + + def _cancel(self): + self._cancelIdleCheck() + if self.consumer: + if self.transport: + self.transport.loseConnection() + self.consumer = None + + def _serverError(self, code, message): + if self.consumer: + self.consumer.serverError(self, code, message) + self._cancel() + + def _conditionFail(self, code, message): + if self.consumer: + self.consumer.conditionFail(self, code, message) + self._cancel() + + def _streamNotAvailable(self, code, message): + if self.consumer: + self.consumer.streamNotAvailable(self, code, message) + self._cancel() + + def _onInfo(self, info): + if self.consumer: + self.consumer.onInfo(self, info) + + def _onData(self, data): + if self.consumer: + self.consumer.onData(self, data) + + def _streamDone(self): + if self.consumer: + self.consumer.streamDone(self) + self._cancel() + + +if __name__ == "__main__": + import sys + + def addarg(d, a): + k, v = a.split('=', 1) + if v == 'None': + d[k] = None + try: + d[k] = int(v) + except: + d[k] = v + + + kwargs = {} + for a in sys.argv[1:]: + addarg(kwargs, a) + + url = kwargs.pop('url') + + class DummyConsumer(object): + + def serverError(self, getter, code, message): + print "Failure: %s (%d)" % (message, code) + reactor.stop() + + def conditionFail(self, getter, code, message): + print "Condition: %s (%d)" % (message, code) + reactor.stop() + + def streamNotAvailable(self, getter, code, message): + print message + reactor.stop() + + def streamDone(self, getter): + print "Finished" + reactor.stop() + + def onInfo(self, getter, info): + exp = info.expires and http.datetimeToString(info.expires) + mod = info.mtime and http.datetimeToString(info.mtime) + print "Found, Exp:", exp, "Mod:", mod + print "Len:", info.length, "Start:", \ + info.start, "Size:", info.size + + def onData(self, getter, data): + #print "Data (%d)" % len(data) + pass + + + consumer = DummyConsumer() + requester = StreamRequester(5000, 5000) + requester.retrieve(consumer, http_utils.Url.fromString(url), **kwargs) + reactor.run() diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/http_utils.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/http_utils.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/http_utils.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/http_utils.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,173 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import urlparse +import urllib + +from twisted.web import http + +DEFAULT_PORTS = {'http': 80, + 'https': 443} + +DEFAULT_SCHEME = 'http' + + +def unparse_qs(query): + result = [] + for name, values in query.items(): + qname = urllib.quote(name) + for value in values: + result.append(qname + "=" + urllib.quote(value)) + return "&".join(result) + + +class _Dummy(object): + pass + + +class Url(object): + """ + Represents an HTTP URL. + Can parse and can be serialized to string. + """ + + @classmethod + def fromString(cls, url): + url = url.strip() + parsed = urlparse.urlparse(url) + + scheme = parsed[0] + path = parsed[2] + + location = urlparse.urlunparse(('', '')+parsed[2:]) + + if path == "": + path = "/" + location = "/" + location + + hostname = parsed[1] + username = None + password = None + port = None + + if '@' in hostname: + username, hostname = hostname.split('@', 1) + if ':' in username: + username, password = username.split(':', 1) + + host = hostname + + if ':' in hostname: + hostname, portstr = hostname.rsplit(':', 1) + port = int(portstr) + else: + port = DEFAULT_PORTS.get(scheme, None) + + + obj = _Dummy() + + obj.url = url + obj.scheme = scheme + obj.netloc = parsed[1] + obj.host = host + obj.path = path + obj.params = parsed[3] + obj.query = http.parse_qs(parsed[4], 1) + obj.fragment = parsed[5] + obj.location = location + obj.hostname = hostname + obj.username = username + obj.password = password + obj.port = port + + obj.__class__ = cls + + return obj + + def __init__(self, scheme=None, hostname=None, path="/", + params="", query={}, fragment="", + username=None, password=None, port=None): + + self.path = path + self.params = params + self.query = query + self.fragment = fragment + + if hostname: + # Absolute URL + if username: + if password: + netloc = username + ':' + password + '@' + hostname + else: + netloc = username + '@' + hostname + else: + netloc = hostname + + if not scheme: + scheme = DEFAULT_SCHEME + + host = hostname + + defport = DEFAULT_PORTS.get(scheme, None) + + if port: + if port != defport: + netloc = netloc + ':' + str(port) + host = host + ':' + str(port) + else: + port = defport + + self.scheme = scheme + self.netloc = netloc + self.host = host + self.hostname = hostname + self.username = username + self.password = password + self.port = port + + else: + # Relative URL + self.scheme = "" + self.netloc = "" + self.host = "" + self.hostname = "" + self.username = None + self.password = None + self.port = None + + query_string = unparse_qs(self.query) + quoted_path = urllib.quote(self.path) + + self.location = urlparse.urlunparse(('', '', quoted_path, self.params, + query_string, self.fragment)) + + self.url = urlparse.urlunparse((self.scheme, self.netloc, quoted_path, + self.params, query_string, + self.fragment)) + + def toString(self): + return self.url + + def __repr__(self): + return self.url + +if __name__ == "__main__": + import sys + + url = Url.fromString(sys.argv[1]) + for a, v in url.__dict__.items(): + print a, ":", v diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/__init__.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/__init__.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev: 5969 $" diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/Makefile.am flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/Makefile.am --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,26 @@ +include $(top_srcdir)/common/python.mk + +cachedhttpdir = $(libdir)/flumotion/python/flumotion/component/misc/httpserver/httpcached + +cachedhttp_PYTHON = \ + __init__.py \ + common.py \ + file_provider.py \ + file_reader.py \ + http_client.py \ + http_utils.py \ + request_manager.py \ + resource_manager.py \ + server_selection.py \ + strategy_base.py \ + strategy_basic.py + +cachedhttp_DATA = \ + httpcached.xml + +TAGS_FILES = $(cachedhttp_PYTHON) + +clean-local: + rm -rf *.pyc *.pyo + +EXTRA_DIST = $(cachedhttp_PYTHON) $(cachedhttp_DATA) diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/Makefile.in flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/Makefile.in --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -0,0 +1,553 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(cachedhttp_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/misc/httpserver/httpcached +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(cachedhttpdir)" \ + "$(DESTDIR)$(cachedhttpdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(cachedhttp_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +cachedhttpdir = $(libdir)/flumotion/python/flumotion/component/misc/httpserver/httpcached +cachedhttp_PYTHON = \ + __init__.py \ + common.py \ + file_provider.py \ + file_reader.py \ + http_client.py \ + http_utils.py \ + request_manager.py \ + resource_manager.py \ + server_selection.py \ + strategy_base.py \ + strategy_basic.py + +cachedhttp_DATA = \ + httpcached.xml + +TAGS_FILES = $(cachedhttp_PYTHON) +EXTRA_DIST = $(cachedhttp_PYTHON) $(cachedhttp_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/misc/httpserver/httpcached/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/misc/httpserver/httpcached/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-cachedhttpPYTHON: $(cachedhttp_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(cachedhttpdir)" || $(MKDIR_P) "$(DESTDIR)$(cachedhttpdir)" + @list='$(cachedhttp_PYTHON)'; dlist=; list2=; test -n "$(cachedhttpdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cachedhttpdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(cachedhttpdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(cachedhttpdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(cachedhttpdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-cachedhttpPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(cachedhttp_PYTHON)'; test -n "$(cachedhttpdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(cachedhttpdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(cachedhttpdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(cachedhttpdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(cachedhttpdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(cachedhttpdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(cachedhttpdir)" && rm -f $$fileso +install-cachedhttpDATA: $(cachedhttp_DATA) + @$(NORMAL_INSTALL) + test -z "$(cachedhttpdir)" || $(MKDIR_P) "$(DESTDIR)$(cachedhttpdir)" + @list='$(cachedhttp_DATA)'; test -n "$(cachedhttpdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cachedhttpdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(cachedhttpdir)" || exit $$?; \ + done + +uninstall-cachedhttpDATA: + @$(NORMAL_UNINSTALL) + @list='$(cachedhttp_DATA)'; test -n "$(cachedhttpdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(cachedhttpdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(cachedhttpdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(cachedhttpdir)" "$(DESTDIR)$(cachedhttpdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-cachedhttpDATA install-cachedhttpPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-cachedhttpDATA uninstall-cachedhttpPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-cachedhttpDATA install-cachedhttpPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-cachedhttpDATA uninstall-cachedhttpPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/request_manager.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/request_manager.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/request_manager.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/request_manager.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,179 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + + +from flumotion.common import log +from flumotion.component.misc.httpserver.httpcached import common +from flumotion.component.misc.httpserver.httpcached import http_utils +from flumotion.component.misc.httpserver.httpcached import server_selection + + +LOG_CATEGORY = "request-manager" + + +class RequestManager(log.Loggable): + + logCategory = LOG_CATEGORY + + def __init__(self, selector, client): + """ + Selector: a ServerSelector + Client: HttpClient (StreamRequester) + """ + self.selector = selector + self.client = client + + def retrieve(self, consumer, url, + ifModifiedSince=None, ifUnmodifiedSince=None, + start=None, size=None): + """ + Consumer: a StreamConsumer + Url: + Start: Position from which to start the download + Size: Number of bytes to download + IfModifiedSince: + IfUnmodifiedSince: + """ + servers = self.selector.getServers() + consumer_manager = ConsumerManager(consumer, url, start, size, + ifModifiedSince, ifUnmodifiedSince, + servers, self.client) + return consumer_manager.retrieve() + + def setup(self): + return self.selector.setup() + + def cleanup(self): + return self.selector.cleanup() + + +class ConsumerManager(common.StreamConsumer, log.Loggable): + + logCategory = LOG_CATEGORY + + def __init__(self, consumer, url, start, size, ifModifiedSince, + ifUnmodifiedSince, servers, client): + self.consumer = consumer + self.url = url + self.start = start + self.size = size + self.ifModifiedSince = ifModifiedSince + self.ifUnmodifiedSince = ifUnmodifiedSince + self.servers = servers + self.client = client + self.current_server = None + self.current_request = None + self.last_error = None + self.last_message = None + + self.logName = common.log_id(self) # To be able to track the instance + + @property + def host(self): + if self.current_request: + return self.current_request.host + return None + + @property + def port(self): + if self.current_request: + return self.current_request.port + return None + + def retrieve(self): + try: + s = self.servers.next() + self.current_server = s + if self.size is None or self.start is None: + self.debug("Retrieving %s from %s:%s", self.url, + self.current_server.ip, self.current_server.port) + else: + self.debug("Retrieving range %s-%s (%s B) of %s from %s:%s", + self.start, self.start + self.size, self.size, + self.url, self.current_server.ip, + self.current_server.port) + proxy_address = s.ip + proxy_port = s.port + self.current_request =\ + self.client.retrieve(self, self.url, + proxyAddress=proxy_address, + proxyPort=proxy_port, + ifModifiedSince=self.ifModifiedSince, + ifUnmodifiedSince=self.ifUnmodifiedSince, + start=self.start, size=self.size) + self.log("Retrieving data using %s", self.current_request.logName) + return self + except StopIteration: + code = self.last_error or common.SERVER_UNAVAILABLE + message = self.last_message or "" + self.consumer.serverError(self, code, message) + return self + + def pause(self): + self.log("Pausing request %s", self.url) + self.current_request.pause() + + def resume(self): + self.log("Resuming request %s", self.url) + self.current_request.resume() + + def cancel(self): + self.debug("Canceling request %s", self.url) + self.current_request.cancel() + self.current_request = None + + def serverError(self, getter, code, message): + self.debug("Server Error %s (%s) for %s using %s:%s", + message, code, self.url, getter.host, getter.port) + self.last_error = code + self.last_message = message + if code in (common.SERVER_DISCONNECTED, + common.SERVER_TIMEOUT): + # The connection was established + # and data may have already been received. + self.consumer.serverError(self, code, message) + return + self.current_server.reportError(code) + self.retrieve() + + def conditionFail(self, getter, code, message): + if self.current_request is None: + return + self.log("Condition Error %s (%s) for %s", + message, code, self.url) + self.consumer.conditionFail(self, code, message) + + def streamNotAvailable(self, getter, code, message): + if self.current_request is None: + return + self.log("Stream not available \"%s\" for %s", message, self.url) + self.consumer.streamNotAvailable(self, code, message) + + def onInfo(self, getter, info): + if self.current_request is None: + return + self.consumer.onInfo(self, info) + + def onData(self, getter, data): + if self.current_request is None: + return + self.consumer.onData(self, data) + + def streamDone(self, getter): + if self.current_request is None: + return + self.consumer.streamDone(self) diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/resource_manager.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/resource_manager.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/resource_manager.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/resource_manager.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,154 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import errno + +from twisted.internet import defer + +from flumotion.common import log + +from flumotion.component.misc.httpserver import fileprovider +from flumotion.component.misc.httpserver import cachestats + +LOG_CATEGORY = "resource-manager" + + +errnoLookup = {errno.ENOENT: fileprovider.NotFoundError, + errno.EISDIR: fileprovider.CannotOpenError, + errno.EACCES: fileprovider.AccessError} + + +class DataSource(object): + """ + Base class for all resources data source. + """ + + url = None + identifier = None + mimeType = None + mtime = None + size = None + + def read(self, offset, size): + raise NotImplementedError() + + def close(self): + raise NotImplementedError() + + +class ResourceManager(log.Loggable): + """ + Provide file-like resources for URLs. + """ + + logCategory = LOG_CATEGORY + + def __init__(self, strategy, stats): + self.strategy = strategy + self.stats = stats + + def getResourceFor(self, url): + self.debug("Resource requested with %s", url) + + stats = cachestats.RequestStatistics(self.stats) + + d = defer.Deferred() + d.addCallback(self.strategy.getSourceFor, stats) + d.addCallback(Resource, stats) + + d.callback(url) + + return d + + +class Resource(object): + """ + Offers a file-like interface of a data source. + Handle errors and asynchronous readings and file offset. + """ + + def __init__(self, source, stats): + self._open(source) + self._offset = 0 + self._reading = False + self.stats = stats + + def getMimeType(self): + return self.mimeType + + def getmtime(self): + return self._source.mtime + + def getsize(self): + return self._source.size + + def tell(self): + return self._offset + + def seek(self, offset): + self._check() + self._offset = offset + + def read(self, size): + self._check() + assert not self._reading, "Simultaneous read not supported" + try: + d = self._source.read(self._offset, size) + if isinstance(d, defer.Deferred): + self._reading = True + return d.addCallback(self._cbUpdateOffset) + self._offset += len(d) + return defer.succeed(d) + except IOError, e: + cls = errnoLookup.get(e.errno, fileprovider.FileError) + return defer.fail(cls("Failed to read data: %s", str(e))) + except: + return defer.fail() + + def produce(self, consumer, fromOffset=None): + """ + Returns a producer that produce data from the specified position + or from the current position if None is specified. + Can return None if a producer cannot be provided or is not convenient. + """ + self._check() + return self._source.produce(consumer, fromOffset or self._offset) + + def close(self): + self._check() + self._source.close() + self._source = None + + def getLogFields(self): + return self.stats.getLogFields() + + ### Protected Methods ### + + def _check(self): + if self._source is None: + raise fileprovider.FileClosedError("File Closed") + + def _open(self, source): + self._source = source + self.mimeType = source.mimeType + + ### Private Methods ### + + def _cbUpdateOffset(self, data): + self._reading = False + self._offset += len(data) + return data diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/server_selection.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/server_selection.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/server_selection.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/server_selection.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,173 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + + +import operator +import random +import socket + +from twisted.internet import base, defer, threads, reactor +from twisted.python import threadpool +from flumotion.common import log + +DEFAULT_PRIORITY = 1.0 +DEFAULT_REFRESH_TIMEOUT = 300 + +LOG_CATEGORY = "server-selector" + + +class ThreadedResolver(base.ThreadedResolver): + + def __init__(self, reactor, sk=socket): + base.ThreadedResolver.__init__(self, reactor) + self.socket = sk + + def getHostByNameEx(self, name, timeout = (1, 3, 11, 45)): + if timeout: + timeoutDelay = reduce(operator.add, timeout) + else: + timeoutDelay = 60 + userDeferred = defer.Deferred() +# lookupDeferred = threads.deferToThreadPool( +# self.reactor, self.reactor.getThreadPool(), + lookupDeferred = threads.deferToThread( + self.socket.gethostbyname_ex, name) + cancelCall = self.reactor.callLater( + timeoutDelay, self._cleanup, name, lookupDeferred) + self._runningQueries[lookupDeferred] = (userDeferred, cancelCall) + lookupDeferred.addBoth(self._checkTimeout, name, lookupDeferred) + return userDeferred + + +class ServerSelector(log.Loggable): + + logCategory = LOG_CATEGORY + + def __init__(self, timeout=DEFAULT_REFRESH_TIMEOUT, sk=socket): + self.servers = {} + self.hostnames = {} + self.timeout = timeout + self.socket = socket + + self._resolver = ThreadedResolver(reactor, sk) + self._refresh = None + + def _addCallback(self, h, hostname, port, priority): + ip_list = h[2] + for ip in ip_list: + s = Server(ip, port, priority) + if s not in self.servers[priority]: + self.servers[priority].append(s) + + self.hostnames[hostname] = (ip_list, priority, port) + + def _addErrback(self, err): + self.warning("Could not resolve host %s", + log.getFailureMessage(err)) + return + + def addServer(self, hostname, port, priority=DEFAULT_PRIORITY): + """ + Add a hostname to the list of servers, with a priority. (in + increasing order, 1 comes before 2). + + @return None + """ + self.hostnames[hostname] = ([], priority, port) + if priority not in self.servers: + self.servers[priority] = [] + + d = self._resolver.getHostByNameEx(hostname) + d.addCallbacks(self._addCallback, + self._addErrback, + callbackArgs=(hostname, port, priority)) + return d + + def getServers(self): + """ + Order the looked up servers by priority, and return them. + + @return a generator of Server + """ + priorities = self.servers.keys() + priorities.sort() + for p in priorities: + servers = self.servers[p] + random.shuffle(servers) + for s in servers: + yield s + + def _refreshCallback(self, host, hostname): + # FIXME: improve me, avoid data duplication, Server info loss.. + new_ips = host[2] + old_ips, priority, port = self.hostnames[hostname] + to_be_added = [ip for ip in new_ips if ip not in old_ips] + to_be_removed = [ip for ip in old_ips if ip not in new_ips] + servers = self.servers[priority] + for ip in to_be_added: + servers.append(Server(ip, port, priority)) + self.hostnames[hostname][0].append(ip) + for ip in to_be_removed: + for s in servers: + if s.ip == ip: + servers.remove(s) + self.hostnames[hostname][0].remove(ip) + self.servers[priority] = servers + + def refreshServers(self): + dl = [] + for h in self.hostnames.keys(): + d = self._resolver.getHostByNameEx(h) + d.addCallbacks(self._refreshCallback, self._addErrback, + callbackArgs=(h, )) + dl.append(d) + self._resetRefresh() + d = defer.DeferredList(dl) + d.addCallback(lambda _: self) + return d + + def _resetRefresh(self): + if self.timeout: + self._refresh = reactor.callLater(self.timeout, self._onRefresh) + + def _onRefresh(self): + self.refreshServers() + + def setup(self): + return self.refreshServers() + + def cleanup(self): + if self._refresh: + self._refresh.cancel() + self._refresh = None + + +class Server(object): + + def __init__(self, ip, port, priority): + self.ip = ip + self.port = port + self.priority = priority + + def reportError(self, code): + pass + + def __repr__(self): + return "<%s: %s:%d>" % (type(self).__name__, self.ip, self.port) + + def __eq__(self, other): + return self.__dict__ == other.__dict__ diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/strategy_base.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/strategy_base.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/strategy_base.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/strategy_base.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,1101 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import stat +from cStringIO import StringIO +import time + +from twisted.internet import defer, reactor, abstract + +from flumotion.common import log + +from flumotion.component.misc.httpserver import fileprovider +from flumotion.component.misc.httpserver import ourmimetypes +from flumotion.component.misc.httpserver import cachestats +from flumotion.component.misc.httpserver.httpcached import common +from flumotion.component.misc.httpserver.httpcached import resource_manager + +EXP_TABLE_CLEANUP_PERIOD = 30 +MAX_RESUME_COUNT = 20 + +# A RemoteProducer will not be able to +# produce faster than 6.25 Mibit/s (6.55 Mbit/s) +PRODUCING_PERIOD = 0.08 + + +class ConditionError(Exception): + """ + Raised when a request used by a caching session + was using a conditional retrieval and it fails. + """ + + def __init__(self, *args, **kwargs): + self.code = kwargs.pop("code", None) + Exception.__init__(self, *args, **kwargs) + + def __str__(self): + return "<%s: %s>" % (type(self).__name__, repr(self.code)) + + +class CachingStrategy(log.Loggable): + """ + Base class for all caching strategies. + + Handles the cache lookup, cache expiration checks, + statistics gathering and caching sessions managment. + """ + + logCategory = "base-caching" + + def __init__(self, cachemgr, reqmgr, ttl): + self.cachemgr = cachemgr + self.reqmgr = reqmgr + self.ttl = ttl + + self._identifiers = {} # {IDENTIFIER: CachingSession} + self._etimes = {} # {IDENTIFIER: EXPIRATION_TIME} + + self._cleanupCall = None + + def setup(self): + self._startCleanupLoop() + return self.reqmgr.setup() + + def cleanup(self): + self._stopCleanupLoop() + self.reqmgr.cleanup() + for session in self._identifiers.values(): + session.cancel() + return self + + def getSourceFor(self, url, stats): + identifier = self.cachemgr.getIdentifier(url.path) + session = self._identifiers.get(identifier, None) + if session is not None and not session.checkModified: + self.debug("Caching session found for '%s'", url) + + if (session.getState() in + (CachingSession.DETACHED, CachingSession.CACHED)): + stats.onStarted(session.size, cachestats.CACHE_HIT) + elif (session.getState() in + (CachingSession.REQUESTING, CachingSession.BUFFERING, + CachingSession.CACHING)): + stats.onStarted(session.size, cachestats.TEMP_HIT) + else: + stats.onStarted(session.size, cachestats.CACHE_MISS) + + # Wait to know session info like mtime and size + d = session.waitInfo() + d.addCallback(RemoteSource, stats) + return d + + self.log("Looking for cached file for '%s'", url) + d = defer.Deferred() + d.addCallback(self.cachemgr.openCacheFile) + d.addErrback(self._cachedFileError, url) + d.addCallback(self._gotCachedFile, url, identifier, stats) + + d.callback(url.path) + + return d + + def requestData(self, url, offset=None, size=None, mtime=None): + requester = BlockRequester(self.reqmgr, url, mtime) + return requester.retrieve(offset, size) + + def getSessions(self): + return self._identifiers.values() + + def keepCacheAlive(self, identifier, ttl=None): + self._etimes[identifier] = time.time() + (ttl or self.ttl) + + ### To Be Overridden ### + + def _onCacheMiss(self, url, stats): + raise NotImplementedError() + + def _onCacheOutdated(self, url, identifier, cachedFile, stats): + raise NotImplementedError() + + ### Protected Methods ### + + def _startCleanupLoop(self): + assert self._cleanupCall is None, "Already started" + self._cleanupCall = reactor.callLater(EXP_TABLE_CLEANUP_PERIOD, + self._cleanupLoop) + + def _stopCleanupLoop(self): + if self._cleanupCall: + self._cleanupCall.cancel() + self._cleanupCall = None + + def _cleanupLoop(self): + self._cleanupCall = None + self._cleanupExpirationTable() + self._startCleanupLoop() + + def _cleanupExpirationTable(self): + now = time.time() + expired = [i for i, e in self._etimes.items() if e < now] + for ident in expired: + del self._etimes[ident] + + def _onNewSession(self, session): + identifier = session.identifier + old = self._identifiers.get(identifier, None) + if old is not None: + old.cancel() + self._identifiers[session.identifier] = session + + def _onSessionCanceled(self, session): + if self._identifiers[session.identifier] == session: + del self._identifiers[session.identifier] + + def _onResourceCached(self, session): + self.keepCacheAlive(session.identifier) + del self._identifiers[session.identifier] + + def _onResourceError(self, session, error): + del self._identifiers[session.identifier] + + def _cachedFileError(self, failure, url): + if failure.check(fileprovider.FileError): + self.debug("Error looking for cached file for '%s'", url) + return None + return failure + + def _gotCachedFile(self, cachedFile, url, identifier, stats): + if cachedFile is not None: + self.log("Opened cached file '%s'", cachedFile.name) + etime = self._etimes.get(identifier, None) + session = self._identifiers.get(identifier, None) + if (etime and (etime > time.time()) or + (session and session.checkModified)): + stats.onStarted(cachedFile.stat[stat.ST_SIZE], + cachestats.CACHE_HIT) + return CachedSource(identifier, url, cachedFile, stats) + self.debug("Cached file may have expired '%s'", cachedFile.name) + return self._onCacheOutdated(url, identifier, cachedFile, stats) + self.debug("Resource not cached '%s'", url) + return self._onCacheMiss(url, stats) + + +class CachedSource(resource_manager.DataSource): + """ + Data source that read data directly from a localy cached file. + """ + + mimetypes = ourmimetypes.MimeTypes() + + def __init__(self, ident, url, cachedFile, stats): + self.identifier = ident + self.url = url + self._file = cachedFile + self.stats = stats + + self.mimeType = self.mimetypes.fromPath(url.path) + self.mtime = cachedFile.stat[stat.ST_MTIME] + self.size = cachedFile.stat[stat.ST_SIZE] + + self._current = cachedFile.tell() + + def produce(self, consumer, offset): + # A producer for a cached file is not really convenient + # because it's better used pulling than pushing. + return None + + def read(self, offset, size): + if offset != self._current: + self._file.seek(offset) + data = self._file.read(size) + size = len(data) + self.stats.onBytesRead(0, size, 0) + self._current = offset + size + return data + + def close(self): + self.stats.onClosed() + self._file.close() + self._file = None + + +class BaseRemoteSource(resource_manager.DataSource): + """ + Base class for resource not yet cached. + It offers a push producer, it delegates read operations + to the session and start a block pipelining if the session + cannot serve the requested data. + Updates the cache statistics. + """ + + strategy = None + session = None + stats = None + + def produce(self, consumer, offset): + return RemoteProducer(consumer, self.session, offset, self.stats) + + def read(self, offset, size): + if offset >= self.size: + return "" # EOF + data = self.session.read(offset, size) + if data is not None: + # Adjust the cache/source values to take copy into account + # FIXME: ask sebastien if he is on crack or LSD + size = len(data) + diff = min(self.session._correction, size) + self.session._correction -= diff + self.stats.onBytesRead(0, size, diff) # from cache + return data + d = self.strategy.requestData(self.url, offset, size, self.mtime) + d.addCallback(self._requestDataCb) + d.addErrback(self._requestDataFailed) + return d + + def _requestDataFailed(self, failure): + if failure.check(fileprovider.FileOutOfDate): + self.session.cancel() + return failure + + def _requestDataCb(self, data): + self.stats.onBytesRead(len(data), 0, 0) # from remote source + return data + + +class RemoteSource(BaseRemoteSource): + """ + Simple remote source. + """ + + def __init__(self, session, stats): + self.session = session + self.stats = stats + + self.strategy = session.strategy + self.identifier = session.identifier + self.url = session.url + self.mimeType = session.mimeType + self.mtime = session.mtime + self.size = session.size + + session.addref() + + def close(self): + self.stats.onClosed() + self.session.delref() + self.session = None + + +class BaseCachingSession(object): + """ + Base class of caching sessions. + Just an interface to be implemented or inherited + by all caching sessions. + """ + + strategy = None + url = None + size = 0 + mtime = None + mimeType = None + + def read(self, offset, size): + return None + + def cancel(self): + raise NotImplementedError() + + def addref(self): + raise NotImplementedError() + + def delref(self): + raise NotImplementedError() + + +class CachingSession(BaseCachingSession, log.Loggable): + """ + Caches a stream locally in a temporary file. + The already cached data can be read from the session. + + Can be canceled, meaning the session is not valid anymore. + + Can be aborted, meaning the session will stop caching locally + but is still valid. + + The caching operation can be started at any moment, but the + session have to receive the stream info before it can be used + with a RemoteSource instance. + + It can recover request failures up to MAX_RESUME_COUNT times. + """ + + logCategory = "caching-session" + + (PIPELINING, + REQUESTING, + BUFFERING, + CACHING, + CACHED, + DETACHED, + CLOSED, + CANCELED, + ABORTED, + ERROR) = range(10) + + mimetypes = ourmimetypes.MimeTypes() + + def __init__(self, strategy, url, cache_stats, ifModifiedSince=None): + self.strategy = strategy + self.url = url + self.identifier = strategy.cachemgr.getIdentifier(url.path) + + self.ifModifiedSince = ifModifiedSince + self.cache_stats = cache_stats + + self._refcount = 0 + self._state = self.PIPELINING + self._request = None + + self.checkModified = False + + self._infoDefers = [] + self._startedDefers = [] + self._finishedDefers = [] + self._errorValue = None + + self._file = None + self._bytes = 0 + self._correction = 0 + + self._resumes = MAX_RESUME_COUNT + + self.logName = common.log_id(self) # To be able to track the instance + + self.strategy._onNewSession(self) + + self.log("Caching session created for %s", url) + + def isActive(self): + return (self._state < self.CLOSED) or (self._state == self.ABORTED) + + def getState(self): + return self._state + + def cache(self): + """ + Starts caching the remote resource locally. + """ + if self._state != self.PIPELINING: + return + + self._state = self.REQUESTING + + self.debug("Caching requested for %s", self.url) + self.cache_stats.onCopyStarted() + + self._firstRetrieve() + + def waitInfo(self): + if self._state < self.BUFFERING: + d = defer.Deferred() + self._infoDefers.append(d) + return d + if self._state <= self.CLOSED: + return defer.succeed(self) + return defer.fail(self._errorValue) + + def waitStarted(self): + if self._state <= self.REQUESTING: + d = defer.Deferred() + self._startedDefers.append(d) + return d + if self._state <= self.CLOSED: + return defer.succeed(self) + return defer.fail(self._errorValue) + + def waitFinished(self): + if self._state < self.DETACHED: + d = defer.Deferred() + self._finishedDefers.append(d) + return d + if self._state <= self.CLOSED: + return defer.succeed(self) + return defer.fail(self._errorValue) + + def read(self, offset, size): + if self._state == self.CANCELED: + raise fileprovider.FileOutOfDate("File out of date") + if self._state == self.ABORTED: + return None + if self._state >= self.CLOSED: + raise fileprovider.FileClosedError("Session Closed") + + if self._file is None: + return None + + if min(self.size, offset + size) > self._bytes: + return None + + self._file.seek(offset) + return self._file.read(size) + + def cancel(self): + """ + After calling this method the session cannot be used anymore. + """ + if self._state < self.REQUESTING or self._state >= self.CACHED: + return + + self.log("Canceling caching session for %s", self.url) + + self.strategy._onSessionCanceled(self) + self.cache_stats.onCopyCancelled(self.size, self._bytes) + + self._close() + + error = fileprovider.FileOutOfDate("File out of date") + self._fireError(error) + + if self._request: + self.debug("Caching canceled for %s (%d/%d Bytes ~ %d %%)", + self.url, self._bytes, self.size, + self.size and int(self._bytes * 100 / self.size)) + self._request.cancel() + self._request = None + else: + self.debug("Caching canceled before starting to cache") + + self._state = self.CANCELED + + def abort(self): + """ + After calling this method the session will just stop caching + and return None when trying to read. Used when pipelining is wanted. + """ + if self._state < self.REQUESTING or self._state >= self.CACHED: + return + + self.log("Aborting caching session for %s", self.url) + + self.strategy._onSessionCanceled(self) + self.cache_stats.onCopyCancelled(self.size, self._bytes) + + self._close() + + error = fileprovider.FileError("Caching aborted") + self._fireError(error) + + if self._request: + self.debug("Caching aborted for %s", self.url) + self._request.cancel() + self._request = None + else: + self.debug("Caching aborted before starting to cache") + + self._state = self.ABORTED + + def addref(self): + self._refcount += 1 + + def delref(self): + self._refcount -= 1 + if self._refcount == 0: + if self._state == self.DETACHED: + # not referenced, so no we can close the file + self.log("Detached session not referenced anymore") + self._close() + + def isref(self): + return self._refcount > 0 + + ### StreamConsumer ### + + def serverError(self, getter, code, message): + self.warning("Session request error %s (%s) for %s using %s:%s", + message, code, self.url, getter.host, getter.port) + if code in (common.SERVER_DISCONNECTED, common.SERVER_TIMEOUT): + if self._resumes > 0: + self._resumes -= 1 + if self._state > self.REQUESTING: + # We already have request info + offset = self._bytes + size = self.size - self._bytes + self.debug("Resuming retrieval from offset %d with " + "size %d of %s (%d tries left)", offset, size, + self.url, self._resumes) + + self._resumeRetrieve(offset, size) + return + else: + # We don't have any info, e must retry from scratch + self.debug("Resuming retrieval from start of %s " + "(%d tries left)", self.url, self._resumes) + self._firstRetrieve() + return + self.debug("Too much resuming intents, stopping " + "after %d of %s bytes of %s", + self._bytes, self.size, self.url) + self._close() + self._error(fileprovider.UnavailableError(message)) + + def conditionFail(self, getter, code, message): + if code == common.STREAM_MODIFIED: + # Modified file detected during recovery + self.log("Modifications detected during recovery of %s", self.url) + self.cancel() + return + self.log("Unexpected HTTP condition failed: %s", message) + self._close() + self._error(ConditionError(message, code=code)) + + def streamNotAvailable(self, getter, code, message): + self.log("Stream to be cached is not available: %s", message) + self._close() + if code == common.STREAM_NOTFOUND: + self._error(fileprovider.NotFoundError(message)) + elif code == common.STREAM_FORBIDDEN: + self._error(fileprovider.AccessError(message)) + else: + self._error(fileprovider.FileError(message)) + + def onInfo(self, getter, info): + if self._state == self.BUFFERING: + # We are resuming while waiting for a temporary file, + # so we still don't want to accumulate data + self._request.pause() + return + + if self._state != self.REQUESTING: + # Already canceled, or recovering from disconnection + return + + if info.size != (info.length - self._bytes): + self.log("Unexpected stream size: %s / %s bytes " + "(Already got %s bytes)", + info.size, info.length, self._bytes) + self._close() + msg = "Unexpected resource size: %d" % info.size + self._error(fileprovider.FileError(msg)) + return + + self._state = self.BUFFERING + + self.mimeType = self.mimetypes.fromPath(self.url.path) + self.mtime = info.mtime + self.size = info.size + + self.log("Caching session with type %s, size %s, mtime %s for %s", + self.mimeType, self.size, self.mtime, self.url) + + self._file = StringIO() # To wait until we got the real one + + self.log("Requesting temporary file for %s", self.url) + d = self.strategy.cachemgr.newTempFile(self.url.path, info.size, + info.mtime) + + # But we don't want to accumulate data + # but it is possible to receive a small amount of data + # even after calling pause(), so we need buffering. + self._request.pause() + + # We have got meta data, so callback + self._fireInfo(self) + self._fireStarted(self) + + self.debug("Start buffering %s", self.url) + d.addCallback(self._gotTempFile) + + def _gotTempFile(self, tempFile): + if self._state not in (self.BUFFERING, self.CACHED): + # Already canceled + if tempFile: + tempFile.close() + return + + if tempFile is None: + self.warning("Temporary file creation failed, " + "aborting caching of %s", self.url) + self.abort() + return + + self.log("Got temporary file for %s", self.url) + + self.debug("Start caching %s", self.url) + + data = self._file.getvalue() + self._file = tempFile + tempFile.write(data) + + if self._request is not None: + # We still have a request, so we want more data of it + self._request.resume() + + if self._state == self.CACHED: + # Already got all the data + self._real_complete() + else: + self._state = self.CACHING + + def onData(self, getter, data): + assert self._state in (self.BUFFERING, self.CACHING), "Not caching" + self._file.seek(self._bytes) + size = len(data) + try: + self._file.write(data) + except Exception, e: + self.warning("Error writing in temporary file: %s", e) + self.debug("Got %s / %s bytes, would be %s with %s more", + self._bytes, self.size, self._bytes + size, size) + self.abort() + else: + self._bytes += size + self._correction += size + + def streamDone(self, getter): + assert self._state in (self.BUFFERING, self.CACHING), "Not caching" + self._request = None + self._complete() + + def _error(self, error): + assert self._state < self.CANCELED, "Wrong state for errors" + + self.log("Caching error for %s: %s", self.url, error) + + self._state = self.ERROR + + self.strategy._onResourceError(self, error) + self.strategy = None + self._request = None + + self._fireError(error) + + def _fireInfo(self, value): + defers = list(self._infoDefers) + # Prevent multiple deferred firing due to reentrence + self._infoDefers = [] + for d in defers: + d.callback(value) + + def _fireStarted(self, value): + defers = list(self._startedDefers) + # Prevent multiple deferred firing due to reentrence + self._startedDefers = [] + for d in defers: + d.callback(value) + + def _fireFinished(self, value): + defers = list(self._finishedDefers) + # Prevent multiple deferred firing due to reentrence + self._finishedDefers = [] + for d in defers: + d.callback(value) + + def _fireError(self, error): + self._errorValue = error + defers = list(self._infoDefers) + defers.extend(self._startedDefers) + defers.extend(self._finishedDefers) + # Prevent multiple deferred firing due to reentrence + self._infoDefers = [] + self._startedDefers = [] + self._finishedDefers = [] + for d in defers: + d.errback(error) + + def _close(self): + if self._state >= self.CLOSED: + return + + self.log("Closing caching session for %s", self.url) + + if self._state >= self.BUFFERING: + self._file.close() + self._file = None + + self._state = self.CLOSED + + def _complete(self): + assert self._state in (self.CACHING, self.BUFFERING), "Not caching" + self.debug("Finished caching %s (%d Bytes)", self.url, self.size) + + oldstate = self._state + self._state = self.CACHED + + if oldstate != self.BUFFERING: + self._real_complete() + + def _real_complete(self): + assert self._state == self.CACHED, "Not cached" + self._state = self.DETACHED + self.log("Caching session detached for %s", self.url) + + self._file.complete() + + self.strategy._onResourceCached(self) + self.strategy = None + + if not self.isref(): + # Not referenced anymore by sources, so close the session + self.log("Caching session not referenced, it can be closed") + self._close() + + self.cache_stats.onCopyFinished(self.size) + self._fireFinished(self) + + def _firstRetrieve(self): + since = self.ifModifiedSince + self._request = self.strategy.reqmgr.retrieve(self, self.url, + ifModifiedSince=since) + self.log("Retrieving data using %s", self._request.logName) + + def _resumeRetrieve(self, offset, size): + reqmgr = self.strategy.reqmgr + req = reqmgr.retrieve(self, self.url, + ifUnmodifiedSince=self.mtime, + start=offset, size=size) + self._request = req + self.log("Retrieving data using %s", self._request.logName) + + +class RemoteProducer(common.StreamConsumer, log.Loggable): + """ + Offers a IPushProducer interface to a caching session. + It starts producing data from the specified point. + + If the data is already cached by the session, + it produce data with a reactor loop reading the data + from the session by block. + + If the data is not yet cached, it starts a request + using the request manager and pipeline the data + to the specified consumer. + + It can recover request failures up to MAX_RESUME_COUNT times. + + It's not used yet in the context of http-server. + Until now, the simulations show that using a producer with + long-lived HTTP requests instead of short lived block request + is less efficient and produce bigger latency for the clients. + At least when used with HTTP proxies. + """ + + logCategory = "pipe-producer" + + def __init__(self, consumer, session, offset, stats): + self.consumer = consumer + self.offset = offset + self.session = session + self.stats = stats + self.reqmgr = session.strategy.reqmgr + + self.logName = common.log_id(self) # To be able to track the instance + + self._pipelining = False + self._paused = False + self._request = None + self._produced = 0 + self._resumes = MAX_RESUME_COUNT + self._call = None + + session.addref() + + self.log("Starting producing data with session %s from %s", + self.session.logName, self.session.url) + + consumer.registerProducer(self, True) # Push producer + self._produce() + + ### IPushProducer Methods ### + + def resumeProducing(self): + if self.consumer is None: + # Already stopped + return + + self._paused = False + + if self._pipelining: + # Doing pipelining + if self._request: + # Just resuming current request + self._request.resume() + else: + # Start a new one + self._pipeline() + else: + # Producing from session + self._produce() + + def pauseProducing(self): + if self.consumer is None: + # Already stopped + return + + self._paused = True + + if self._pipelining: + # Doing pipelining + if self._request: + self._request.pause() + else: + # Producing from session + self._stop() + + def stopProducing(self): + self.log("Ask to stop producing %s", self.session.url) + self._terminate() + + ### common.StreamConsumer Methods ### + + def serverError(self, getter, code, message): + if self._request is None: + # Already terminated + return + self._request = None + + if code in (common.SERVER_DISCONNECTED, common.SERVER_TIMEOUT): + self.warning("Producer request error %s (%s) for %s " + "(%s tries left)", message, code, + self.session.url, self._resumes) + + if self._resumes > 0: + self._resumes -= 1 + if self._paused: + self.log("Producer paused, waiting to recover pipelining " + "(%d tries left)", self._resumes) + else: + self.log("Recovering pipelining (%d tries left)", + self._resumes) + self._pipeline() + return + + self.debug("Too much resuming intents, stopping " + "after %d of %s", self._bytes, self.size) + + self._terminate() + + def conditionFail(self, getter, code, message): + if self._request is None: + # Already terminated + return + self._request = None + self.warning("Modifications detected while producing %s", + self.session.url) + self._terminate() + + def streamNotAvailable(self, getter, code, message): + if self._request is None: + # Already terminated + return + self._request = None + self.warning("%s detected while producing %s", + message, self.session.url) + self._terminate() + + def onData(self, getter, data): + if self._request is None: + # Already terminated + return + self._write(data) + + def streamDone(self, getter): + if self._request is None: + # Already terminated + return + self.log("Pipelining finished") + self._terminate() + + ### Private Methods ### + + def _produce(self): + self._call = None + if self.consumer is None: + # Already terminated + return + + data = self.session.read(self.offset + self._produced, + abstract.FileDescriptor.bufferSize) + + if data is None: + # The session can't serve the data, start pipelining + self._pipeline() + return + + if data == "": + # No more data + self.log("All data served from session") + self._terminate() + return + + self._write(data) + + self._call = reactor.callLater(PRODUCING_PERIOD, self._produce) + + def _write(self, data): + size = len(data) + self._produced += size + self.consumer.write(data) + + def _stop(self): + if self._call is not None: + self._call.cancel() + self._call = None + + def _pipeline(self): + if not self.session.isActive(): + self.log("Session %s not active anymore (%s), " + "aborting production of %s", + self.session.logName, + self.session._state, + self.session.url) + self._terminate() + return + + self._pipelining = True + + offset = self.offset + self._produced + size = self.session.size - offset + mtime = self.session.mtime + + if size == 0: + self.log("No more data to be retrieved, pipelining finished") + self._terminate() + return + + self.debug("Producing %s bytes from offset %d of %s", + size, offset, self.session.url) + + self._request = self.reqmgr.retrieve(self, self.session.url, + start=offset, size=size, + ifUnmodifiedSince=mtime) + self.log("Retrieving data using %s", self._request.logName) + + def _terminate(self): + if self._request: + # Doing pipelining + self._request.cancel() + self._request = None + + self._stop() # Stopping producing from session + + expected = self.session.size - self.offset + if self._produced != expected: + self.warning("Only produced %s of the %s bytes " + "starting at %s of %s", + self._produced, expected, + self.offset, self.session.url) + else: + self.log("Finished producing %s bytes starting at %s of %s", + self._produced, self.offset, self.session.url) + + self.consumer.unregisterProducer() + self.consumer.finish() + self.consumer = None + + self.session.delref() + self.session = None + + +class BlockRequester(common.StreamConsumer, log.Loggable): + """ + Retrieves a block of data using a range request. + A modification time can be specified for the retrieval to + fail if the requested file modification time changed. + + The data is returned as a block by triggering the deferred + returned by calling the retrieve method. + + It can recover request failures up to MAX_RESUME_COUNT times. + """ + + logCategory = "block-requester" + + def __init__(self, reqmgr, url, mtime=None): + self.reqmgr = reqmgr + self._url = url + self._mtime = mtime + self._data = None + self._deferred = None + self._offset = None + self._size = None + self._resumes = MAX_RESUME_COUNT + + self.logName = common.log_id(self) # To be able to track the instance + + def retrieve(self, offset, size): + assert self._deferred is None, "Already retrieving" + self._deferred = defer.Deferred() + self._data = [] + self._offset = offset + self._size = size + self._curr = 0 + + self._retrieve() + + return self._deferred + + def serverError(self, getter, code, message): + assert self._deferred is not None, "Not retrieving anything" + if code == common.RANGE_NOT_SATISFIABLE: + # Simulate EOF + self._deferred.callback("") + self._cleanup() + return + if code in (common.SERVER_DISCONNECTED, common.SERVER_TIMEOUT): + self.warning("Block request error: %s (%s)", message, code) + if self._resumes > 0: + self._resumes -= 1 + self.debug("Resuming block retrieval from offset %d " + "with size %d (%d tries left)", + self._offset, self._size, self._resumes) + + self._retrieve() + return + self.debug("Too much resuming intents, stopping " + "after %d of %d", self._offset, self._size) + self._deferred.errback(fileprovider.FileError(message)) + self._cleanup() + + def conditionFail(self, getter, code, message): + assert self._deferred is not None, "Not retrieving anything" + self._deferred.errback(fileprovider.FileOutOfDate(message)) + self._cleanup() + + def streamNotAvailable(self, getter, code, message): + assert self._deferred is not None, "Not retrieving anything" + error = fileprovider.FileOutOfDate(message) + self._deferred.errback(error) + self._cleanup() + + def onData(self, getter, data): + size = len(data) + self._offset += size + self._size -= size + self._data.append(data) + + def streamDone(self, getter): + data = "".join(self._data) + self._deferred.callback(data) + self._cleanup() + + def _retrieve(self): + self.reqmgr.retrieve(self, self._url, start=self._offset, + size=self._size, ifUnmodifiedSince=self._mtime) + + def _cleanup(self): + self._deferred = None + self._data = None diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/strategy_basic.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/strategy_basic.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpcached/strategy_basic.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpcached/strategy_basic.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,123 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import stat + +from twisted.internet import defer + +from flumotion.common import log + +from flumotion.component.misc.httpserver import fileprovider +from flumotion.component.misc.httpserver import cachestats +from flumotion.component.misc.httpserver.httpcached import common +from flumotion.component.misc.httpserver.httpcached import strategy_base + +LOG_CATEGORY = "basic-caching" + +EXPIRE_CHECK_TTL = 3 + + +class CachingStrategy(strategy_base.CachingStrategy): + """ + Simplistic caching strategy where all requested streams + are cached when requested. + + On each cache-miss, a caching session is created and started right away. + + When a cached file expire, a new session is created with the condition + that it has been modified. If not the cached file is used + and keep alive, if it succeed the cached file is deleted + and a new caching session is created and started. + + Updates the caching statistics. + """ + + logCategory = LOG_CATEGORY + + def __init__(self, cachemgr, reqmgr, ttl): + strategy_base.CachingStrategy.__init__(self, cachemgr, reqmgr, ttl) + + def _onCacheMiss(self, url, stats): + session = strategy_base.CachingSession(self, url, self.cachemgr.stats) + session.cache() + d = session.waitStarted() + d.addCallbacks(self._cbCreateSource, self._filterErrors, + callbackArgs=(stats, )) + return d + + def _onCacheOutdated(self, url, identifier, cachedFile, stats): + self.log("Checking if resource is outdated '%s'", url) + mtime = cachedFile.stat.st_mtime + sess = strategy_base.CachingSession(self, url, + self.cachemgr.stats, ifModifiedSince=mtime) + sess.cache() + sess.checkModified = True + d = sess.waitStarted() + args = (url, identifier, cachedFile, stats) + d.addCallbacks(self._reallyOutdated, self._maybeNotOutdated, + callbackArgs=args, errbackArgs=args) + return d + + def _reallyOutdated(self, session, url, identifier, cachedFile, stats): + self.debug("Resource outdated, caching the new one for '%s'", url) + session.checkModified = False + cachedFile.unlink() + cachedFile.close() + stats.onCacheOutdated() + stats.onStarted(session.size, cachestats.CACHE_MISS) + return strategy_base.RemoteSource(session, stats) + + def _maybeNotOutdated(self, failure, url, identifier, cachedFile, stats): + if failure.check(strategy_base.ConditionError): + # Not outdated, so we refresh the TTL + self.log("Resource not outdated, keep using " + "the cached one for '%s'", url) + self.keepCacheAlive(identifier) + stats.onStarted(cachedFile.stat[stat.ST_SIZE], + cachestats.CACHE_HIT) + return strategy_base.CachedSource(identifier, url, + cachedFile, stats) + + if failure.check(fileprovider.NotFoundError, fileprovider.AccessError): + # The file has been deleted or its rights have been revoked + self.debug("Resource deleted or forbidden, removing cached file") + cachedFile.close() + return failure + + if failure.check(fileprovider.FileError): + self.warning("Cached file expiration check fail, " + "using cached file anyway: %s", + failure.getErrorMessage()) + # Use a fixed small ttl to prevent doing an expiration check + # for all the files if the resource server is down. + self.keepCacheAlive(identifier, EXPIRE_CHECK_TTL) + stats.onStarted(cachedFile.stat[stat.ST_SIZE], + cachestats.CACHE_HIT) + return strategy_base.CachedSource(identifier, url, + cachedFile, stats) + + cachedFile.close() + return failure + + def _filterErrors(self, failure): + if failure.check(strategy_base.ConditionError): + raise fileprovider.FileError(failure.getErrorMessage()) + return failure + + def _cbCreateSource(self, session, stats): + stats.onStarted(session.size, cachestats.CACHE_MISS) + return strategy_base.RemoteSource(session, stats) diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpfile.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpfile.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpfile.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpfile.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_misc_httpserver -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import string @@ -31,45 +27,61 @@ pass from twisted.web import resource, server, http -from twisted.web import error as weberror, static -from twisted.internet import defer, reactor, error, abstract -from twisted.cred import credentials +from twisted.web import error as weberror +from twisted.internet import defer, reactor, abstract from twisted.python.failure import Failure from flumotion.configure import configure -from flumotion.component import component -from flumotion.common import log, messages, errors, netutils +from flumotion.common import log from flumotion.component.component import moods -from flumotion.component.misc.porter import porterclient from flumotion.component.misc.httpserver import fileprovider -from flumotion.component.base import http as httpbase -from flumotion.twisted import fdserver -__version__ = "$Rev: 8008 $" +# register serializables +from flumotion.common import messages + +__version__ = "$Rev$" LOG_CATEGORY = "httpserver" +try: + resource.ErrorPage + errorpage = resource +except AttributeError: + errorpage = weberror + -class BadRequest(weberror.ErrorPage): +class BadRequest(errorpage.ErrorPage): """ Web error for invalid requests """ def __init__(self, message="Invalid request format"): - weberror.ErrorPage.__init__(self, http.BAD_REQUEST, + errorpage.ErrorPage.__init__(self, http.BAD_REQUEST, "Bad Request", message) -class InternalServerError(weberror.ErrorPage): +class InternalServerError(errorpage.ErrorPage): """ Web error for internal failures """ def __init__(self, message="The server failed to complete the request"): - weberror.ErrorPage.__init__(self, http.INTERNAL_SERVER_ERROR, + errorpage.ErrorPage.__init__(self, http.INTERNAL_SERVER_ERROR, "Internal Server Error", message) +class ServiceUnavailableError(errorpage.ErrorPage): + """ + Web error for when the request cannot be served. + """ + + def __init__(self, message="The server is currently unable to handle " + "the request due to a temporary overloading " + "or maintenance of the server"): + errorpage.ErrorPage.__init__(self, http.SERVICE_UNAVAILABLE, + "Service Unavailable", message) + + class File(resource.Resource, log.Loggable): """ this file is inspired by/adapted from twisted.web.static @@ -79,10 +91,11 @@ defaultType = "application/octet-stream" - childNotFound = weberror.NoResource("File not found.") - forbiddenResource = weberror.ForbiddenResource("Access forbidden") + childNotFound = errorpage.NoResource("File not found.") + forbiddenerrorpage = errorpage.ForbiddenResource("Access forbidden") badRequest = BadRequest() internalServerError = InternalServerError() + serviceUnavailable = ServiceUnavailableError() def __init__(self, path, httpauth, mimeToResource=None, @@ -130,6 +143,13 @@ # PROBE: incoming request; see httpstreamer.resources self.debug('[fd %5d] (ts %f) incoming request %r', request.transport.fileno(), time.time(), request) + # Different headers not normally set in static.File... + # Specify that we will close the connection after this request, and + # that the client must not issue further requests. + # We do this because future requests on this server might actually need + # to go to a different process (because of the porter) + request.setHeader('Server', 'Flumotion/%s' % configure.version) + request.setHeader('Connection', 'close') d = self._httpauth.startAuthentication(request) d.addCallbacks(self._requestAuthenticated, self._authenticationFailed, @@ -162,7 +182,19 @@ # Something went wrong, log it self.warning("Failure during request rendering: %s", log.getFailureMessage(body)) - body = self.internalServerError.render(request) + if body.check(weberror.Error): + err = body.value + page = weberror.ErrorPage(err.status, err.message, + err.response) + elif body.check(fileprovider.UnavailableError): + page = self.serviceUnavailable + elif body.check(fileprovider.AccessError): + page = self.forbiddenResource + elif body.check(fileprovider.NotFoundError): + page = self.childNotFound + else: + page = self.internalServerError + body = page.render(request) if body: # the callback chain from _renderRequest chose to return a string # body, write it out to the client @@ -182,17 +214,31 @@ # We override static.File to implement Range requests, and to get # access to the transfer object to abort it later; the bulk of this # is a direct copy of static.File.render, though. - try: - self.debug("Opening file %s", self._path) - provider = self._path.open() - except fileprovider.NotFoundError: + + self.debug("Opening file %s", self._path) + + # Use a deferred chain to uniformize error handling + # whether open returns a Deferred or directly a file. + d = defer.Deferred() + d.addCallback(lambda _: self._path.open()) + d.addCallbacks(self._gotProvider, self._fileOpenFailure, + callbackArgs=[request], errbackArgs=[request]) + d.callback(None) + return d + + def _fileOpenFailure(self, failure, request): + if failure.check(fileprovider.NotFoundError): self.debug("Could not find resource %s", self._path) return self.childNotFound.render(request) - except fileprovider.CannotOpenError: + if failure.check(fileprovider.CannotOpenError): self.debug("%s is a directory, can't be GET", self._path) return self.childNotFound.render(request) - except fileprovider.AccessError: + if failure.check(fileprovider.AccessError): return self.forbiddenResource.render(request) + return failure + + def _gotProvider(self, provider, request): + self.debug("Rendering file %s", self._path) # Different headers not normally set in static.File... # Specify that we will close the connection after this request, and @@ -204,7 +250,7 @@ # We can do range requests, in bytes. # UGLY HACK FIXME: if pdf, then do not accept range requests # because Adobe Reader plugin messes up - if not self._path.path.endswith('.pdf'): + if not self._path.mimeType == 'application/pdf': request.setHeader('Accept-Ranges', 'bytes') if request.setLastModified(provider.getmtime()) is http.CACHED: @@ -302,14 +348,16 @@ if self._metadataProvider: self.log("Retrieving metadata using %r", self._metadataProvider) - d = self._metadataProvider.getMetadata(self._path.path) + # The URL can't be rewrited. If we ever want to do so the API + # of the file provider will have to be changed. + d = self._metadataProvider.getMetadata(request.path) else: d = defer.succeed(None) def metadataError(failure): self.warning('Error retrieving metadata for file %s' ' using plug %r. %r', - self._path.path, + request.path, self._metadataProvider, failure.value) @@ -609,6 +657,10 @@ def _ebReadFailed(self, failure): self._pending = None + + if self._finished: + return + self.warning('Failure during file %s reading: %s', self.provider, log.getFailureMessage(failure)) self._terminate() @@ -621,9 +673,14 @@ self.consumer.write(data) def _terminate(self): - self.provider.close() - self.provider = None - self.consumer.unregisterProducer() - self.consumer.finish() - self.consumer = None - self._finished = True + if self.size != self.bytesWritten: + self.warning("Terminated before writing the full %s bytes, " + "only %s byte written", self.size, self.bytesWritten) + try: + self.provider.close() + finally: + self.provider = None + self.consumer.unregisterProducer() + self.consumer.finish() + self.consumer = None + self._finished = True diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpserver.glade flumotion-0.9.1/flumotion/component/misc/httpserver/httpserver.glade --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpserver.glade 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpserver.glade 2011-09-11 08:09:04.000000000 +0000 @@ -981,4 +981,21 @@ + + + + True + vertical + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpserver.py flumotion-0.9.1/flumotion/component/misc/httpserver/httpserver.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpserver.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpserver.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- test-case-name: flumotion.test.test_component_httpserver -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -34,16 +30,20 @@ from flumotion.component import component from flumotion.component.base import http as httpbase from flumotion.component.component import moods -from flumotion.component.misc.httpserver import httpfile, localprovider +from flumotion.component.misc.httpserver import httpfile, \ + localprovider, localpath from flumotion.component.misc.httpserver import serverstats from flumotion.component.misc.porter import porterclient from flumotion.twisted import fdserver -__version__ = "$Rev: 8058 $" +__version__ = "$Rev$" T_ = gettexter() UPTIME_UPDATE_INTERVAL = 5 +FILEPROVIDER_SOCKET = 'flumotion.component.misc.httpserver' \ + '.fileprovider.FileProviderPlug' + class CancellableRequest(server.Request): @@ -199,6 +199,10 @@ def remote_rotateLog(self): return self.comp.rotateLog() + def remote_reloadMimeTypes(self): + self.debug('reloading mime types') + return localpath.reloadMimeTypes() + class HTTPFileStreamer(component.BaseComponent, log.Loggable): implements(interfaces.IStreamingComponent) @@ -223,6 +227,7 @@ self.httpauth = None self._startTime = time.time() self._uptimeCallId = None + self._allowBrowsing = False self._description = 'On-Demand Flumotion Stream' @@ -248,6 +253,7 @@ self.uiState.addKey('stream-url', None) self.uiState.addKey('server-uptime', 0) self.uiState.addKey('file-provider', None) + self.uiState.addKey('allow-browsing', False) self.uiState.addDictKey('request-statistics') self.uiState.addDictKey('provider-statistics') @@ -260,14 +266,24 @@ ('porter_password', 'porter-password'), ('mount_point', 'mount-point')]) + path = props.get('path', None) + plugs = self.plugs.get(FILEPROVIDER_SOCKET, []) + if plugs: + if path: + self.warning("The component property 'path' should not be used" + " in conjunction with a file provider plug.") + # For now we don't want the admin to show a warning messages + #msg = messages.Warning(T_(N_( + # "The component property 'path' should not be used" + # " in conjunction with a file provider plug."))) + #self.addMessage(msg) + if props.get('type', 'master') == 'slave': for k in 'socket-path', 'username', 'password': if not 'porter-' + k in props: msg = 'slave mode, missing required property porter-%s' % k return defer.fail(errors.ConfigError(msg)) - - path = props.get('path', None) - if path is None: + if plugs or not path: return if os.path.isfile(path): self._singleFile = True @@ -294,6 +310,7 @@ self.type = props.get('type', 'master') self.port = props.get('port', 8801) + self._allowBrowsing = props.get('allow-browsing', False) if self.type == 'slave': # already checked for these in do_check self._porterPath = props['porter-socket-path'] @@ -311,7 +328,15 @@ if 'bouncer' in props: self.httpauth.setBouncerName(props['bouncer']) if 'issuer-class' in props: - self.httpauth.setIssuerClass(props['issuer-class']) + self.warning("The component property 'issuer-class' has been" + "deprecated.") + msg = messages.Warning(T_(N_( + "The component property 'issuer-class' has " + "been deprecated."))) + self.addMessage(msg) + + if 'allow-default' in props: + self.httpauth.setAllowDefault(props['allow-default']) if 'ip-filter' in props: logFilter = http.LogFilter() for f in props['ip-filter']: @@ -322,12 +347,9 @@ plugs = self.plugs.get(socket, []) if plugs: # Rate controller factory plug; only one supported. - path = props.get('path') self._rateControlPlug = self.plugs[socket][-1] - socket = \ - 'flumotion.component.misc.httpserver.fileprovider.FileProviderPlug' - plugs = self.plugs.get(socket, []) + plugs = self.plugs.get(FILEPROVIDER_SOCKET, []) if plugs: # FileProvider factory plug; only one supported. self._fileProviderPlug = plugs[-1] @@ -346,6 +368,7 @@ # Update uiState self.uiState.set('stream-url', self.getUrl()) + self.uiState.set('allow-browsing', self._allowBrowsing) def do_setup(self): self.have_properties(self.config['properties']) @@ -383,7 +406,7 @@ creds = credentials.UsernamePassword(self._porterUsername, self._porterPassword) self._pbclient.startLogin(creds, self._pbclient.medium) - self.debug("Starting porter login!") + self.info("Logging to porter on socketPath %s", self._porterPath) # This will eventually cause d to fire reactor.connectWith(fdserver.FDConnector, self._porterPath, self._pbclient, 10, checkPID=False) @@ -397,7 +420,8 @@ self._twistedPort = reactor.listenTCP(self.port, site, interface=iface) self.port = self._twistedPort.getHost().port - self.debug('Listening on port %d' % self.port) + self.info('Listening on interface %r on port %d', + iface, self.port) except error.CannotListenError: t = 'Port %d is not available.' % self.port self.warning(t) @@ -611,7 +635,19 @@ return self._description def getUrl(self): - return "http://%s:%d%s" % (self.hostname, self.port, self.mountPoint) + port = self.port + + if self.type == 'slave' and self._pbclient: + if not self._pbclient.remote_port: + return "" + port = self._pbclient.remote_port + + if (not port) or (port == 80): + port_str = "" + else: + port_str = ":%d" % port + + return "http://%s%s%s" % (self.hostname, port_str, self.mountPoint) def getStreamData(self): socket = 'flumotion.component.plugs.streamdata.StreamDataProviderPlug' diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/httpserver.xml flumotion-0.9.1/flumotion/component/misc/httpserver/httpserver.xml --- flumotion-0.6.1/flumotion/component/misc/httpserver/httpserver.xml 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/httpserver.xml 2011-09-11 08:09:04.000000000 +0000 @@ -81,6 +81,8 @@ + + @@ -104,10 +106,15 @@ _description="The name of a bouncer in the atmosphere to authenticate against." /> + + + @@ -144,6 +151,7 @@ + @@ -153,9 +161,10 @@ + @@ -171,6 +180,7 @@ + @@ -205,12 +215,23 @@ - + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/__init__.py flumotion-0.9.1/flumotion/component/misc/httpserver/__init__.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/__init__.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/localpath.py flumotion-0.9.1/flumotion/component/misc/httpserver/localpath.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/localpath.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/localpath.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,55 +1,45 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os -from twisted.web import static - from flumotion.component.misc.httpserver import fileprovider +from flumotion.component.misc.httpserver import ourmimetypes from flumotion.component.misc.httpserver.fileprovider import InsecureError from flumotion.component.misc.httpserver.fileprovider import NotFoundError -def loadMimeTypes(): - # Add our own mime types to the ones parsed from /etc/mime.types - d = static.loadMimeTypes() - d['.flv'] = 'video/x-flv' - d['.mp4'] = 'video/mp4' - return d +def reloadMimeTypes(): + LocalPath.contentTypes = ourmimetypes.MimeTypes() class LocalPath(fileprovider.FilePath): - contentTypes = loadMimeTypes() + contentTypes = ourmimetypes.MimeTypes() # Override parent class property by an attribute mimeType = None def __init__(self, path): - self.path = path - ext = os.path.splitext(path)[1] - self.mimeType = self.contentTypes.get(ext.lower(), None) + self._path = path + self.mimeType = self.contentTypes.fromPath(path) def __str__(self): - return "" % self.path + return "<%s '%s'>" % (type(self).__name__, self._path) def child(self, name): childpath = self._getChildPath(name) @@ -74,8 +64,8 @@ if os.sep in norm: raise InsecureError("Child name '%s' contains one or more " "directory separators" % (name, )) - childpath = os.path.abspath(os.path.join(self.path, norm)) - if not childpath.startswith(self.path): + childpath = os.path.abspath(os.path.join(self._path, norm)) + if not childpath.startswith(self._path): raise InsecureError("Path '%s' is not a child of '%s'" - % (childpath, self.path)) + % (childpath, self._path)) return childpath diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/localprovider.py flumotion-0.9.1/flumotion/component/misc/httpserver/localprovider.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/localprovider.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/localprovider.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -64,7 +60,7 @@ class LocalPath(localpath.LocalPath): def open(self): - return LocalFile(self.path, self.mimeType) + return LocalFile(self._path, self.mimeType) class LocalFile(fileprovider.File, log.Loggable): diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/Makefile.am flumotion-0.9.1/flumotion/component/misc/httpserver/Makefile.am --- flumotion-0.6.1/flumotion/component/misc/httpserver/Makefile.am 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -1,10 +1,13 @@ include $(top_srcdir)/common/python.mk +SUBDIRS = httpcached + httpserverdir = $(libdir)/flumotion/python/flumotion/component/misc/httpserver httpserver_PYTHON = \ __init__.py \ admin_gtk.py \ + cachemanager.py \ cachedprovider.py \ cachestats.py \ fileprovider.py \ @@ -12,9 +15,12 @@ httpserver.py \ localpath.py \ localprovider.py \ + ondemandbrowser.py \ ratecontrol.py \ serverstats.py \ - metadataprovider.py + metadataprovider.py \ + mimetypes.py \ + ourmimetypes.py httpserver_DATA = \ httpfile.glade \ diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/Makefile.in flumotion-0.9.1/flumotion/component/misc/httpserver/Makefile.in --- flumotion-0.6.1/flumotion/component/misc/httpserver/Makefile.in 2009-09-09 11:37:54.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -59,6 +58,13 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -84,7 +90,40 @@ "$(DESTDIR)$(httpserverdir)" py_compile = $(top_srcdir)/py-compile DATA = $(httpserver_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ @@ -104,6 +143,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +153,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +205,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +223,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +242,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +256,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +289,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -273,10 +308,12 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +SUBDIRS = httpcached httpserverdir = $(libdir)/flumotion/python/flumotion/component/misc/httpserver httpserver_PYTHON = \ __init__.py \ admin_gtk.py \ + cachemanager.py \ cachedprovider.py \ cachestats.py \ fileprovider.py \ @@ -284,9 +321,12 @@ httpserver.py \ localpath.py \ localprovider.py \ + ondemandbrowser.py \ ratecontrol.py \ serverstats.py \ - metadataprovider.py + metadataprovider.py \ + mimetypes.py \ + ourmimetypes.py httpserver_DATA = \ httpfile.glade \ @@ -295,7 +335,7 @@ TAGS_FILES = $(httpserver_PYTHON) EXTRA_DIST = $(httpserver_PYTHON) $(httpserver_DATA) -all: all-am +all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) @@ -392,12 +432,141 @@ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(httpserverdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(httpserverdir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi ctags: CTAGS -CTAGS: +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -429,22 +598,51 @@ || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(DATA) -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(httpserverdir)" "$(DESTDIR)$(httpserverdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -461,86 +659,89 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: install-httpserverDATA install-httpserverPYTHON -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-httpserverDATA uninstall-httpserverPYTHON -.MAKE: install-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - clean-local distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-httpserverDATA \ - install-httpserverPYTHON install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am uninstall-httpserverDATA \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-local ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-httpserverDATA install-httpserverPYTHON install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-httpserverDATA \ uninstall-httpserverPYTHON diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/metadataprovider.py flumotion-0.9.1/flumotion/component/misc/httpserver/metadataprovider.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/metadataprovider.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/metadataprovider.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. __version__ = "$Rev: 7792 $" diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/mimetypes.py flumotion-0.9.1/flumotion/component/misc/httpserver/mimetypes.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/mimetypes.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/mimetypes.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/ondemandbrowser.py flumotion-0.9.1/flumotion/component/misc/httpserver/ondemandbrowser.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/ondemandbrowser.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/ondemandbrowser.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,103 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +"""Ondemand Browser widget + +The widget is in concept similar to the FileSelector but displaying full urls +for the files and adding a context menu for copying or opening the link. +""" + +import gettext +import gtk +import urlparse +import os + +try: + from kiwi.ui.widgets import contextmenu +except: + # kiwi < 1.9.22 + contextmenu = None + +from flumotion.ui.fileselector import FileSelector +from flumotion.common.interfaces import IDirectory + +__version__ = "$Rev$" +_ = gettext.gettext + + +class _FileUri(object): + + def __init__(self, fileInfo, icon): + self.original = fileInfo + self.filename = fileInfo.filename + self.icon = icon + + def getPath(self): + return self.original.getPath() + + +class OnDemandBrowser(FileSelector): + + def __init__(self, parent, adminModel): + FileSelector.__init__(self, parent, adminModel) + self._base_uri = None + self._root = None + if contextmenu: + self._popupmenu = self._create_popup_menu() + self.set_context_menu(self._popupmenu) + + def setBaseUri(self, base_uri): + self._base_uri = base_uri + + def setRoot(self, path): + self._root = os.path.normpath(path) + self.setDirectory(self._root) + + def _create_popup_menu(self): + popupmenu = contextmenu.ContextMenu() + item = contextmenu.ContextMenuItem('_Open Link', gtk.STOCK_JUMP_TO) + item.connect('activate', self._on_open_link_activate) + popupmenu.add(item) + popupmenu.append_separator() + item = contextmenu.ContextMenuItem('_Copy Link', gtk.STOCK_COPY) + item.connect('activate', self._on_copy_link_activate) + popupmenu.add(item) + popupmenu.show_all() + return popupmenu + + def _populateList(self, vfsFiles): + self.clear() + for vfsFile in vfsFiles: + if not IDirectory.providedBy(vfsFile) and self._onlyDirectories: + continue + path = vfsFile.getPath() + if path in self._root and path != self._root: + continue + icon = self._renderIcon(vfsFile.iconNames) + rel_path = path.replace(self._root, '') + if self._base_uri and vfsFile.filename != '..': + vfsFile.filename = urlparse.urljoin(self._base_uri, rel_path) + self.append(_FileUri(vfsFile, icon)) + + def _on_open_link_activate(self, widget): + # signal handler for open link menu item activation + self.emit('selected', self.get_selected()) + + def _on_copy_link_activate(self, widget): + # signal handler for copy link menu item activation + clipboard = gtk.Clipboard() + clipboard.set_text(self.get_selected().filename) diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/ourmimetypes.py flumotion-0.9.1/flumotion/component/misc/httpserver/ourmimetypes.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/ourmimetypes.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/ourmimetypes.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,39 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import os + +from twisted.web import static + + +class MimeTypes(object): + + @staticmethod + def loadMimeTypes(): + # Add our own mime types to the ones parsed from /etc/mime.types + d = static.loadMimeTypes() + d['.flv'] = 'video/x-flv' + d['.mp4'] = 'video/mp4' + d['.webm'] = 'video/webm' + return d + + def __init__(self): + self._mimetypes = self.loadMimeTypes() + + def fromPath(self, path, default=None): + ext = os.path.splitext(path)[1] + return self._mimetypes.get(ext.lower(), default) diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/ratecontrol.py flumotion-0.9.1/flumotion/component/misc/httpserver/ratecontrol.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/ratecontrol.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/ratecontrol.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,25 +1,21 @@ # -*- Mode: Python; test-case-name: -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 7792 $" +__version__ = "$Rev$" import time @@ -126,11 +122,11 @@ elapsed = now - self._lastDrip self._lastDrip = now - bytes = self.fillRate * elapsed + newBytes = self.fillRate * elapsed # Note that this does introduce rounding errors - not particularly # important if the drip interval is reasonably high, though. These will # cause the actual rate to be lower than the nominal rate. - self.fillLevel = int(min(self.fillLevel + bytes, self.maxLevel)) + self.fillLevel = int(min(self.fillLevel + newBytes, self.maxLevel)) self._tryWrite() @@ -142,16 +138,16 @@ # If we're permitted to write at the moment, do so. offset, buf = self._buffers[0] sendbuf = buf[offset:offset+self.fillLevel] - bytes = len(sendbuf) + sendBytes = len(sendbuf) - if bytes + offset == len(buf): + if sendBytes + offset == len(buf): self._buffers.pop(0) else: - self._buffers[0] = (offset+bytes, buf) - self._buffersSize -= bytes + self._buffers[0] = (offset + sendBytes, buf) + self._buffersSize -= sendBytes self.consumer.write(sendbuf) - self.fillLevel -= bytes + self.fillLevel -= sendBytes if self._buffersSize > 0: # If we have data (and we're not already waiting for our next drip diff -Nru flumotion-0.6.1/flumotion/component/misc/httpserver/serverstats.py flumotion-0.9.1/flumotion/component/misc/httpserver/serverstats.py --- flumotion-0.6.1/flumotion/component/misc/httpserver/serverstats.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/httpserver/serverstats.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import time @@ -84,7 +80,7 @@ self._set("request-rate-peak-time", self.requestRatePeakTime) self._set("request-count-peak-time", self.requestCountPeakTime) if self._callId is None: - self._update() + self._callId = reactor.callLater(STATS_UPDATE_PERIOD, self._update) def stopUpdates(self): self._updater = None diff -Nru flumotion-0.6.1/flumotion/component/misc/__init__.py flumotion-0.9.1/flumotion/component/misc/__init__.py --- flumotion-0.6.1/flumotion/component/misc/__init__.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/misc/Makefile.in flumotion-0.9.1/flumotion/component/misc/Makefile.in --- flumotion-0.6.1/flumotion/component/misc/Makefile.in 2009-09-09 11:37:54.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -141,6 +140,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -150,18 +150,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -209,6 +202,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -226,16 +220,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -243,7 +239,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -258,6 +253,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -290,7 +286,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -406,7 +401,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -431,7 +426,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/flumotion/component/misc/porter/__init__.py flumotion-0.9.1/flumotion/component/misc/porter/__init__.py --- flumotion-0.6.1/flumotion/component/misc/porter/__init__.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/porter/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ code for porter clients and servers """ -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/misc/porter/Makefile.in flumotion-0.9.1/flumotion/component/misc/porter/Makefile.in --- flumotion-0.6.1/flumotion/component/misc/porter/Makefile.in 2009-09-09 11:37:54.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/porter/Makefile.in 2011-09-11 08:09:21.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -103,6 +102,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -112,18 +112,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -171,6 +164,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -188,16 +182,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -205,7 +201,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -220,6 +215,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -252,7 +248,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/misc/porter/porterclient.py flumotion-0.9.1/flumotion/component/misc/porter/porterclient.py --- flumotion-0.6.1/flumotion/component/misc/porter/porterclient.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/porter/porterclient.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,23 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.internet.protocol import Protocol, Factory from twisted.internet.tcp import Port, Connection from twisted.internet import reactor, address -from twisted.cred import credentials from flumotion.common import medium, log from flumotion.twisted import defer, fdserver @@ -30,7 +25,7 @@ import socket -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" # Very similar to tcp.Server, but we need to call things in a different order @@ -90,6 +85,16 @@ def deregisterPrefix(self, prefix): return self.callRemote("deregisterPrefix", prefix) + def getPort(self): + + def handle_error(failure): + self.warning('Error getting port from old porter: %r', failure) + return 80 + + d = self.callRemote("getPort") + d.addErrback(handle_error) + return d + class PorterClientFactory(fpb.ReconnectingPBClientFactory): """ @@ -146,6 +151,7 @@ self._mountPoints = mountPoints self._prefixes = prefixes or [] self._do_start_deferred = do_start_deferred + self.remote_port = None def _fireDeferred(self, r): # If we still have the deferred, fire it (this happens after we've @@ -163,12 +169,16 @@ # fire a different deferred self.debug("Got deferred login, adding callbacks") deferred.addCallback(self.medium.setRemoteReference) + deferred.addCallback(lambda r: self.medium.getPort()) + deferred.addCallback(self._setRemotePort) for mount in self._mountPoints: self.debug("Registering mount point %s with porter", mount) - deferred.addCallback(lambda r, m: self.registerPath(m), - mount) + deferred.addCallback(lambda r, m: self.registerPath(m), mount) for mount in self._prefixes: self.debug("Registering mount prefix %s with porter", mount) - deferred.addCallback(lambda r, m: self.registerPrefix(m), - mount) + deferred.addCallback(lambda r, m: self.registerPrefix(m), mount) deferred.addCallback(self._fireDeferred) + + def _setRemotePort(self, port): + self.remote_port = port + return port diff -Nru flumotion-0.6.1/flumotion/component/misc/porter/porter.py flumotion-0.9.1/flumotion/component/misc/porter/porter.py --- flumotion-0.6.1/flumotion/component/misc/porter/porter.py 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/porter/porter.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_porter -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -27,7 +23,7 @@ from urllib2 import urlparse from twisted.cred import portal -from twisted.internet import protocol, reactor, address, error, defer +from twisted.internet import protocol, reactor, error, defer from twisted.spread import pb from zope.interface import implements @@ -35,10 +31,10 @@ from flumotion.common.i18n import N_, gettexter from flumotion.component import component from flumotion.component.component import moods -from flumotion.twisted import credentials, fdserver, checkers +from flumotion.twisted import fdserver, checkers from flumotion.twisted import reflect -__version__ = "$Rev: 7983 $" +__version__ = "$Rev$" T_ = gettexter() @@ -78,6 +74,9 @@ self.log("Perspective called: deregistering default") self.porter.deregisterPrefix(prefix, self) + def perspective_getPort(self): + return self.porter._iptablesPort + class PorterRealm(log.Loggable): """ @@ -109,11 +108,11 @@ """ Return the location, login username/password, and listening port and interface for the porter as a tuple (path, username, - password, port, interface). + password, port, interface, external-interface). """ return (self.comp._socketPath, self.comp._username, self.comp._password, self.comp._iptablesPort, - self.comp._interface) + self.comp._interface, self.comp._external_interface) class Porter(component.BaseComponent, log.Loggable): @@ -142,6 +141,7 @@ self._porterProtocol = None self._interface = '' + self._external_interface = '' def registerPath(self, path, avatar): """ @@ -285,11 +285,17 @@ self._password = self.generateRandomString(12) self._socketPath = self.generateSocketPath() + self._requirePassword = props.get('require-password', True) + self._socketMode = props.get('socket-mode', 0666) self._port = int(props['port']) self._iptablesPort = int(props.get('iptables-port', self._port)) self._porterProtocol = props.get('protocol', 'flumotion.component.misc.porter.porter.HTTPPorterProtocol') self._interface = props.get('interface', '') + # if a config has no external-interface set, set it to the same as + # interface + self._external_interface = props.get('external-interface', + self._interface) def do_stop(self): d = None @@ -306,6 +312,8 @@ realm = PorterRealm(self) checker = checkers.FlexibleCredentialsChecker() checker.addUser(self._username, self._password) + if not self._requirePassword: + checker.allowPasswordless(True) p = portal.Portal(realm, [checker]) serverfactory = pb.PBServerFactory(p) @@ -320,9 +328,10 @@ pass self._socketlistener = reactor.listenWith( - fdserver.FDPort, self._socketPath, serverfactory) - self.debug("Now listening on socketPath %s" % self._socketPath) - except error.CannotListenError, e: + fdserver.FDPort, self._socketPath, + serverfactory, mode=self._socketMode) + self.info("Now listening on socketPath %s", self._socketPath) + except error.CannotListenError: self.warning("Failed to create socket %s" % self._socketPath) m = messages.Error(T_(N_( "Network error: socket path %s is not available."), @@ -348,9 +357,11 @@ reactor.listenWith( fdserver.PassableServerPort, self._port, factory, interface=self._interface) - self.debug("Now listening on port %d" % self._port) - except error.CannotListenError, e: - self.warning("Failed to listen on port %d" % self._port) + self.info("Now listening on interface %r on port %d", + self._interface, self._port) + except error.CannotListenError: + self.warning("Failed to listen on interface %r on port %d", + self._interface, self._port) m = messages.Error(T_(N_( "Network error: TCP port %d is not available."), self._port)) self.addMessage(m) diff -Nru flumotion-0.6.1/flumotion/component/misc/porter/porter.xml flumotion-0.9.1/flumotion/component/misc/porter/porter.xml --- flumotion-0.6.1/flumotion/component/misc/porter/porter.xml 2009-09-09 11:37:24.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/misc/porter/porter.xml 2011-09-11 08:09:04.000000000 +0000 @@ -12,12 +12,16 @@ + + + + + + + True + + + True + + + True + 6 + + + True + _File name: + True + + + False + 6 + 0 + + + + + True + True + + + + + 1 + + + + + _Select... + True + True + True + True + + + + False + 6 + 2 + + + + + + + False + 1 + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/plugs/wizard_gtk.py flumotion-0.9.1/flumotion/component/plugs/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/plugs/wizard_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/plugs/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,212 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +"""Wizard plugin for the cortado http plug +""" + +from zope.interface import implements + +import gtk +import os + +from flumotion.admin.assistant.interfaces import IHTTPServerPlugin +from flumotion.admin.assistant.models import Plug +from flumotion.common import messages +from flumotion.common.i18n import N_, gettexter +from flumotion.ui.fileselector import FileSelectorDialog +from flumotion.ui.plugarea import WizardPlugLine + +__version__ = "$Rev$" +T_ = gettexter() + + +class RequestLoggerPlug(Plug): + """I am a model representing the configuration file for a + Request Logger plug. + """ + plugType = "requestlogger-file" + + def __init__(self, component): + Plug.__init__(self) + self.component = component + self.properties.logfile = '/tmp/access.log' + + def setActive(self, active): + if active: + self.component.addPlug(self) + else: + self.component.delPlug(self) + + +class RequestLoggerPlugLine(WizardPlugLine): + gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'wizard.glade') + toplevel_name = 'requestlogger-window' + + def __init__(self, wizard, model, description): + WizardPlugLine.__init__(self, wizard, model, description) + + self.logfile.data_type = str + self._proxy = self.add_proxy(self.model.properties, ['logfile']) + + if self.getActive(): + self.model.setActive(True) + else: + self.plugActiveChanged(False) + + # WizardPlugLine + + def plugActiveChanged(self, active): + self.logfile.set_sensitive(active) + self.select_logfile.set_sensitive(active) + self.model.setActive(active) + + # Callbacks + + def on_select_logfile_clicked(self, button): + + def response(fs, response): + fs.hide() + if response == gtk.RESPONSE_OK: + filename = os.path.join(fs.getFilename(), 'access.log') + self.model.properties.logfile = filename + self._proxy.update('logfile') + + fs = FileSelectorDialog(self.wizard.window, + self.wizard.getAdminModel()) + + fs.connect('response', response) + fs.selector.setOnlyDirectoriesMode(True) + fs.selector.setWorkerName(self.model.component.worker) + directory = os.path.dirname(self.model.properties.logfile) + fs.setDirectory(directory) + fs.show_all() + + def on_logfile_changed(self, button): + self._runChecks() + + def _runChecks(self): + self.wizard.waitForTask('ondemand check') + + worker = self.model.component.worker + directory = os.path.dirname(self.logfile.get_text()) + + def importError(failure): + failure.trap(ImportError) + self.info('could not import twisted-web') + message = messages.Warning(T_(N_( + "Worker '%s' cannot import module '%s'."), + worker, 'twisted.web')) + message.add(T_(N_("\nThis module is part of the '%s'."), + 'Twisted Project')) + message.add(T_(N_("\nThe project's homepage is %s"), + 'http://www.twistedmatrix.com/')) + message.id = 'module-twisted-web' + self.wizard.add_msg(message) + self.wizard.taskFinished(True) + return False + + def checkPathFinished(pathExists): + if not pathExists: + message = messages.Warning(T_(N_( + "Directory '%s' does not exist, " + "or is not readable on worker '%s'.") + % (directory, worker))) + message.id = 'log-path-check' + self.wizard.add_msg(message) + self.wizard.taskFinished(True) + return False + else: + self.wizard.clear_msg('log-path-check') + self.wizard.taskFinished(False) + return True + + self.wizard.taskFinished() + + def checkPath(unused): + d = self.wizard.runInWorker( + worker, 'flumotion.worker.checks.check', + 'checkDirectory', directory) + d.addCallback(checkPathFinished) + return d + + d = self.wizard.checkImport(worker, 'twisted.web') + d.addCallback(checkPath) + d.addErrback(importError) + return d + + +class RequestLoggerPlugWizardPlugin(object): + implements(IHTTPServerPlugin) + + def __init__(self, wizard, component): + self.wizard = wizard + self.model = RequestLoggerPlug(component) + + def workerChanged(self, worker): + pass + + def getPlugWizard(self, description): + return RequestLoggerPlugLine(self.wizard, self.model, description) + + +class RequestModifierForceDownloadPlug(Plug): + """I am a model representing the configuration file for the + Force download plug. + """ + plugType = "requestmodifier-forcedownload" + + def __init__(self, component): + Plug.__init__(self) + self.component = component + self.properties.argument_name = 'force' + self.properties.trigger_value = 'true' + + def setActive(self, active): + if active: + self.component.addPlug(self) + else: + self.component.delPlug(self) + + +class RequestModifierForceDownloadPlugLine(WizardPlugLine): + + def __init__(self, wizard, model, description): + WizardPlugLine.__init__(self, wizard, model, description) + + if self.getActive(): + self.model.setActive(True) + + # WizardPlugLine + + def plugActiveChanged(self, active): + self.model.setActive(active) + + +class RequestModifierForceDownloadPlugWizardPlugin(object): + implements(IHTTPServerPlugin) + + def __init__(self, wizard, component): + self.wizard = wizard + self.model = RequestModifierForceDownloadPlug(component) + + def workerChanged(self, worker): + pass + + def getPlugWizard(self, description): + return RequestModifierForceDownloadPlugLine(self.wizard, self.model, + description) diff -Nru flumotion-0.6.1/flumotion/component/producers/audiotest/admin_gtk.py flumotion-0.9.1/flumotion/component/producers/audiotest/admin_gtk.py --- flumotion-0.6.1/flumotion/component/producers/audiotest/admin_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/audiotest/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from gettext import gettext as _ @@ -25,7 +21,7 @@ from flumotion.component.base.baseadminnode import BaseAdminGtkNode from flumotion.component.effects.volume.admin_gtk import VolumeAdminGtkNode -__version__ = "$Rev: 7888 $" +__version__ = "$Rev$" class AudioTestAdminGtkNode(BaseAdminGtkNode): @@ -38,7 +34,9 @@ self._scale = self.wtree.get_widget('scale-frequency') self._spinbutton = self.wtree.get_widget('spinbutton-frequency') self._combobox = self.wtree.get_widget('combobox-wave') - self._combobox.prefill(['Sine', 'Square', 'Saw']) + self._combobox.prefill(['Sine', 'Square', 'Saw', 'Triangle', 'Silence', + 'White-noise', 'Pink-noise', 'Sine table', + 'Ticks']) self._scale_change_id = self._scale.connect('value-changed', self.frequency_changed_cb) diff -Nru flumotion-0.6.1/flumotion/component/producers/audiotest/audiotest.py flumotion-0.9.1/flumotion/component/producers/audiotest/audiotest.py --- flumotion-0.6.1/flumotion/component/producers/audiotest/audiotest.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/audiotest/audiotest.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -29,7 +25,7 @@ from flumotion.component.effects.volume import volume from flumotion.worker.checks import check -__version__ = "$Rev: 7649 $" +__version__ = "$Rev$" T_ = gettexter() @@ -52,11 +48,9 @@ componentMediumClass = AudioTestMedium def init(self): - self.uiState.addKey('wave-names', - ['Sine', 'Square', 'Saw', 'Triangle']) self.uiState.addKey('wave', 0) self.uiState.addKey('frequency', 440) - self.uiState.addKey('samplerate', 441000) + self.uiState.addKey('samplerate', 44100) def do_check(self): levelD = check.do_check(self, check.checkPlugin, 'level', 'level') @@ -68,6 +62,7 @@ def get_pipeline_string(self, properties): samplerate = properties.get('samplerate', 44100) + wave = properties.get('wave', 0) self.samplerate = samplerate volume = properties.get('volume', 1.0) @@ -77,10 +72,11 @@ if not gstreamer.element_factory_exists(source): raise errors.MissingElementError(source) - return ('%s name=source %s ! identity name=identity silent=TRUE ! ' \ + return ('%s name=source wave=%s %s ! ' \ + 'identity name=identity silent=TRUE ! ' \ 'audio/x-raw-int,rate=%d ! ' \ 'volume name=volume volume=%f ! level name=level' - % (source, is_live, samplerate, volume)) + % (source, wave, is_live, samplerate, volume)) def configure_pipeline(self, pipeline, properties): diff -Nru flumotion-0.6.1/flumotion/component/producers/audiotest/audiotest.xml flumotion-0.9.1/flumotion/component/producers/audiotest/audiotest.xml --- flumotion-0.6.1/flumotion/component/producers/audiotest/audiotest.xml 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/audiotest/audiotest.xml 2011-09-11 08:09:04.000000000 +0000 @@ -31,6 +31,8 @@ _description="The Sample rate (in Hz). Defaults to 44100." /> + diff -Nru flumotion-0.6.1/flumotion/component/producers/audiotest/__init__.py flumotion-0.9.1/flumotion/component/producers/audiotest/__init__.py --- flumotion-0.6.1/flumotion/component/producers/audiotest/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/audiotest/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/audiotest/Makefile.in flumotion-0.9.1/flumotion/component/producers/audiotest/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/audiotest/Makefile.in 2009-09-09 11:37:54.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/audiotest/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/audiotest/wizard.glade flumotion-0.9.1/flumotion/component/producers/audiotest/wizard.glade --- flumotion-0.6.1/flumotion/component/producers/audiotest/wizard.glade 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/audiotest/wizard.glade 2011-09-11 08:09:04.000000000 +0000 @@ -21,7 +21,7 @@ True - 3 + 4 3 False 6 @@ -69,6 +69,7 @@ 0.5 0 0 + samplerate PANGO_ELLIPSIZE_NONE -1 False @@ -228,6 +229,52 @@ + + + + True + _Wave: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + wave + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + False + True + + + 1 + 2 + 3 + 4 + fill + fill + + + diff -Nru flumotion-0.6.1/flumotion/component/producers/audiotest/wizard_gtk.py flumotion-0.9.1/flumotion/component/producers/audiotest/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/producers/audiotest/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/audiotest/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -28,7 +24,7 @@ from flumotion.admin.assistant.models import AudioProducer from flumotion.admin.gtk.basesteps import AudioProducerStep -__version__ = "$Rev: 7649 $" +__version__ = "$Rev$" _ = gettext.gettext @@ -56,14 +52,20 @@ def setup(self): self.samplerate.data_type = str self.volume.data_type = float + self.wave.data_type = int self.samplerate.prefill(['8000', '16000', '32000', '44100']) + self.wave.prefill([(_('Sine'), 0), + (_('Square'), 1), + (_('Saw'), 2), + (_('Ticks'), 8)]) + self.add_proxy(self.model.properties, - ['frequency', 'volume', 'samplerate']) + ['frequency', 'volume', 'samplerate', 'wave']) self.samplerate.set_sensitive(True) diff -Nru flumotion-0.6.1/flumotion/component/producers/blackmagic/admin_gtk.py flumotion-0.9.1/flumotion/component/producers/blackmagic/admin_gtk.py --- flumotion-0.6.1/flumotion/component/producers/blackmagic/admin_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/blackmagic/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,89 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import os + +from flumotion.component.base import admin_gtk +from flumotion.component.effects.volume.admin_gtk import VolumeAdminGtkNode +from flumotion.component.effects.deinterlace.admin_gtk \ + import DeinterlaceAdminGtkNode +from flumotion.component.effects.videoscale.admin_gtk \ + import VideoscaleAdminGtkNode + +__version__ = "$Rev$" + + +class BlackMagicAdminGtk(admin_gtk.BaseAdminGtk): + + def setup(self): + volume = VolumeAdminGtkNode(self.state, self.admin, + 'inputVolume', 'Input Volume') + self.nodes['Volume'] = volume + deinterlace = DeinterlaceAdminGtkNode(self.state, self.admin, + 'deinterlace', 'Deinterlacing') + self.nodes['Deinterlace'] = deinterlace + if 'FLU_VIDEOSCALE_DEBUG' in os.environ: + videoscale = VideoscaleAdminGtkNode(self.state, self.admin, + 'videoscale', 'Video scaling') + self.nodes['Videoscale'] = videoscale + return admin_gtk.BaseAdminGtk.setup(self) + + def component_volumeChanged(self, channel, rms, peak, decay): + volume = self.nodes['Volume'] + volume.volumeChanged(channel, rms, peak, decay) + + def component_effectVolumeSet(self, effect, volume): + """ + @param volume: volume multiplier between 0.0 and 4.0 + @type volume: float + """ + if effect != 'inputVolume': + self.warning('Unknown effect %s in %r' % (effect, self)) + return + v = self.nodes['Volume'] + v.volumeSet(volume) + + def component_effectModeSet(self, effect, mode): + """ + @param mode: deinterlace mode + @type volume: string + """ + if effect != 'deinterlace': + self.warning('Unknown effect %s in %r' % (effect, self)) + return + v = self.nodes['Deinterlace'] + v.modeSet(mode) + + def component_effectMethodSet(self, effect, mode): + """ + @param mode: deinterlace method + @type volume: string + """ + if effect != 'deinterlace': + self.warning('Unknown effect %s in %r' % (effect, self)) + return + v = self.nodes['Deinterlace'] + v.methodSet(mode) + + def component_effectWidthSet(self, effect, width): + if effect != 'videoscale': + self.warning('Unknown effect %s in %r' % (effect, self)) + return + v = self.nodes['Videoscale'] + v.widthSet(width) + +GUIClass = BlackMagicAdminGtk diff -Nru flumotion-0.6.1/flumotion/component/producers/blackmagic/blackmagic.py flumotion-0.9.1/flumotion/component/producers/blackmagic/blackmagic.py --- flumotion-0.6.1/flumotion/component/producers/blackmagic/blackmagic.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/blackmagic/blackmagic.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,124 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gst +from twisted.internet import defer + +from flumotion.common import errors, messages +from flumotion.common.i18n import N_, gettexter +from flumotion.component import feedcomponent +from flumotion.component.producers import checks +from flumotion.component.effects.deinterlace import deinterlace +from flumotion.component.effects.videoscale import videoscale +from flumotion.component.effects.audioconvert import audioconvert +from flumotion.component.effects.videorate import videorate +from flumotion.component.effects.volume import volume + +__version__ = "$Rev$" +T_ = gettexter() + + +class BlackMagic(feedcomponent.ParseLaunchComponent): + + def do_check(self): + self.debug('running PyGTK/PyGST and configuration checks') + d1 = checks.checkTicket347() + d2 = checks.checkTicket348() + dl = defer.DeferredList([d1, d2]) + dl.addCallback(self._checkCallback) + return dl + + def check_properties(self, props, addMessage): + deintMode = props.get('deinterlace-mode', 'auto') + deintMethod = props.get('deinterlace-method', 'ffmpeg') + + if deintMode not in deinterlace.DEINTERLACE_MODE: + msg = messages.Error(T_(N_("Configuration error: '%s' " \ + "is not a valid deinterlace mode." % deintMode))) + addMessage(msg) + raise errors.ConfigError(msg) + + if deintMethod not in deinterlace.DEINTERLACE_METHOD: + msg = messages.Error(T_(N_("Configuration error: '%s' " \ + "is not a valid deinterlace method." % deintMethod))) + self.debug("'%s' is not a valid deinterlace method", + deintMethod) + addMessage(msg) + raise errors.ConfigError(msg) + + def _checkCallback(self, results): + for (state, result) in results: + for m in result.messages: + self.addMessage(m) + + def get_pipeline_string(self, props): + self.width = props.get('width', 1920) + self.height = props.get('height', 1080) + self.video_format = props.get('video-format', 8) + self.deintMode = props.get('deinterlace-mode', 'auto') + self.deintMethod = props.get('deinterlace-method', 'ffmpeg') + + template = ('mmtblackmagicsrc name=src video-format=%s' + ' src.src_video ! queue ' + ' ! @feeder:video@' + ' src.src_audio ! queue ' + ' ! volume name=setvolume' + ' ! level name=volumelevel message=true ' + ' ! @feeder:audio@' % (self.video_format, )) + + return template + + def configure_pipeline(self, pipeline, properties): + self.volume = pipeline.get_by_name("setvolume") + comp_level = pipeline.get_by_name('volumelevel') + vol = volume.Volume('inputVolume', comp_level, pipeline) + self.addEffect(vol) + + deinterlacer = deinterlace.Deinterlace('deinterlace', + pipeline.get_by_name("src").get_pad("src_video"), pipeline, + self.deintMode, self.deintMethod) + self.addEffect(deinterlacer) + deinterlacer.plug() + + rateconverter = videorate.Videorate('videorate', + deinterlacer.effectBin.get_pad("src"), pipeline, self.framerate) + self.addEffect(rateconverter) + rateconverter.plug() + + videoscaler = videoscale.Videoscale('videoscale', self, + rateconverter.effectBin.get_pad("src"), pipeline, + self.width, self.height, True, False) + self.addEffect(videoscaler) + videoscaler.plug() + + # Setting a tolerance of 20ms should be enough (1/2 frame), but + # we set it to 40ms to be more conservatives + ar = audioconvert.Audioconvert('audioconvert', + comp_level.get_pad("src"), pipeline, + tolerance=40 * gst.MSECOND) + self.addEffect(ar) + ar.plug() + + def getVolume(self): + return self.volume.get_property('volume') + + def setVolume(self, value): + """ + @param value: float between 0.0 and 4.0 + """ + self.debug("Setting volume to %f" % (value)) + self.volume.set_property('volume', value) diff -Nru flumotion-0.6.1/flumotion/component/producers/blackmagic/blackmagic.xml flumotion-0.9.1/flumotion/component/producers/blackmagic/blackmagic.xml --- flumotion-0.6.1/flumotion/component/producers/blackmagic/blackmagic.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/blackmagic/blackmagic.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/producers/blackmagic/__init__.py flumotion-0.9.1/flumotion/component/producers/blackmagic/__init__.py --- flumotion-0.6.1/flumotion/component/producers/blackmagic/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/blackmagic/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/blackmagic/Makefile.am flumotion-0.9.1/flumotion/component/producers/blackmagic/Makefile.am --- flumotion-0.6.1/flumotion/component/producers/blackmagic/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/blackmagic/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,15 @@ +include $(top_srcdir)/common/python.mk + +componentdir = $(libdir)/flumotion/python/flumotion/component/producers/blackmagic +component_DATA = \ + blackmagic.xml + +component_PYTHON = \ + __init__.py \ + admin_gtk.py \ + blackmagic.py + +clean-local: + rm -rf *.pyc *.pyo + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/component/producers/blackmagic/Makefile.in flumotion-0.9.1/flumotion/component/producers/blackmagic/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/blackmagic/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/blackmagic/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -0,0 +1,544 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/producers/blackmagic +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +componentdir = $(libdir)/flumotion/python/flumotion/component/producers/blackmagic +component_DATA = \ + blackmagic.xml + +component_PYTHON = \ + __init__.py \ + admin_gtk.py \ + blackmagic.py + +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/producers/blackmagic/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/producers/blackmagic/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/producers/bttv/admin_gtk.py flumotion-0.9.1/flumotion/component/producers/bttv/admin_gtk.py --- flumotion-0.6.1/flumotion/component/producers/bttv/admin_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/bttv/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,29 +1,25 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component.base import admin_gtk from flumotion.component.effects.colorbalance.admin_gtk import \ ColorbalanceAdminGtkNode -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class BTTVAdminGtk(admin_gtk.BaseAdminGtk): diff -Nru flumotion-0.6.1/flumotion/component/producers/bttv/bttv.py flumotion-0.9.1/flumotion/component/producers/bttv/bttv.py --- flumotion-0.6.1/flumotion/component/producers/bttv/bttv.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/bttv/bttv.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -29,7 +25,7 @@ # FIXME: rename to TVCard __all__ = ['BTTV'] -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" def arg_filtered(proc, *args): diff -Nru flumotion-0.6.1/flumotion/component/producers/bttv/__init__.py flumotion-0.9.1/flumotion/component/producers/bttv/__init__.py --- flumotion-0.6.1/flumotion/component/producers/bttv/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/bttv/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/bttv/Makefile.in flumotion-0.9.1/flumotion/component/producers/bttv/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/bttv/Makefile.in 2009-09-09 11:37:55.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/bttv/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/bttv/wizard_gtk.py flumotion-0.9.1/flumotion/component/producers/bttv/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/producers/bttv/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/bttv/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,32 +1,27 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. +# See "LICENSE.LGPL" in the source distribution for more information. # -# note: +# Headers in this file shall remain intact. + +# NOTE: # v4l talks about "signal" (PAL/...) and "channel" (TV/Composite/...) # and frequency # gst talks about "norm" and "channel" # and frequency # apps (and flumotion) talk about "TV Norm" and "source", # and channel (corresponding to frequency) -# import gettext import os @@ -40,7 +35,7 @@ from flumotion.common.messages import Info from flumotion.admin.gtk.basesteps import VideoProducerStep -__version__ = "$Rev: 7267 $" +__version__ = "$Rev$" _ = gettext.gettext T_ = gettexter() diff -Nru flumotion-0.6.1/flumotion/component/producers/checks.py flumotion-0.9.1/flumotion/component/producers/checks.py --- flumotion-0.6.1/flumotion/component/producers/checks.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/checks.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,31 +1,26 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.internet import defer -from flumotion.common import gstreamer, messages +from flumotion.common import messages from flumotion.common.i18n import N_, gettexter -from flumotion.worker.checks import check -__version__ = "$Rev: 8057 $" +__version__ = "$Rev$" T_ = gettexter() diff -Nru flumotion-0.6.1/flumotion/component/producers/fgdp/fgdp.py flumotion-0.9.1/flumotion/component/producers/fgdp/fgdp.py --- flumotion-0.6.1/flumotion/component/producers/fgdp/fgdp.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/fgdp/fgdp.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,93 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gst + +from flumotion.component import feedcomponent +from flumotion.common import gstreamer +# register gdpsrc +import flumotion.component.common.fgdp.fgdp + +__version__ = "$Rev$" + + +class FGDPProducer(feedcomponent.ParseLaunchComponent): + logCategory = 'fgdp-producer' + _probe_id = None + _pad = None + _last_streamheaders = None + + def get_pipeline_string(self, properties): + return "fgdpsrc name=src" + + def configure_pipeline(self, pipeline, properties): + src = self.get_element('src') + src.set_property('mode', properties.get('mode', 'pull')) + src.set_property('host', properties.get('host', 'localhost')) + src.set_property('port', properties.get('port', 15000)) + src.set_property('username', properties.get('username', 'user')) + src.set_property('password', properties.get('password', 'test')) + src.set_property('version', properties.get('version', '0.1')) + src.set_property('max-reconnection-delay', + properties.get('max-reconnection-delay', 0.5)) + src.connect('connected', self._on_connected) + src.connect('disconnected', self._on_disconnected) + self.attachPadMonitorToElement("src") + + # When the streamheaders have not changed, sending a flumotion-reset + # downstream reinitializes the demuxer, but the headers are not re-sent + # by multifdsink thus the demuxer never receive the headers. Thus the + # flumtion-reset should only be sent when the stremaheaders change + self._enable_reconnection_probe() + + def _reconnections_pad_probe(self, pad, gbuffer): + self._disable_reconnection_probe() + s = gbuffer.caps[0] + if not s.has_field('streamheader'): + self._last_streamheaders = None + return True + + data = map(lambda x: x.data, s['streamheader']) + if data == self._last_streamheaders: + self.debug("Streamheaders have not changed, " + "flumotion-reset skipped") + return True + + self.debug("New streamheaders, seding flumotion-reset downstream") + pad.push_event(gstreamer.flumotion_reset_event()) + self._last_streamheaders = data + return True + + def _enable_reconnection_probe(self): + # Remove any pending reconnection probe + self._disable_reconnection_probe() + self._pad = self.get_element('src').get_pad('src') + self._probe_id = self._pad.add_buffer_probe( + self._reconnections_pad_probe) + + def _disable_reconnection_probe(self): + if self._pad and self._probe_id: + self._pad.remove_buffer_probe(self._probe_id) + self._probe_id = None + self._pad = None + + def _on_connected(self, element): + self.info("FGDP producer connected") + + def _on_disconnected(self, element, reason): + self.info("FGDP producer disconnected: %s", reason) + self._enable_reconnection_probe() diff -Nru flumotion-0.6.1/flumotion/component/producers/fgdp/fgdp.xml flumotion-0.9.1/flumotion/component/producers/fgdp/fgdp.xml --- flumotion-0.6.1/flumotion/component/producers/fgdp/fgdp.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/fgdp/fgdp.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/producers/fgdp/__init__.py flumotion-0.9.1/flumotion/component/producers/fgdp/__init__.py --- flumotion-0.6.1/flumotion/component/producers/fgdp/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/fgdp/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,22 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +""" +code for porter clients and servers +""" + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/fgdp/Makefile.am flumotion-0.9.1/flumotion/component/producers/fgdp/Makefile.am --- flumotion-0.6.1/flumotion/component/producers/fgdp/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/fgdp/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,16 @@ +include $(top_srcdir)/common/python.mk + +fgdpdir = $(libdir)/flumotion/python/flumotion/component/producers/fgdp + +fgdp_PYTHON = \ + __init__.py \ + fgdp.py + +fgdp_DATA = fgdp.xml + +TAGS_FILES = $(fgdp_PYTHON) + +clean-local: + rm -rf *.pyc *.pyo + +EXTRA_DIST = $(fgdp_PYTHON) $(fgdp_DATA) diff -Nru flumotion-0.6.1/flumotion/component/producers/fgdp/Makefile.in flumotion-0.9.1/flumotion/component/producers/fgdp/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/fgdp/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/fgdp/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -0,0 +1,541 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(fgdp_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/component/producers/fgdp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(fgdpdir)" "$(DESTDIR)$(fgdpdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(fgdp_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +fgdpdir = $(libdir)/flumotion/python/flumotion/component/producers/fgdp +fgdp_PYTHON = \ + __init__.py \ + fgdp.py + +fgdp_DATA = fgdp.xml +TAGS_FILES = $(fgdp_PYTHON) +EXTRA_DIST = $(fgdp_PYTHON) $(fgdp_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/producers/fgdp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/component/producers/fgdp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-fgdpPYTHON: $(fgdp_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(fgdpdir)" || $(MKDIR_P) "$(DESTDIR)$(fgdpdir)" + @list='$(fgdp_PYTHON)'; dlist=; list2=; test -n "$(fgdpdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(fgdpdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(fgdpdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(fgdpdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(fgdpdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-fgdpPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(fgdp_PYTHON)'; test -n "$(fgdpdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$fileso +install-fgdpDATA: $(fgdp_DATA) + @$(NORMAL_INSTALL) + test -z "$(fgdpdir)" || $(MKDIR_P) "$(DESTDIR)$(fgdpdir)" + @list='$(fgdp_DATA)'; test -n "$(fgdpdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(fgdpdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(fgdpdir)" || exit $$?; \ + done + +uninstall-fgdpDATA: + @$(NORMAL_UNINSTALL) + @list='$(fgdp_DATA)'; test -n "$(fgdpdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(fgdpdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(fgdpdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(fgdpdir)" "$(DESTDIR)$(fgdpdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-fgdpDATA install-fgdpPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-fgdpDATA uninstall-fgdpPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-fgdpDATA \ + install-fgdpPYTHON install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-fgdpDATA uninstall-fgdpPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/producers/firewire/admin_gtk.py flumotion-0.9.1/flumotion/component/producers/firewire/admin_gtk.py --- flumotion-0.6.1/flumotion/component/producers/firewire/admin_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/firewire/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,30 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. +import os + from flumotion.component.base import admin_gtk from flumotion.component.effects.volume.admin_gtk import VolumeAdminGtkNode +from flumotion.component.effects.deinterlace.admin_gtk \ + import DeinterlaceAdminGtkNode +from flumotion.component.effects.videoscale.admin_gtk \ + import VideoscaleAdminGtkNode -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class FirewireAdminGtk(admin_gtk.BaseAdminGtk): @@ -31,6 +33,13 @@ volume = VolumeAdminGtkNode(self.state, self.admin, 'inputVolume', 'Input Volume') self.nodes['Volume'] = volume + deinterlace = DeinterlaceAdminGtkNode(self.state, self.admin, + 'deinterlace', 'Deinterlacing') + self.nodes['Deinterlace'] = deinterlace + if 'FLU_VIDEOSCALE_DEBUG' in os.environ: + videoscale = VideoscaleAdminGtkNode(self.state, self.admin, + 'videoscale', 'Video scaling') + self.nodes['Videoscale'] = videoscale return admin_gtk.BaseAdminGtk.setup(self) def component_volumeChanged(self, channel, rms, peak, decay): @@ -48,4 +57,33 @@ v = self.nodes['Volume'] v.volumeSet(volume) + def component_effectModeSet(self, effect, mode): + """ + @param mode: deinterlace mode + @type volume: string + """ + if effect != 'deinterlace': + self.warning('Unknown effect %s in %r' % (effect, self)) + return + v = self.nodes['Deinterlace'] + v.modeSet(mode) + + def component_effectMethodSet(self, effect, mode): + """ + @param mode: deinterlace method + @type volume: string + """ + if effect != 'deinterlace': + self.warning('Unknown effect %s in %r' % (effect, self)) + return + v = self.nodes['Deinterlace'] + v.methodSet(mode) + + def component_effectWidthSet(self, effect, width): + if effect != 'videoscale': + self.warning('Unknown effect %s in %r' % (effect, self)) + return + v = self.nodes['Videoscale'] + v.widthSet(width) + GUIClass = FirewireAdminGtk diff -Nru flumotion-0.6.1/flumotion/component/producers/firewire/firewire.py flumotion-0.9.1/flumotion/component/producers/firewire/firewire.py --- flumotion-0.6.1/flumotion/component/producers/firewire/firewire.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/firewire/firewire.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,32 +1,32 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst from twisted.internet import defer -from flumotion.common import errors, messages +from flumotion.common import errors, messages, gstreamer from flumotion.common.i18n import N_, gettexter from flumotion.component import feedcomponent +from flumotion.component.effects.deinterlace import deinterlace +from flumotion.component.effects.videorate import videorate +from flumotion.component.effects.videoscale import videoscale +from flumotion.component.effects.audioconvert import audioconvert -__version__ = "$Rev: 7769 $" +__version__ = "$Rev$" T_ = gettexter() @@ -36,7 +36,7 @@ class Firewire(feedcomponent.ParseLaunchComponent): def do_check(self): - self.debug('running PyGTK/PyGST checks') + self.debug('running PyGTK/PyGST and configuration checks') from flumotion.component.producers import checks d1 = checks.checkTicket347() d2 = checks.checkTicket348() @@ -44,86 +44,65 @@ dl.addCallback(self._checkCallback) return dl + def check_properties(self, props, addMessage): + deintMode = props.get('deinterlace-mode', 'auto') + deintMethod = props.get('deinterlace-method', 'ffmpeg') + + if deintMode not in deinterlace.DEINTERLACE_MODE: + msg = messages.Error(T_(N_("Configuration error: '%s' " \ + "is not a valid deinterlace mode." % deintMode))) + addMessage(msg) + raise errors.ConfigError(msg) + + if deintMethod not in deinterlace.DEINTERLACE_METHOD: + msg = messages.Error(T_(N_("Configuration error: '%s' " \ + "is not a valid deinterlace method." % deintMethod))) + self.debug("'%s' is not a valid deinterlace method", + deintMethod) + addMessage(msg) + raise errors.ConfigError(msg) + def _checkCallback(self, results): for (state, result) in results: for m in result.messages: self.addMessage(m) def get_pipeline_string(self, props): - width = props.get('width', 240) - height = props.get('height', int(576 * width/720.)) # assuming PAL :-/ - guid = props.get('guid', None) - - # F0.6: remove backwards-compatible properties - self.fixRenamedProperties(props, [ - ('scaled_width', 'scaled-width'), - ('is_square', 'is-square'), - ]) - scaled_width = props.get('scaled-width', width) - is_square = props.get('is-square', False) - framerate = props.get('framerate', (30, 2)) - framerate_float = float(framerate[0]) / framerate[1] - - scale_correction = width - scaled_width - - if 12.5 < framerate_float <= 25: - drop_factor = 1 - elif 6.3 < framerate_float <= 12.5: - drop_factor = 2 - elif 3.2 < framerate_float <= 6.3: - drop_factor = 4 - else: - drop_factor = 8 - - if is_square: - square_pipe = ',pixel-aspect-ratio=(fraction)1/1' - else: - square_pipe = '' + if props.get('scaled-width', None) is not None: + self.warnDeprecatedProperties(['scaled-width']) - # the point of width correction is to get to a multiple of 8 for width - # so codecs are happy; it's unrelated to the aspect ratio correction - # to get to 4:3 or 16:9 - if scale_correction > 0: - # videobox in 0.8.8 has a stride problem outputting AYUV with odd - # width I420 works fine, but is slower when overlay is used - - pad_pipe = ('! ffmpegcolorspace ! videobox right=-%d ! ' - 'video/x-raw-yuv,format=(fourcc)I420 ' % - (scale_correction, )) + self.is_square = props.get('is-square', False) + self.width = props.get('width', 0) + self.height = props.get('height', 0) + decoder = props.get('decoder', 'dvdec') + if not self.is_square and not self.height: + self.height = int(576 * self.width/720.) # assuming PAL + self.add_borders = props.get('add-borders', True) + guid = "guid=%s" % props.get('guid', 0) + self.deintMode = props.get('deinterlace-mode', 'auto') + self.deintMethod = props.get('deinterlace-method', 'ffmpeg') + + fr = props.get('framerate', None) + if fr is not None: + self.framerate = gst.Fraction(fr[0], fr[1]) else: - pad_pipe = '' - - # Always scale down to half size to lose interlacing artifacts. - # FIXME: handle this better when GStreamer provides facilities for it. - interlaced_height = 288 + self.framerate = None # FIXME: might be nice to factor out dv1394src ! dvdec so we can # replace it with videotestsrc of the same size and PAR, so we can # unittest the pipeline # need a queue in case tcpserversink blocks somehow - template = ('dv1394src %(guid)s' + template = ('dv1394src %s' ' ! tee name=t' ' ! queue leaky=2 max-size-time=1000000000' ' ! dvdemux name=demux' - ' demux. ! queue ! dvdec drop-factor=%(df)d' - ' ! video/x-raw-yuv,format=(fourcc)YUY2' - ' ! videorate ! videoscale' - ' ! video/x-raw-yuv,width=%(sw)s,height=%(ih)s%(sq)s' - ' ! videoscale' - ' ! video/x-raw-yuv,width=%(sw)s,height=%(h)s,' - ' framerate=%(fr)s,format=(fourcc)YUY2' - ' %(pp)s' + ' demux. ! queue ! %s name=decoder' ' ! @feeder:video@' ' demux. ! queue ! audio/x-raw-int ' ' ! volume name=setvolume' - ' ! level name=volumelevel message=true ! audiorate' + ' ! level name=volumelevel message=true ' ' ! @feeder:audio@' - ' t. ! queue ! @feeder:dv@' - % dict(df=drop_factor, ih=interlaced_height, - sq=square_pipe, pp=pad_pipe, - sw=scaled_width, h=height, - guid=(guid and ('guid=%s' % guid) or ''), - fr=('%d/%d' % (framerate[0], framerate[1])))) + ' t. ! queue ! @feeder:dv@' % (guid, decoder)) return template @@ -136,9 +115,49 @@ bus = pipeline.get_bus() bus.add_signal_watch() bus.connect('message::element', self._bus_message_received_cb) - self.addEffect(vol) + decoder = pipeline.get_by_name("decoder") + if gstreamer.element_has_property(decoder, 'drop-factor'): + if self.framerate: + framerate = float(self.framerate.num / self.framerate.denom) + if 12.5 < framerate: + drop_factor = 1 + elif 6.3 < framerate <= 12.5: + drop_factor = 2 + elif 3.2 < framerate <= 6.3: + drop_factor = 4 + elif framerate <= 3.2: + drop_factor = 8 + else: + drop_factor = 1 + decoder.set_property('drop-factor', drop_factor) + + vr = videorate.Videorate('videorate', + decoder.get_pad("src"), pipeline, self.framerate) + self.addEffect(vr) + vr.plug() + + deinterlacer = deinterlace.Deinterlace('deinterlace', + vr.effectBin.get_pad("src"), pipeline, + self.deintMode, self.deintMethod) + self.addEffect(deinterlacer) + deinterlacer.plug() + + videoscaler = videoscale.Videoscale('videoscale', self, + deinterlacer.effectBin.get_pad("src"), pipeline, + self.width, self.height, self.is_square, self.add_borders) + self.addEffect(videoscaler) + videoscaler.plug() + + # Setting a tolerance of 20ms should be enough (1/2 frame), but + # we set it to 40ms to be more conservatives + ar = audioconvert.Audioconvert('audioconvert', + comp_level.get_pad("src"), + pipeline, tolerance=40 * gst.MSECOND) + self.addEffect(ar) + ar.plug() + def getVolume(self): return self.volume.get_property('volume') diff -Nru flumotion-0.6.1/flumotion/component/producers/firewire/firewire.xml flumotion-0.9.1/flumotion/component/producers/firewire/firewire.xml --- flumotion-0.6.1/flumotion/component/producers/firewire/firewire.xml 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/firewire/firewire.xml 2011-09-11 08:09:04.000000000 +0000 @@ -29,13 +29,21 @@ + _description="The width to scale to before correcting.(Deprecated)" /> + + + + @@ -57,6 +65,8 @@ + + @@ -70,6 +80,10 @@ + + + + diff -Nru flumotion-0.6.1/flumotion/component/producers/firewire/__init__.py flumotion-0.9.1/flumotion/component/producers/firewire/__init__.py --- flumotion-0.6.1/flumotion/component/producers/firewire/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/firewire/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/firewire/Makefile.in flumotion-0.9.1/flumotion/component/producers/firewire/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/firewire/Makefile.in 2009-09-09 11:37:55.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/firewire/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/firewire/wizard_gtk.py flumotion-0.9.1/flumotion/component/producers/firewire/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/producers/firewire/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/firewire/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -33,7 +29,7 @@ from flumotion.admin.gtk.basesteps import AudioProducerStep, VideoProducerStep __pychecker__ = 'no-returnvalues' -__version__ = "$Rev: 7782 $" +__version__ = "$Rev$" _ = gettext.gettext T_ = gettexter() @@ -46,6 +42,18 @@ self.properties.is_square = True self.properties.framerate = 12.5 + self.properties.decoder = 'ffdec_dvvideo' + self.properties.deinterlace_mode = 'auto' + self.properties.deinterlace_method = 'ffmpeg' + + def __eq__(self, other): + if not isinstance(other, FireWireProducer): + return False + + guid1 = self.properties.get('guid', None) + guid2 = other.properties.get('guid', None) + + return guid1 == guid2 and AudioProducer.__eq__(self, other) def getFeederName(self, component): if isinstance(component, AudioEncoder): @@ -88,7 +96,7 @@ self.vbox_controls.set_sensitive(is_sensitive) self.wizard.blockNext(not is_sensitive) - def _update_output_format(self): + def _update_output_format(self, update_correction=False): self._update_label_camera_settings() # factor is a double @@ -96,7 +104,7 @@ self._factor_i = self.combobox_scaled_height.get_selected() self._update_width_correction() - self._update_label_output_format() + self._update_label_output_format(update_correction) def _update_label_camera_settings(self): # update label_camera_settings @@ -131,57 +139,63 @@ break assert self._width_correction - def _update_label_output_format(self): + def _update_label_output_format(self, update_correction): d = self._get_width_height() - self.model.properties.width = d['ow'] - self.model.properties.height = d['oh'] - self.model.properties.scaled_width = d['sw'] + if self._width_correction == 'stretch': + # is_square is True in this case (otherwise PAR is recomputed) + # => DAR can be destroyed + # we ensure multiple of 8 to avoid videobox padding, and stretch + self.model.properties.width = (d['ow'] + 8) - d['ow'] % 8 + out_width = self.model.properties.width + elif self._width_correction == 'pad': + # only specify height, to let videobox compute the width + self.model.properties.height = d['oh'] + out_width = (d['ow'] + 8) - d['ow'] % 8 + #FIXME: This used to work without setting the width + self.model.properties.width = out_width + else: + self.model.properties.width = d['ow'] + out_width = d['ow'] + # if is_square, height can be managed automatically by videoscale + if self.model.properties.is_square: + self.model.properties.height = 0 num, den = 1, 1 if not self.model.properties.is_square: num, den = self._par[0], self._par[1] msg = _('%dx%d, %d/%d pixel aspect ratio') % ( - d['ow'], d['oh'], num, den) + out_width, d['oh'], num, den) self.label_output_format.set_markup(msg) + if update_correction: + # if scaled width (after squaring) is not multiple of 8, present + # width correction and select padding as default. + self.frame_width_correction.set_sensitive(d['ow'] % 8 != 0) + self.radiobutton_width_none.set_active(d['ow'] % 8 == 0) + self.radiobutton_width_pad.set_active(d['ow'] % 8 != 0) + def _get_width_height(self): # returns dict with sw, sh, ow, oh # which are scaled width and height, and output width and height - sh = self._input_heights[self._factor_i] - sw = self._input_widths[self._factor_i] + oh = self._input_heights[self._factor_i] + ow = self._input_widths[self._factor_i] par = 1. * self._par[0] / self._par[1] if self.model.properties.is_square: - sw = int(math.ceil(sw * par)) - # for GStreamer element sanity, make sw an even number + ow = int(math.ceil(ow * par)) + # for GStreamer element sanity, make ow an even number # FIXME: check if this can now be removed - # sw = sw + (2 - (sw % 2)) % 2 - - # if scaled width (after squaring) is not multiple of 8, present - # width correction and select padding as default. - self.frame_width_correction.set_sensitive(sw % 8 != 0) - self.radiobutton_width_none.set_active(sw % 8 == 0) - self.radiobutton_width_pad.set_active(sw % 8 != 0) - - # actual output - ow = sw - oh = sh - - if self._width_correction == 'pad': - ow = sw + (8 - (sw % 8)) % 8 - elif self._width_correction == 'stretch': - ow = sw + (8 - (sw % 8)) % 8 - sw = ow - - return dict(sw=sw, sh=sh, ow=ow, oh=oh) + # ow = ow + (2 - (ow % 2)) % 2 + return dict(ow=ow, oh=oh) def _populateDevices(self): self._setSensitive(False) msg = messages.Info(T_(N_('Checking for Firewire devices...')), mid='firewire-check') self.wizard.add_msg(msg) - d = self.runInWorker('flumotion.worker.checks.gst010', - 'check1394devices', mid='firewire-check') + d = self.runInWorker('flumotion.worker.checks.device', + 'fetchDevices', 'firewire-check', + ['dv1394src'], 'guid') def firewireCheckDone(devices): self.wizard.clear_msg('firewire-check') @@ -208,6 +222,24 @@ d = self.runInWorker('flumotion.worker.checks.gst010', 'check1394', mid='firewire-check', guid=self.guid.get_selected()) + def chooseDecoder(missing): + if 'ffdec_dvvideo' in missing and 'dvdec' not in missing: + msg = messages.Warning(T_( + N_("GStreamer's dv decoder element (dvdec) will be used " + "instead of FFmpeg's which is better in terms of " + "performance.\nIf the configuration doesn't work " + "properly, consider installing the ffmpeg plugins for " + "gstreamer.")), mid='firewire-warning') + self.wizard.add_msg(msg) + self.model.properties.decoder = 'dvdec' + elif 'dvdec' in missing: + msg = messages.Error(T_( + N_("None of the dv decoder elements was found in your " + "system, consider installing the ffmpeg plugins for " + "gstreamer to continue.")), mid='firewire-error') + self.wizard.add_msg(msg) + self.wizard.blockNext(True) + def firewireCheckDone(options): self.wizard.clear_msg('firewire-check') self._dims = (options['width'], options['height']) @@ -221,7 +253,12 @@ if len(values) > 2: self.combobox_scaled_height.set_active(1) self._setSensitive(True) - self._update_output_format() + self._update_output_format(True) + + d = self.wizard.checkElements(self.model.worker, + 'ffdec_dvvideo', 'dvdec') + d.addCallback(chooseDecoder) + return d def trapRemoteFailure(failure): failure.trap(errors.RemoteRunFailure) @@ -237,13 +274,13 @@ # Callbacks def on_is_square_toggled(self, radio): - self._update_output_format() + self._update_output_format(True) def on_guid_changed(self, combo): self._runChecks() def on_combobox_scaled_height_changed(self, combo): - self._update_output_format() + self._update_output_format(True) def on_radiobutton_width_none_toggled(self, radio): self._update_output_format() @@ -287,6 +324,8 @@ # WizardStep def setup(self): + self.guid.data_type = int + self.add_proxy(self.model.properties, ['guid']) self.frame_scaling.hide() self.frame_width_correction.hide() self.frame_capture.hide() diff -Nru flumotion-0.6.1/flumotion/component/producers/gdp/gdp.py flumotion-0.9.1/flumotion/component/producers/gdp/gdp.py --- flumotion-0.6.1/flumotion/component/producers/gdp/gdp.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/gdp/gdp.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -from flumotion.component import feedcomponent -from flumotion.common import gstreamer, messages -from flumotion.common.i18n import N_, gettexter - -T_ = gettexter() - -__version__ = "$Rev: 7162 $" - - -class GDPProducer(feedcomponent.ParseLaunchComponent): - - def do_check(self): - # handle http://bugzilla.gnome.org/show_bug.cgi?id=532364 - version = gstreamer.get_plugin_version('tcp') - if version >= (0, 10, 18, 0) and version < (0, 10, 19, 2): - m = messages.Error(T_(N_( - "Version %s of the '%s' GStreamer plug-in contains a bug.\n"), - ".".join([str(x) for x in version]), 'tcp'), - mid='tcp-check') - m.add(T_(N_("The GDP producer cannot function with this bug.\n"))) - m.add(T_(N_("Please upgrade '%s' to version %s."), - 'gst-plugins-base', '0.10.20')) - self.addMessage(m) - - def get_pipeline_string(self, properties): - host = properties['host'] - port = properties['port'] - - return 'tcpclientsrc host=%s port=%d ! gdpdepay' % (host, port) diff -Nru flumotion-0.6.1/flumotion/component/producers/gdp/gdp.xml flumotion-0.9.1/flumotion/component/producers/gdp/gdp.xml --- flumotion-0.6.1/flumotion/component/producers/gdp/gdp.xml 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/gdp/gdp.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru flumotion-0.6.1/flumotion/component/producers/gdp/__init__.py flumotion-0.9.1/flumotion/component/producers/gdp/__init__.py --- flumotion-0.6.1/flumotion/component/producers/gdp/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/gdp/__init__.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -""" -code for porter clients and servers -""" - -__version__ = "$Rev: 7162 $" diff -Nru flumotion-0.6.1/flumotion/component/producers/gdp/Makefile.am flumotion-0.9.1/flumotion/component/producers/gdp/Makefile.am --- flumotion-0.6.1/flumotion/component/producers/gdp/Makefile.am 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/gdp/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -include $(top_srcdir)/common/python.mk - -gdpdir = $(libdir)/flumotion/python/flumotion/component/producers/gdp - -gdp_PYTHON = \ - __init__.py \ - gdp.py - -gdp_DATA = gdp.xml - -TAGS_FILES = $(gdp_PYTHON) - -clean-local: - rm -rf *.pyc *.pyo - -EXTRA_DIST = $(gdp_PYTHON) $(gdp_DATA) diff -Nru flumotion-0.6.1/flumotion/component/producers/gdp/Makefile.in flumotion-0.9.1/flumotion/component/producers/gdp/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/gdp/Makefile.in 2009-09-09 11:37:55.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/gdp/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,546 +0,0 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(gdp_PYTHON) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk -subdir = flumotion/component/producers/gdp -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ - $(top_srcdir)/common/as-libtool-tags.m4 \ - $(top_srcdir)/common/as-python.m4 \ - $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(gdpdir)" "$(DESTDIR)$(gdpdir)" -py_compile = $(top_srcdir)/py-compile -DATA = $(gdp_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BINDIR = @BINDIR@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CORTADO_PREFIX = @CORTADO_PREFIX@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPYDOC = @EPYDOC@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_ICONV = @INTLTOOL_ICONV@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ -INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ -INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ -INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALSTATEDIR = @LOCALSTATEDIR@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -POSUB = @POSUB@ -PYCHECKER = @PYCHECKER@ -PYGST_010_REQ = @PYGST_010_REQ@ -PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_INCLUDES = @PYTHON_INCLUDES@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -RELEASE = @RELEASE@ -SBINDIR = @SBINDIR@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SYSCONFDIR = @SYSCONFDIR@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XVFB = @XVFB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -gdpdir = $(libdir)/flumotion/python/flumotion/component/producers/gdp -gdp_PYTHON = \ - __init__.py \ - gdp.py - -gdp_DATA = gdp.xml -TAGS_FILES = $(gdp_PYTHON) -EXTRA_DIST = $(gdp_PYTHON) $(gdp_DATA) -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/component/producers/gdp/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu flumotion/component/producers/gdp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-gdpPYTHON: $(gdp_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(gdpdir)" || $(MKDIR_P) "$(DESTDIR)$(gdpdir)" - @list='$(gdp_PYTHON)'; dlist=; list2=; test -n "$(gdpdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ - $(am__strip_dir) \ - dlist="$$dlist $$f"; \ - list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ - for file in $$list2; do echo $$file; done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gdpdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(gdpdir)" || exit $$?; \ - done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(gdpdir)" $$dlist; \ - else \ - PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(gdpdir)" $$dlist; \ - fi; \ - else :; fi - -uninstall-gdpPYTHON: - @$(NORMAL_UNINSTALL) - @list='$(gdp_PYTHON)'; test -n "$(gdpdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - filesc=`echo "$$files" | sed 's|$$|c|'`; \ - fileso=`echo "$$files" | sed 's|$$|o|'`; \ - echo " ( cd '$(DESTDIR)$(gdpdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(gdpdir)" && rm -f $$files || exit $$?; \ - echo " ( cd '$(DESTDIR)$(gdpdir)' && rm -f" $$filesc ")"; \ - cd "$(DESTDIR)$(gdpdir)" && rm -f $$filesc || exit $$?; \ - echo " ( cd '$(DESTDIR)$(gdpdir)' && rm -f" $$fileso ")"; \ - cd "$(DESTDIR)$(gdpdir)" && rm -f $$fileso -install-gdpDATA: $(gdp_DATA) - @$(NORMAL_INSTALL) - test -z "$(gdpdir)" || $(MKDIR_P) "$(DESTDIR)$(gdpdir)" - @list='$(gdp_DATA)'; test -n "$(gdpdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gdpdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(gdpdir)" || exit $$?; \ - done - -uninstall-gdpDATA: - @$(NORMAL_UNINSTALL) - @list='$(gdp_DATA)'; test -n "$(gdpdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(gdpdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(gdpdir)" && rm -f $$files -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(DATA) -installdirs: - for dir in "$(DESTDIR)$(gdpdir)" "$(DESTDIR)$(gdpdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-gdpDATA install-gdpPYTHON - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-gdpDATA uninstall-gdpPYTHON - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - clean-local distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-gdpDATA \ - install-gdpPYTHON install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-gdpDATA uninstall-gdpPYTHON - - -#if HAVE_PYCHECKER -#check-local: $(PYCHECKER_FILES) -# if test ! -z "$(PYCHECKER_FILES)"; \ -# then \ -# PYTHONPATH=$(top_srcdir):$(top_builddir) \ -# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ -# $(PYCHECKER_FILES); \ -# fi -#endif - -clean-local: - rm -rf *.pyc *.pyo - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/component/producers/icecast/icecast.py flumotion-0.9.1/flumotion/component/producers/icecast/icecast.py --- flumotion-0.6.1/flumotion/component/producers/icecast/icecast.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/icecast/icecast.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -25,54 +21,89 @@ from flumotion.twisted.defer import RetryingDeferred from flumotion.common import errors -__version__ = "$Rev: 7901 $" +__version__ = "$Rev$" class Icecast(feedcomponent.ParseLaunchComponent): + configured = False + def get_pipeline_string(self, properties): - return "gnomevfssrc name=src ! typefind name=tf" + return "souphttpsrc name=src ! typefind name=tf" + + def _typefind_have_caps_cb(self, tf, prob, caps): + # Basing on the cappabilities plug additional gst compoponents: + # 1. If we have pure audio (http src doesn't support ICY) plug parser + # 2. If we have application/x-icy plug the icydemuxer and than parser + capsname = caps[0].get_name() + tf_src_pad = tf.get_pad('src') + gdp_sink_pad = tf_src_pad.get_peer() + # unlink the typefind from the gdp pad so that we can put another + # component in it's place + tf_src_pad.unlink(gdp_sink_pad) + + if capsname == 'application/x-icy': + demuxer = gst.element_factory_make("icydemux") + demuxer.set_state(gst.STATE_PLAYING) + self._demuxer_name = demuxer.get_name() + self.pipeline.add(demuxer) + tf.link(demuxer) + # demuxer src pad is dynamic, we need to register a callback + demuxer.connect('pad-added', self._link_parser, gdp_sink_pad) + else: + self._demuxer_name = None + self._link_parser(tf, tf_src_pad, gdp_sink_pad) + + def _link_parser(self, element, pad, gdp_sink_pad): + # Append the audio parser to the end of the pipeline + caps = pad.get_caps() + capsname = caps.get_structure(0).get_name() + self._parser_name = None + parser = None + if self.passthrough: + self.info("Acting in passthrough mode, not parsing the audio") + pad.link(gdp_sink_pad) + return + if capsname == 'application/ogg': + parser = gst.element_factory_make('oggparse') + elif capsname == 'audio/mpeg': + mpegversion = caps[0]['mpegversion'] + if mpegversion == 1: + self.info("Detecting MP3 stream. Adding 'mp3parse'") + parser = gst.element_factory_make('mp3parse') + elif mpegversion in [2, 4]: + self.info("Detecting AAC stream. Adding 'aacparse'") + parser = gst.element_factory_make('aacparse') + if parser: + self._parser_name = parser.get_name() + parser.set_state(gst.STATE_PLAYING) + self.pipeline.add(parser) + element.link(parser) + parser.get_pad('src').link(gdp_sink_pad) + else: + # in case we good sth else than mp3 or ogg just connect the + # gdb back + self.warning("Couldn't find the correct parser for caps: %s",\ + capsname) + pad.link(gdp_sink_pad) def configure_pipeline(self, pipeline, properties): # Later, when the typefind element has successfully found the type # of the data, we'll rebuild the pipeline. - - def have_caps(tf, prob, caps): - capsname = caps[0].get_name() - # We should add appropriate parsers for any given format here. For - # some it's critical for this to work at all, for others - # it's needed for timestamps (thus for things like - # time-based burst-on-connect) Currently, we only handle ogg. - parser = None - if capsname == 'application/ogg': - parser = gst.element_factory_make('oggparse') - elif capsname == 'audio/mpeg': - parser = gst.element_factory_make('mp3parse') - - if parser: - parser.set_state(gst.STATE_PLAYING) - pipeline.add(parser) - # Relink - unlink typefind from the bits that follow it (the - # gdp payloader), link in the parser, relink to the payloader. - pad = tf.get_pad('src') - peer = pad.get_peer() - pad.unlink(peer) - tf.link(parser) - parser.link(peer.get_parent()) - # Disconnect signal to avoid adding a parser every time - # it gets reconnected. - tf.disconnect(self.signal_id) - self.src = pipeline.get_by_name('src') self.url = properties['url'] + self.passthrough = properties.get('passthrough', False) self.src.set_property('location', self.url) + self.src.set_property('iradio-mode', True) typefind = pipeline.get_by_name('tf') - self.signal_id = typefind.connect('have-type', have_caps) + self.signal_id = typefind.connect('have-type',\ + self._typefind_have_caps_cb) - self._pad_monitors.attach(self.src.get_pad('src'), 'gnomevfs-src') - self._pad_monitors['gnomevfs-src'].addWatch( - self._src_connected, self._src_disconnected) + if not self.configured: + self.attachPadMonitorToElement('src', + self._src_connected, + self._src_disconnected) self.reconnecting = False self.reconnector = RetryingDeferred(self.connect) self.reconnector.initialDelay = 1.0 @@ -83,6 +114,7 @@ if event.type == gst.EVENT_EOS: return False return True + self.configured = True self.src.get_pad('src').add_event_probe(_drop_eos) def bus_message_received_cb(self, bus, message): @@ -97,7 +129,7 @@ self, bus, message) def connect(self): - self.info('Connecting to icecast server: %s', self.url) + self.info('Connecting to icecast server on %s', self.url) self.src.set_state(gst.STATE_READY) # can't just self.src.set_state(gst.STATE_PLAYING), # because the pipeline might NOT be in PLAYING, @@ -107,19 +139,55 @@ return self.attemptD def _src_connected(self, name): - self.info('Connected to icecast server : %s', self.url) + self.info('Connected to icecast server on %s', self.url) if self.reconnecting: assert self.attemptD self.attemptD.callback(None) self.reconnecting = False + def _reset(self, pad): + # remove all the elements downstream souphttpsrc. + tf = self.get_element('tf') + pad.unlink(tf.get_pad('sink')) + + parser = self.get_element(self._parser_name) + tf.get_pad('src').unlink(parser.get_pad('sink')) + peer = parser.get_pad('src').get_peer() + parser.get_pad('src').unlink(peer) + + parser.set_state(gst.STATE_NULL) + self.pipeline.remove(parser) + self._parser_name = None + tf.set_state(gst.STATE_NULL) + self.pipeline.remove(tf) + if self._demuxer_name is not None: + demuxer = self.get_element(self._demuxer_name) + demuxer.set_state(gst.STATE_NULL) + self.pipeline.remove(demuxer) + self._demuxer_name = None + + # recreate the typefind element in order to be in the same state as + # when the component was first initiated + tf = gst.element_factory_make('typefind', 'tf') + self.pipeline.add(tf) + tf.set_state(gst.STATE_PLAYING) + pad.link(tf.get_pad('sink')) + tf.get_pad('src').link(peer) + + # reconfigure the pipeline + self.configure_pipeline(self.pipeline, self.config['properties']) + self.pipeline.set_state(gst.STATE_PLAYING) + self.reconnecting = True + self.reconnector.start() + def _src_disconnected(self, name): - self.info('Icecast server: %s got disconnected', self.url) + self.info('Disconnected from icecast server on %s', self.url) if not self.reconnecting: - self.reconnecting = True - self.reconnector.start() + src = self.get_element('src') + pad = src.get_pad('src') + self._reset(pad) def _retry(self): assert self.attemptD - self.debug('Retrying connection to icecast server: %s', self.url) + self.debug('Retrying connection to icecast server on %s', self.url) self.attemptD.errback(errors.ConnectionError) diff -Nru flumotion-0.6.1/flumotion/component/producers/icecast/icecast.xml flumotion-0.9.1/flumotion/component/producers/icecast/icecast.xml --- flumotion-0.6.1/flumotion/component/producers/icecast/icecast.xml 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/icecast/icecast.xml 2011-09-11 08:09:04.000000000 +0000 @@ -12,9 +12,15 @@ function="Icecast" /> + + + + + diff -Nru flumotion-0.6.1/flumotion/component/producers/icecast/__init__.py flumotion-0.9.1/flumotion/component/producers/icecast/__init__.py --- flumotion-0.6.1/flumotion/component/producers/icecast/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/icecast/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/icecast/Makefile.in flumotion-0.9.1/flumotion/component/producers/icecast/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/icecast/Makefile.in 2009-09-09 11:37:55.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/icecast/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/__init__.py flumotion-0.9.1/flumotion/component/producers/__init__.py --- flumotion-0.6.1/flumotion/component/producers/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/ivtv/__init__.py flumotion-0.9.1/flumotion/component/producers/ivtv/__init__.py --- flumotion-0.6.1/flumotion/component/producers/ivtv/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/ivtv/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,21 +1,19 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005 Fluendo, S.L. (www.fluendo.com). All rights reserved. +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/ivtv/ivtv.py flumotion-0.9.1/flumotion/component/producers/ivtv/ivtv.py --- flumotion-0.6.1/flumotion/component/producers/ivtv/ivtv.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/ivtv/ivtv.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,46 +1,91 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005 Fluendo, S.L. (www.fluendo.com). All rights reserved. +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + from flumotion.component import feedcomponent +from flumotion.component.effects.deinterlace import deinterlace +from flumotion.component.effects.videorate import videorate +from flumotion.component.effects.videoscale import videoscale -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class Ivtv(feedcomponent.ParseLaunchComponent): - def get_pipeline_string(self, properties): - device = properties.get('device', '/dev/video0') - deinterlacer = properties.get('deinterlacer', '') + def check_properties(self, props, addMessage): + deintMode = props.get('deinterlace-mode', 'auto') + deintMethod = props.get('deinterlace-method', 'ffmpeg') + + if deintMode not in deinterlace.DEINTERLACE_MODE: + msg = messages.Error(T_(N_("Configuration error: '%s' " \ + "is not a valid deinterlace mode." % deintMode))) + addMessage(msg) + raise errors.ConfigError(msg) + + if deintMethod not in deinterlace.DEINTERLACE_METHOD: + msg = messages.Error(T_(N_("Configuration error: '%s' " \ + "is not a valid deinterlace method." % deintMethod))) + self.debug("'%s' is not a valid deinterlace method", + deintMethod) + addMessage(msg) + raise errors.ConfigError(msg) - # by default, we let GStreamer decide width and height - width = properties.get('width', 0) - height = properties.get('height', 0) - if width > 0 and height > 0: - scaling_template = (" videoscale method=1 ! " - "video/x-raw-yuv,width=%d,height=%d " % (width, height)) + def get_pipeline_string(self, properties): + p = properties + device = p.get('device', '/dev/video0') + deinterlacer = p.get('deinterlacer', '') + self.is_square = p.get('is-square', False) + self.width = p.get('width', 0) + self.height = p.get('height', 0) + if not self.is_square and not self.height: + self.height = int(576 * self.width/720.) # assuming PAL + self.add_borders = p.get('add-borders', True) + self.deintMode = p.get('deinterlace-mode', 'auto') + self.deintMethod = p.get('deinterlace-method', 'ffmpeg') + + fr = p.get('framerate', None) + if fr is not None: + self.framerate = gst.Fraction(fr[0], fr[1]) else: - scaling_template = "" + self.framerate = None - return ("filesrc name=src location=%s ! decodebin name=d ! queue ! " - " %s ! %s ! ffmpegcolorspace ! video/x-raw-yuv " - " ! @feeder:video@ d. ! queue ! audioconvert " - " ! audio/x-raw-int " - " ! @feeder:audio@" - % (device, deinterlacer, scaling_template)) + template = ("filesrc name=src location=%s" + " ! decodebin name=dec " + " dec. ! identity silent=true name=video ! @feeder:video@" + " dec. ! audioconvert ! audio/x-raw-int " + " ! @feeder:audio@" % device) + + return template + + def configure_pipeline(self, pipeline, properties): + video = pipeline.get_by_name('video') + vr = videorate.Videorate('videorate', + video.get_pad("src"), pipeline, self.framerate) + self.addEffect(vr) + vr.plug() + + deinterlacer = deinterlace.Deinterlace('deinterlace', + vr.effectBin.get_pad("src"), pipeline, + self.deintMode, self.deintMethod) + self.addEffect(deinterlacer) + deinterlacer.plug() + + videoscaler = videoscale.Videoscale('videoscale', self, + deinterlacer.effectBin.get_pad("src"), pipeline, + self.width, self.height, self.is_square, self.add_borders) + self.addEffect(videoscaler) + videoscaler.plug() diff -Nru flumotion-0.6.1/flumotion/component/producers/ivtv/ivtv.xml flumotion-0.9.1/flumotion/component/producers/ivtv/ivtv.xml --- flumotion-0.6.1/flumotion/component/producers/ivtv/ivtv.xml 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/ivtv/ivtv.xml 2011-09-11 08:09:04.000000000 +0000 @@ -14,14 +14,24 @@ - - - + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/producers/ivtv/Makefile.in flumotion-0.9.1/flumotion/component/producers/ivtv/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/ivtv/Makefile.in 2009-09-09 11:37:55.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/ivtv/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/looper/admin_gtk.py flumotion-0.9.1/flumotion/component/producers/looper/admin_gtk.py --- flumotion-0.6.1/flumotion/component/producers/looper/admin_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/looper/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -28,7 +24,7 @@ from flumotion.component.base.baseadminnode import BaseAdminGtkNode from flumotion.ui.glade import GladeWidget -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" _ = gettext.gettext diff -Nru flumotion-0.6.1/flumotion/component/producers/looper/__init__.py flumotion-0.9.1/flumotion/component/producers/looper/__init__.py --- flumotion-0.6.1/flumotion/component/producers/looper/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/looper/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/looper/looper.py flumotion-0.9.1/flumotion/component/producers/looper/looper.py --- flumotion-0.6.1/flumotion/component/producers/looper/looper.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/looper/looper.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -26,7 +22,7 @@ from flumotion.common.i18n import N_, gettexter from flumotion.component import feedcomponent -__version__ = "$Rev: 7832 $" +__version__ = "$Rev$" T_ = gettexter() @@ -35,8 +31,8 @@ def __init__(self, comp): feedcomponent.FeedComponentMedium.__init__(self, comp) - def remote_gimme5(self, text): - return self.comp.do_seek() + def remote_restartLoop(self): + return self.comp.do_seek(False) def remote_getNbIterations(self): return self.comp.nbiterations @@ -142,7 +138,7 @@ debug='%s\n%s' % (gerror.message, debug), mid=gerror.domain, priority=40) base = feedcomponent.ParseLaunchComponent - return base.make_message_for_gstreamer_error(gerror, debug) + return base.make_message_for_gstreamer_error(self, gerror, debug) def run_discoverer(self): @@ -236,7 +232,7 @@ def check_time(): self.log("checking position") try: - pos, format = self.pipeline.query_position(gst.FORMAT_TIME) + pos, _ = self.pipeline.query_position(gst.FORMAT_TIME) except: self.debug("position query didn't succeed") else: diff -Nru flumotion-0.6.1/flumotion/component/producers/looper/Makefile.in flumotion-0.9.1/flumotion/component/producers/looper/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/looper/Makefile.in 2009-09-09 11:37:55.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/looper/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/looper/wizard_gtk.py flumotion-0.9.1/flumotion/component/producers/looper/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/producers/looper/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/looper/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -27,8 +23,7 @@ from zope.interface import implements -from flumotion.configure import configure -from flumotion.common import errors, messages +from flumotion.common import messages from flumotion.common.i18n import N_, gettexter from flumotion.admin.gtk.basesteps import AudioProducerStep, VideoProducerStep from flumotion.admin.assistant.interfaces import IProducerPlugin diff -Nru flumotion-0.6.1/flumotion/component/producers/Makefile.am flumotion-0.9.1/flumotion/component/producers/Makefile.am --- flumotion-0.6.1/flumotion/component/producers/Makefile.am 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -13,6 +13,7 @@ SUBDIRS = \ audiotest \ bttv \ + blackmagic \ firewire \ icecast \ ivtv \ @@ -25,6 +26,6 @@ webcam \ looper \ unixdomain \ - gdp + fgdp EXTRA_DIST = $(producers_DATA) diff -Nru flumotion-0.6.1/flumotion/component/producers/Makefile.in flumotion-0.9.1/flumotion/component/producers/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/Makefile.in 2009-09-09 11:37:54.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -144,6 +143,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -153,18 +153,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -212,6 +205,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -229,16 +223,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -246,7 +242,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -261,6 +256,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -293,7 +289,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -322,6 +317,7 @@ SUBDIRS = \ audiotest \ bttv \ + blackmagic \ firewire \ icecast \ ivtv \ @@ -334,7 +330,7 @@ webcam \ looper \ unixdomain \ - gdp + fgdp EXTRA_DIST = $(producers_DATA) all: all-recursive @@ -442,7 +438,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -467,7 +463,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/flumotion/component/producers/pipeline/__init__.py flumotion-0.9.1/flumotion/component/producers/pipeline/__init__.py --- flumotion-0.6.1/flumotion/component/producers/pipeline/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/pipeline/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/pipeline/Makefile.in flumotion-0.9.1/flumotion/component/producers/pipeline/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/pipeline/Makefile.in 2009-09-09 11:37:55.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/pipeline/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/pipeline/pipeline.py flumotion-0.9.1/flumotion/component/producers/pipeline/pipeline.py --- flumotion-0.6.1/flumotion/component/producers/pipeline/pipeline.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/pipeline/pipeline.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,24 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component import feedcomponent __all__ = ['Producer'] -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class Producer(feedcomponent.ParseLaunchComponent): diff -Nru flumotion-0.6.1/flumotion/component/producers/playlist/admin_gtk.py flumotion-0.9.1/flumotion/component/producers/playlist/admin_gtk.py --- flumotion-0.6.1/flumotion/component/producers/playlist/admin_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/playlist/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -95,8 +91,8 @@ str(item[1])]) def _remove(self, item): - iter = self._iters[item[0]] - if iter: + i = self._iters[item[0]] + if i: self.store.remove(iter) self._iters.pop(iter) diff -Nru flumotion-0.6.1/flumotion/component/producers/playlist/__init__.py flumotion-0.9.1/flumotion/component/producers/playlist/__init__.py --- flumotion-0.6.1/flumotion/component/producers/playlist/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/playlist/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/playlist/Makefile.in flumotion-0.9.1/flumotion/component/producers/playlist/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/playlist/Makefile.in 2009-09-09 11:37:55.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/playlist/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/playlist/playlistparser.py flumotion-0.9.1/flumotion/component/producers/playlist/playlistparser.py --- flumotion-0.6.1/flumotion/component/producers/playlist/playlistparser.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/playlist/playlistparser.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -32,7 +28,7 @@ from flumotion.common import log, fxml -__version__ = "$Rev: 7849 $" +__version__ = "$Rev$" class PlaylistItem(object, log.Loggable): @@ -133,30 +129,30 @@ # prev starts strictly before the new item # next starts after the new item, and ends after the # end of the new item - prev = next = None + prevItem = nextItem = None item = self.items while item: if item.timestamp < newitem.timestamp: - prev = item + prevItem = item else: break item = item.next - if prev: - item = prev.next + if prevItem: + item = prevItem.next while item: if (item.timestamp > newitem.timestamp and item.timestamp + item.duration > newitem.timestamp + newitem.duration): - next = item + nextItem = item break item = item.next - if prev: + if prevItem: # Then things between prev and next (next might be None) are to be # deleted. Do so. - cur = prev.next - while cur != next: + cur = prevItem.next + while cur != nextItem: self._itemsById[cur.id].remove(cur) if not self._itemsById[cur.id]: del self._itemsById[cur.id] @@ -164,31 +160,33 @@ cur = cur.next # update links. - if prev: - prev.next = newitem - newitem.prev = prev + if prevItem: + prevItem.next = newitem + newitem.prev = prevItem else: self.items = newitem - if next: - newitem.next = next - next.prev = newitem + if nextItem: + newitem.next = nextItem + nextItem.prev = newitem # Duration adjustments -> Reflect into gnonlin timeline - if prev and prev.timestamp + prev.duration > newitem.timestamp: + if prevItem and \ + prevItem.timestamp + prevItem.duration > newitem.timestamp: self.debug("Changing duration of previous item from %d to %d", - prev.duration, newitem.timestamp - prev.timestamp) - prev.duration = newitem.timestamp - prev.timestamp - self.producer.adjustItemScheduling(prev) + prevItem.duration, newitem.timestamp - prevItem.timestamp) + prevItem.duration = newitem.timestamp - prevItem.timestamp + self.producer.adjustItemScheduling(prevItem) - if next and newitem.timestamp + newitem.duration > next.timestamp: + if nextItem and \ + newitem.timestamp + newitem.duration > nextItem.timestamp: self.debug("Changing timestamp of next item from %d to %d to fit", newitem.timestamp, newitem.timestamp + newitem.duration) ts = newitem.timestamp + newitem.duration - duration = next.duration - (ts - next.timestamp) - next.duration = duration - next.timestamp = ts - self.producer.adjustItemScheduling(next) + duration = nextItem.duration - (ts - nextItem.timestamp) + nextItem.duration = duration + nextItem.timestamp = ts + self.producer.adjustItemScheduling(nextItem) # Then we need to actually add newitem into the gnonlin timeline if not self.producer.scheduleItem(newitem): @@ -446,10 +444,10 @@ if trailing[0] != '.' or trailing[3] != 'Z' or \ not trailing[1].isdigit() or not trailing[2].isdigit(): raise fxml.ParserError("Invalid timestamp %s" % ts) - format = "%Y-%m-%dT%H:%M:%S" + formatString = "%Y-%m-%dT%H:%M:%S" try: - timestruct = time.strptime(tsmain, format) + timestruct = time.strptime(tsmain, formatString) return int(calendar.timegm(timestruct) * gst.SECOND) except ValueError: raise fxml.ParserError("Invalid timestamp %s" % ts) diff -Nru flumotion-0.6.1/flumotion/component/producers/playlist/playlist.py flumotion-0.9.1/flumotion/component/producers/playlist/playlist.py --- flumotion-0.6.1/flumotion/component/producers/playlist/playlist.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/playlist/playlist.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import time @@ -33,7 +29,7 @@ import singledecodebin import playlistparser -__version__ = "$Rev: 7974 $" +__version__ = "$Rev$" T_ = gettexter() @@ -264,7 +260,8 @@ def _setupClock(self, pipeline): # Configure our pipeline to use a known basetime and clock. - clock = gst.SystemClock() + clock = gst.system_clock_obtain() + clock.set_property('clock-type', 'realtime') # It doesn't matter too much what this basetime is, so long as we know # the value. self.basetime = clock.get_time() diff -Nru flumotion-0.6.1/flumotion/component/producers/playlist/singledecodebin.py flumotion-0.9.1/flumotion/component/producers/playlist/singledecodebin.py --- flumotion-0.6.1/flumotion/component/producers/playlist/singledecodebin.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/playlist/singledecodebin.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,27 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. # Originally part of PiTiVi, # Copyright (C) 2005-2007 Edward Hervey , -# Relicensed under the above dual license with his permission. """ Single-stream queue-less decodebin @@ -30,7 +25,7 @@ import gobject import gst -__version__ = "$Rev: 7827 $" +__version__ = "$Rev$" def find_upstream_demuxer_and_pad(pad): @@ -75,7 +70,6 @@ def get_type_from_decoder(decoder): - log.debug("stream", "%r" % decoder) klass = decoder.get_factory().get_klass() parts = klass.split('/', 2) if len(parts) != 3: diff -Nru flumotion-0.6.1/flumotion/component/producers/playlist/smartscale.py flumotion-0.9.1/flumotion/component/producers/playlist/smartscale.py --- flumotion-0.6.1/flumotion/component/producers/playlist/smartscale.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/playlist/smartscale.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,27 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. # Originally part of PiTiVi, # Copyright (C) 2005-2007 Edward Hervey , -# Relicensed under the above dual license with his permission. """ Smart video scaler @@ -38,7 +33,7 @@ import gobject import gst -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class SmartVideoScale(gst.Bin): diff -Nru flumotion-0.6.1/flumotion/component/producers/rtsp/__init__.py flumotion-0.9.1/flumotion/component/producers/rtsp/__init__.py --- flumotion-0.6.1/flumotion/component/producers/rtsp/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/rtsp/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,21 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005 Fluendo, S.L. (www.fluendo.com). All rights reserved. +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/rtsp/Makefile.in flumotion-0.9.1/flumotion/component/producers/rtsp/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/rtsp/Makefile.in 2009-09-09 11:37:55.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/rtsp/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/rtsp/rtsp.py flumotion-0.9.1/flumotion/component/producers/rtsp/rtsp.py --- flumotion-0.6.1/flumotion/component/producers/rtsp/rtsp.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/rtsp/rtsp.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,24 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005 Fluendo, S.L. (www.fluendo.com). All rights reserved. +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + from flumotion.component import feedcomponent -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" # this is a producer component for rtsp sources eg axis network cameras diff -Nru flumotion-0.6.1/flumotion/component/producers/screencast/__init__.py flumotion-0.9.1/flumotion/component/producers/screencast/__init__.py --- flumotion-0.6.1/flumotion/component/producers/screencast/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/screencast/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/screencast/Makefile.in flumotion-0.9.1/flumotion/component/producers/screencast/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/screencast/Makefile.in 2009-09-09 11:37:56.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/screencast/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/screencast/screencast.py flumotion-0.9.1/flumotion/component/producers/screencast/screencast.py --- flumotion-0.6.1/flumotion/component/producers/screencast/screencast.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/screencast/screencast.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,29 +1,24 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import errors, gstreamer, messages from flumotion.component import feedcomponent -from flumotion.component.effects.volume import volume -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class Screencast(feedcomponent.ParseLaunchComponent): diff -Nru flumotion-0.6.1/flumotion/component/producers/soundcard/admin_gtk.py flumotion-0.9.1/flumotion/component/producers/soundcard/admin_gtk.py --- flumotion-0.6.1/flumotion/component/producers/soundcard/admin_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/soundcard/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,24 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component.base import admin_gtk from flumotion.component.effects.volume import admin_gtk as vadmin_gtk -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class SoundcardAdminGtk(admin_gtk.BaseAdminGtk): diff -Nru flumotion-0.6.1/flumotion/component/producers/soundcard/__init__.py flumotion-0.9.1/flumotion/component/producers/soundcard/__init__.py --- flumotion-0.6.1/flumotion/component/producers/soundcard/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/soundcard/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/soundcard/Makefile.in flumotion-0.9.1/flumotion/component/producers/soundcard/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/soundcard/Makefile.in 2009-09-09 11:37:56.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/soundcard/Makefile.in 2011-09-11 08:09:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/soundcard/soundcard.py flumotion-0.9.1/flumotion/component/producers/soundcard/soundcard.py --- flumotion-0.6.1/flumotion/component/producers/soundcard/soundcard.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/soundcard/soundcard.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_soundcard -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -29,7 +25,7 @@ from flumotion.component import feedcomponent from flumotion.component.effects.volume import volume -__version__ = "$Rev: 7681 $" +__version__ = "$Rev$" T_ = gettexter() diff -Nru flumotion-0.6.1/flumotion/component/producers/soundcard/wizard_gtk.py flumotion-0.9.1/flumotion/component/producers/soundcard/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/producers/soundcard/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/soundcard/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -31,7 +27,7 @@ from flumotion.common.messages import Info from flumotion.admin.gtk.basesteps import AudioProducerStep -__version__ = "$Rev: 8057 $" +__version__ = "$Rev$" _ = gettext.gettext T_ = gettexter() @@ -113,7 +109,7 @@ def _updateDevices(self): self.wizard.waitForTask('soundcard checks') - self.wizard.clear_msg('soundcard-device') + self.wizard.clear_msg('soundcard-check') msg = Info(T_( N_("Looking for the sound devices present on the system. " @@ -135,7 +131,7 @@ d = self.runInWorker( 'flumotion.worker.checks.audio', 'getAudioDevices', - sourceElement, mid='soundcard-device') + sourceElement, mid='soundcard-check') d.addCallback(gotSoundDevices) d.addErrback(checkFailed) @@ -206,9 +202,14 @@ capStruct = self._capStructs.get(self.depth.get_selected()) if capStruct is None: return - max, min = capStruct['rate'] + if type(capStruct['rate']) == int: + maxRate = minRate = capStruct['rate'] + else: + maxRate, minRate = capStruct['rate'] + self.samplerate.prefill( - [(str(rate), rate) for rate in SAMPLE_RATES if min <= rate <= max]) + [(str(rate), rate) for rate in SAMPLE_RATES + if minRate <= rate <= maxRate]) self.samplerate.set_sensitive(True) # Callbacks diff -Nru flumotion-0.6.1/flumotion/component/producers/unixdomain/__init__.py flumotion-0.9.1/flumotion/component/producers/unixdomain/__init__.py --- flumotion-0.6.1/flumotion/component/producers/unixdomain/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/unixdomain/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ Producer to receive gdp-payloaded data on a unix domain socket """ -__version__ = "$Rev: 6125 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/unixdomain/Makefile.in flumotion-0.9.1/flumotion/component/producers/unixdomain/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/unixdomain/Makefile.in 2009-09-09 11:37:56.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/unixdomain/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/unixdomain/unixdomain.py flumotion-0.9.1/flumotion/component/producers/unixdomain/unixdomain.py --- flumotion-0.6.1/flumotion/component/producers/unixdomain/unixdomain.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/unixdomain/unixdomain.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -27,7 +23,7 @@ from twisted.internet.protocol import ServerFactory, Protocol from twisted.internet import defer, reactor -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" # Fake Protocol diff -Nru flumotion-0.6.1/flumotion/component/producers/videotest/admin_gtk.py flumotion-0.9.1/flumotion/component/producers/videotest/admin_gtk.py --- flumotion-0.6.1/flumotion/component/producers/videotest/admin_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/videotest/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from gettext import gettext as _ @@ -27,15 +23,29 @@ from flumotion.component.base.baseadminnode import BaseAdminGtkNode from flumotion.ui import fgtk -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" VideoTestPattern = enum.EnumClass( 'VideoTestPattern', - ['Bars', 'Snow', 'Black'], - [_('SMPTE Color bars'), + ['Bars', 'Snow', 'Black', 'White', 'Red', 'Green', 'Blue', 'Checkers-1', + 'Checkers-2', 'Checkers-4', 'Checkers-8', 'Circular', 'Blink', + 'Bars 75%', 'Zone-plate'], + [_('SMPTE 100% color bars'), _('Random (television snow)'), - _('Totally black')]) + _('100% Black'), + _('100% White'), + _('100% Red'), + _('100% Green'), + _('100% Blue'), + _('Checkers 1px'), + _('Checkers 2px'), + _('Checkers 4px'), + _('Checkers 8px'), + _('Circular'), + _('Blink'), + _('SMPTE 75% color bars'), + _('Zone plate')]) class PatternNode(BaseAdminGtkNode): diff -Nru flumotion-0.6.1/flumotion/component/producers/videotest/admin_text.py flumotion-0.9.1/flumotion/component/producers/videotest/admin_text.py --- flumotion-0.6.1/flumotion/component/producers/videotest/admin_text.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/videotest/admin_text.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,31 +1,25 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -from flumotion.component.base.admin_text import BaseAdminText - import string -from twisted.internet import defer +from flumotion.component.base.admin_text import BaseAdminText -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class VideoTestAdminText(BaseAdminText): diff -Nru flumotion-0.6.1/flumotion/component/producers/videotest/__init__.py flumotion-0.9.1/flumotion/component/producers/videotest/__init__.py --- flumotion-0.6.1/flumotion/component/producers/videotest/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/videotest/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/videotest/Makefile.in flumotion-0.9.1/flumotion/component/producers/videotest/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/videotest/Makefile.in 2009-09-09 11:37:56.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/videotest/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/videotest/videotest.py flumotion-0.9.1/flumotion/component/producers/videotest/videotest.py --- flumotion-0.6.1/flumotion/component/producers/videotest/videotest.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/videotest/videotest.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -25,7 +21,7 @@ from flumotion.common.i18n import N_, gettexter from flumotion.component import feedcomponent -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" T_ = gettexter() @@ -43,13 +39,13 @@ self.uiState.addKey('pattern', 0) def get_pipeline_string(self, properties): - format = properties.get('format', 'video/x-raw-yuv') + capsString = properties.get('format', 'video/x-raw-yuv') - if format == 'video/x-raw-yuv': - format = '%s,format=(fourcc)I420' % format + if capsString == 'video/x-raw-yuv': + capsString = '%s,format=(fourcc)I420' % capsString # Filtered caps - struct = gst.structure_from_string(format) + struct = gst.structure_from_string(capsString) for k in 'width', 'height': if k in properties: struct[k] = properties[k] @@ -65,7 +61,7 @@ struct['pixel-aspect-ratio'] = gst.Fraction(par[0], par[1]) # If RGB, set something ffmpegcolorspace can convert. - if format == 'video/x-raw-rgb': + if capsString == 'video/x-raw-rgb': struct['red_mask'] = 0xff00 caps = gst.Caps(struct) diff -Nru flumotion-0.6.1/flumotion/component/producers/videotest/wizard.glade flumotion-0.9.1/flumotion/component/producers/videotest/wizard.glade --- flumotion-0.6.1/flumotion/component/producers/videotest/wizard.glade 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/videotest/wizard.glade 2011-09-11 08:09:04.000000000 +0000 @@ -1,351 +1,238 @@ - - - + - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - 5 - 3 - False - 6 - 12 - - - - True - _Width: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - _Height: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - F_rame Rate: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - _Pattern: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - pattern - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 4 - 5 - fill - - - - - - - True - False - 0 - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 320 16 1024 1 16 10 - - - 0 - False - True - - - - - 1 - 2 - 0 - 1 - fill - - - - - - - True - False - 0 - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 240 16 768 1 16 10 - - - 0 - False - True - - - - - 1 - 2 - 1 - 2 - fill - fill - - - - - - True - False - 0 - - - - True - True - 1 - 4 - False - GTK_UPDATE_ALWAYS - False - False - 5 0 100 0.10000000149 1 10 - - - 0 - False - True - - - - - 1 - 2 - 2 - 3 - fill - fill - - - - - - True - pixels - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 2 - 3 - 0 - 1 - fill - - - - - - - True - pixels - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 2 - 3 - 1 - 2 - fill - - - - - - - True - frames per second - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 2 - 3 - 2 - 3 - fill - - - - - - - True - False - True - - - 1 - 3 - 4 - 5 - fill - fill - - - - - - + + + + window1 + + + True + 5 + 4 + 12 + 6 + + + True + 0 + F_rame Rate: + True + framerate + + + 4 + 5 + GTK_FILL + + + + + + True + + + True + True + + 5 0 100 0.10000000149 1 10 + 1 + 4 + + + False + 0 + + + + + 1 + 2 + 4 + 5 + GTK_FILL + + + + + + True + 0 + frames per second + + + 2 + 4 + 4 + 5 + GTK_FILL + + + + + + True + + + True + True + + 240 16 768 1 16 10 + 1 + + + False + 0 + + + + + 1 + 2 + 3 + 4 + GTK_FILL + + + + + + True + + + True + True + + 320 16 1024 1 16 10 + 1 + + + False + 0 + + + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + True + 0 + _Height: + True + height + + + 3 + 4 + GTK_FILL + + + + + + True + 0 + _Width: + True + width + + + 2 + 3 + GTK_FILL + + + + + + True + + + 1 + 4 + GTK_FILL + + + + + + True + 0 + _Pattern: + True + + + GTK_FILL + + + + + + True + 0 + pixels + + + 2 + 3 + 3 + 4 + GTK_FILL + + + + + + True + 0 + pixels + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + + True + gtk-missing-image + + + 3 + 4 + 1 + 4 + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/producers/videotest/wizard_gtk.py flumotion-0.9.1/flumotion/component/producers/videotest/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/producers/videotest/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/videotest/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -28,8 +24,9 @@ from flumotion.admin.assistant.interfaces import IProducerPlugin from flumotion.admin.assistant.models import VideoProducer from flumotion.admin.gtk.basesteps import VideoProducerStep +from flumotion.configure import configure -__version__ = "$Rev: 7267 $" +__version__ = "$Rev$" _ = gettext.gettext @@ -59,10 +56,19 @@ self.pattern.data_type = int self.framerate.data_type = float - self.pattern.prefill([ - (_('SMPTE Color bars'), 0), - (_('Random (television snow)'), 1), - (_('Totally black'), 2)]) + patterns = [('SMPTE Color bars', 0, 'pattern_smpte.png'), + ('Random (television snow)', 1, 'pattern_snow.png'), + ('100% Black', 2, 'pattern_black.png'), + ('Blink', 12, 'pattern_blink.png')] + self.pattern_icons = dict() + + for description, number, image in patterns: + self.pattern.append_item(_(description), number) + if image: + self.pattern_icons[number] = os.path.join(configure.imagedir, + 'wizard', image) + + self.pattern.connect('changed', self._change_image) self.add_proxy(self.model.properties, ['pattern', 'width', 'height', @@ -77,6 +83,10 @@ self.model.worker = worker self.wizard.requireElements(worker, 'videotestsrc', 'level') + def _change_image(self, combo): + self.pattern_image.set_from_file( + self.pattern_icons.get(combo.get_selected_data(), None)) + class VideoTestWizardPlugin(object): implements(IProducerPlugin) diff -Nru flumotion-0.6.1/flumotion/component/producers/webcam/admin_gtk.py flumotion-0.9.1/flumotion/component/producers/webcam/admin_gtk.py --- flumotion-0.6.1/flumotion/component/producers/webcam/admin_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/webcam/admin_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,29 +1,25 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.component.base.admin_gtk import BaseAdminGtk from flumotion.component.effects.colorbalance.admin_gtk import \ ColorbalanceAdminGtkNode -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class WebcamAdminGtk(BaseAdminGtk): diff -Nru flumotion-0.6.1/flumotion/component/producers/webcam/__init__.py flumotion-0.9.1/flumotion/component/producers/webcam/__init__.py --- flumotion-0.6.1/flumotion/component/producers/webcam/__init__.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/webcam/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/component/producers/webcam/Makefile.in flumotion-0.9.1/flumotion/component/producers/webcam/Makefile.in --- flumotion-0.6.1/flumotion/component/producers/webcam/Makefile.in 2009-09-09 11:37:56.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/webcam/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/component/producers/webcam/webcam.py flumotion-0.9.1/flumotion/component/producers/webcam/webcam.py --- flumotion-0.6.1/flumotion/component/producers/webcam/webcam.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/webcam/webcam.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -27,7 +23,7 @@ from flumotion.component.effects.colorbalance import colorbalance -__version__ = "$Rev: 6125 $" +__version__ = "$Rev$" class Webcam(feedcomponent.ParseLaunchComponent): @@ -35,18 +31,18 @@ def get_pipeline_string(self, properties): device = properties['device'] - # v4l or v4l2? - factory_name = properties.get('element-factory', 'v4lsrc') + # v4l was removed from the kernel, so v4l2 is default one + factory_name = properties.get('element-factory', 'v4l2src') # Filtered caps mime = properties.get('mime', 'video/x-raw-yuv') - format = properties.get('format', 'I420') + colorspace = properties.get('format', 'I420') width = properties.get('width', None) height = properties.get('height', None) string = mime if mime == 'video/x-raw-yuv': - string += ",format=(fourcc)%s" % format + string += ",format=(fourcc)%s" % colorspace if width: string += ",width=%d" % width if height: diff -Nru flumotion-0.6.1/flumotion/component/producers/webcam/wizard.glade flumotion-0.9.1/flumotion/component/producers/webcam/wizard.glade --- flumotion-0.6.1/flumotion/component/producers/webcam/wizard.glade 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/webcam/wizard.glade 2011-09-11 08:09:04.000000000 +0000 @@ -1,224 +1,97 @@ - - - + + + - - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - 4 - 2 - False - 6 - 12 - - - - True - _Device: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - False - True - - - - 1 - 2 - 0 - 1 - fill - fill - - - - - - True - F_rame Rate: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - fill - - - - - - - True - _Size: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - Name: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - False - True - - - - 1 - 2 - 2 - 3 - fill - fill - - - - - - True - False - True - - - - 1 - 2 - 3 - 4 - fill - fill - - - - - - + + window1 + + + True + 3 + 2 + 12 + 6 + + + True + + + + 1 + 2 + 2 + 3 + GTK_FILL + GTK_FILL + + + + + True + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 0 + F_rame Rate: + True + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + _Size: + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + _Device: + True + + + GTK_FILL + + + + + + diff -Nru flumotion-0.6.1/flumotion/component/producers/webcam/wizard_gtk.py flumotion-0.9.1/flumotion/component/producers/webcam/wizard_gtk.py --- flumotion-0.6.1/flumotion/component/producers/webcam/wizard_gtk.py 2009-09-09 11:37:25.000000000 +0000 +++ flumotion-0.9.1/flumotion/component/producers/webcam/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,44 +1,35 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext import os +from twisted.python import util from zope.interface import implements from flumotion.admin.assistant.interfaces import IProducerPlugin from flumotion.admin.assistant.models import VideoProducer from flumotion.common import errors -from flumotion.common.fraction import fractionAsFloat +from flumotion.common.fraction import fractionAsString from flumotion.common.i18n import N_, gettexter from flumotion.common.messages import Info -# FIXME: make pychecker able to suppress shadowed builtins like these -# at the defining site, not caller site -# P2.4 -__pychecker__ = 'no-shadowbuiltin' -from flumotion.common.python import sorted -__pychecker__ = '' from flumotion.admin.gtk.basesteps import VideoProducerStep -__version__ = "$Rev: 7785 $" +__version__ = "$Rev$" _ = gettext.gettext T_ = gettexter() @@ -49,7 +40,19 @@ def __init__(self): super(WebcamProducer, self).__init__() - self.properties.device = '/dev/video0' + def getProperties(self): + p = super(WebcamProducer, self).getProperties() + + if 'mime' not in p: + p.mime = self.framerate['mime'] + if 'format' not in p: + p.format = self.framerate.get('format', None) + if 'framerate' not in p: + p.framerate = fractionAsString(self.framerate['framerate']) + + self.properties = p + + return p class WebcamStep(VideoProducerStep): @@ -64,30 +67,23 @@ def __init__(self, wizard, model): VideoProducerStep.__init__(self, wizard, model) - self._inSetup = False # _sizes is probed, not set from the UI self._sizes = None # WizardStep def setup(self): - self._inSetup = True self.device.data_type = str self.framerate.data_type = object - - self.device.prefill(['/dev/video0', - '/dev/video1', - '/dev/video2', - '/dev/video3']) + self.size.data_type = object self.add_proxy(self.model.properties, ['device']) - - self._inSetup = False + self.add_proxy(self.model, ['size', 'framerate']) def workerChanged(self, worker): self.model.worker = worker self._clear() - self._runChecks() + self._populateDevices() # Private @@ -97,12 +93,32 @@ # - after probing a device, if none found self.size.set_sensitive(False) self.framerate.set_sensitive(False) - self.label_name.set_label("") - def _runChecks(self): - if self._inSetup: - return None + def _populateDevices(self): + msg = Info(T_(N_('Checking for Webcam devices...')), + mid='webcam-check') + self.wizard.add_msg(msg) + d = self.runInWorker('flumotion.worker.checks.device', + 'fetchDevices', 'webcam-check', + ['v4l2src', 'v4lsrc'], 'device') + + def webcamCheckDone(devices): + self.wizard.clear_msg('webcam-check') + self.device.prefill(devices) + + def trapRemoteFailure(failure): + failure.trap(errors.RemoteRunFailure) + + def trapRemoteError(failure): + failure.trap(errors.RemoteRunError) + d.addCallback(webcamCheckDone) + d.addErrback(trapRemoteError) + d.addErrback(trapRemoteFailure) + + return d + + def _runChecks(self): self.wizard.waitForTask('webcam checks') device = self.device.get_selected() @@ -127,16 +143,15 @@ def deviceFound(result): if not result: - self.debug('no device %s' % device) + self.debug('Could not detect the device\'s configuration.') self._clear() self.wizard.taskFinished(blockNext=True) return None - deviceName, factoryName, sizes = result + factoryName, sizes = result self.model.properties.element_factory = factoryName self._populateSizes(sizes) self.wizard.clear_msg('webcam-check') - self.label_name.set_label(deviceName) self.wizard.taskFinished() self.size.set_sensitive(True) self.framerate.set_sensitive(True) @@ -155,45 +170,15 @@ for w, h in sorted(sizes.keys(), reverse=True): values.append(['%d x %d' % (w, h), (w, h)]) self.size.prefill(values) + if len(values) > 1: + self.size.set_active(1) def _populateFramerates(self, size): - values = [] + values = util.OrderedDict() for d in self._sizes[size]: num, denom = d['framerate'] - values.append(('%.2f fps' % (1.0*num/denom), d)) - self.framerate.prefill(values) - - def _updateSize(self): - size = self.size.get_selected() - if size: - self._populateFramerates(size) - width, height = size - else: - self.warning('something bad happened: no height/width selected?') - width, height = 320, 240 - - self.model.properties.width = width - self.model.properties.height = height - - def _updateFramerate(self): - if self._inSetup: - return None - - framerate = self.framerate.get_selected() - if framerate: - num, denom = framerate['framerate'] - mime = framerate['mime'] - format = framerate.get('format', None) - else: - self.warning('something bad happened: no framerate selected?') - num, denom = 15, 2 - mime = 'video/x-raw-yuv' - format = None - - self.model.properties.mime = mime - self.model.properties.framerate = fractionAsFloat((num, denom)) - if format: - self.model.properties.format = format + values['%.2f fps' % (1.0*num/denom)] = d + self.framerate.prefill(values.items()) # Callbacks @@ -201,10 +186,10 @@ self._runChecks() def on_size_changed(self, combo): - self._updateSize() - - def on_framerate_changed(self, combo): - self._updateFramerate() + size = self.size.get_selected() + if size: + self._populateFramerates(size) + self.model.properties.width, self.model.properties.height = size class WebcamWizardPlugin(object): diff -Nru flumotion-0.6.1/flumotion/configure/configure.py flumotion-0.9.1/flumotion/configure/configure.py --- flumotion-0.6.1/flumotion/configure/configure.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/configure/configure.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_configure -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. ''' @@ -98,7 +94,7 @@ import os -__version__ = "$Rev: 7372 $" +__version__ = "$Rev$" # where am I on the disk ? __thisdir = os.path.dirname(os.path.abspath(__file__)) @@ -112,6 +108,7 @@ def _versionStringToTuple(versionString): + versionString = versionString.split('-')[0] t = tuple(map(int, versionString.split('.'))) if len(t) < 4: t = t + (0, ) diff -Nru flumotion-0.6.1/flumotion/configure/__init__.py flumotion-0.9.1/flumotion/configure/__init__.py --- flumotion-0.6.1/flumotion/configure/__init__.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/configure/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_flumotion_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ configure-time information and settings """ -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/configure/installed.py flumotion-0.9.1/flumotion/configure/installed.py --- flumotion-0.6.1/flumotion/configure/installed.py 2009-09-09 11:38:13.000000000 +0000 +++ flumotion-0.9.1/flumotion/configure/installed.py 2011-09-11 08:09:39.000000000 +0000 @@ -1,24 +1,21 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_flumotion_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os from flumotion.common.log import safeprintf @@ -60,5 +57,5 @@ 'registrydir': cachedir, 'rundir': os.path.join(localstatedir, 'run', 'flumotion'), 'sbindir': sbindir, - 'version': '0.6.1', + 'version': '0.9.1', } diff -Nru flumotion-0.6.1/flumotion/configure/installed.py.in flumotion-0.9.1/flumotion/configure/installed.py.in --- flumotion-0.6.1/flumotion/configure/installed.py.in 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/configure/installed.py.in 2011-09-11 08:09:04.000000000 +0000 @@ -1,24 +1,21 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_flumotion_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os from flumotion.common.log import safeprintf diff -Nru flumotion-0.6.1/flumotion/configure/Makefile.in flumotion-0.9.1/flumotion/configure/Makefile.in --- flumotion-0.6.1/flumotion/configure/Makefile.in 2009-09-09 11:37:56.000000000 +0000 +++ flumotion-0.9.1/flumotion/configure/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,14 +45,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -103,6 +102,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -112,18 +112,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -171,6 +164,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -188,16 +182,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -205,7 +201,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -220,6 +215,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -252,7 +248,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/configure/uninstalled.py flumotion-0.9.1/flumotion/configure/uninstalled.py --- flumotion-0.6.1/flumotion/configure/uninstalled.py 2009-09-09 11:38:13.000000000 +0000 +++ flumotion-0.9.1/flumotion/configure/uninstalled.py 2011-09-11 08:09:39.000000000 +0000 @@ -1,24 +1,24 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_flumotion_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os from flumotion.common.log import safeprintf @@ -56,7 +56,7 @@ 'rundir': os.path.join(__toplevelwrite, 'run'), 'bindir': os.path.join(__toplevelwrite, 'bin'), 'sbindir': os.path.join(__toplevelwrite, 'bin'), - 'version': '0.6.1', + 'version': '0.9.1', } return ret diff -Nru flumotion-0.6.1/flumotion/configure/uninstalled.py.in flumotion-0.9.1/flumotion/configure/uninstalled.py.in --- flumotion-0.6.1/flumotion/configure/uninstalled.py.in 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/configure/uninstalled.py.in 2011-09-11 08:09:04.000000000 +0000 @@ -1,24 +1,24 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_flumotion_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os from flumotion.common.log import safeprintf diff -Nru flumotion-0.6.1/flumotion/extern/command/command.py flumotion-0.9.1/flumotion/extern/command/command.py --- flumotion-0.6.1/flumotion/extern/command/command.py 2009-09-09 11:37:36.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/command/command.py 2011-09-11 08:10:06.000000000 +0000 @@ -16,29 +16,49 @@ I format the description as usual, but add an overview of commands after it if there are any, formatted like the options. """ + _commands = None + _aliases = None def addCommand(self, name, description): if self._commands is None: self._commands = {} self._commands[name] = description - ### override parent method + def addAlias(self, alias): + if self._aliases is None: + self._aliases = [] + self._aliases.append(alias) - def format_description(self, description): + ### override parent method + def format_description(self, description, width=None): # textwrap doesn't allow for a way to preserve double newlines # to separate paragraphs, so we do it here. - blocks = description.split('\n\n') + paragraphs = description.split('\n\n') rets = [] - for block in blocks: - rets.append(optparse.IndentedHelpFormatter.format_description(self, - block)) + for paragraph in paragraphs: + # newlines starting with a space/dash are treated as a table, ie as + # is + lines = paragraph.split('\n -') + formatted = [] + for line in lines: + formatted.append( + optparse.IndentedHelpFormatter.format_description( + self, line)) + rets.append(" -".join(formatted)) + ret = "\n".join(rets) + + # add aliases + if self._aliases: + ret += "\nAliases: " + ", ".join(self._aliases) + "\n" + + # add subcommands if self._commands: commandDesc = [] - commandDesc.append("commands:") + commandDesc.append("Commands:") keys = self._commands.keys() keys.sort() length = 0 @@ -98,7 +118,7 @@ return status -class Command: +class Command(object): """ I am a class that handles a command for a program. Commands can be nested underneath a command for further processing. @@ -130,17 +150,17 @@ aliasedSubCommands = None parser = None - def __init__(self, parentCommand=None, stdout=sys.stdout, - stderr=sys.stderr): + def __init__(self, parentCommand=None, stdout=None, + stderr=None, width=None): """ Create a new command instance, with the given parent. Allows for redirecting stdout and stderr if needed. This redirection will be passed on to child commands. """ if not self.name: - self.name = str(self.__class__).split('.')[-1].lower() - self.stdout = stdout - self.stderr = stderr + self.name = self.__class__.__name__.lower() + self._stdout = stdout + self._stderr = stderr self.parentCommand = parentCommand # create subcommands if we have them @@ -148,19 +168,31 @@ self.aliasedSubCommands = {} if self.subCommandClasses: for C in self.subCommandClasses: - c = C(self, stdout=stdout, stderr=stderr) + c = C(self, stdout=stdout, stderr=stderr, width=width) self.subCommands[c.name] = c if c.aliases: for alias in c.aliases: self.aliasedSubCommands[alias] = c # create our formatter and add subcommands if we have them - formatter = CommandHelpFormatter() + formatter = CommandHelpFormatter(width=width) if self.subCommands: + if not self.description: + if self.summary: + self.description = self.summary + else: + raise AttributeError, \ + "%r needs a summary or description " \ + "for help formatting" % self + for name, command in self.subCommands.items(): formatter.addCommand(name, command.summary or command.description) + if self.aliases: + for alias in self.aliases: + formatter.addAlias(alias) + # expand %command for the bottom usage usage = self.usage or '' if not usage: @@ -214,23 +246,29 @@ def do(self, args): """ Override me to implement the functionality of the command. + + @rtype: int + @returns: an exit code, or None if no actual action was taken. """ - pass + raise NotImplementedError('Implement %s.do()' % self.__class__) + # by default, return 1 and hopefully show help + return 1 def parse(self, argv): """ Parse the given arguments and act on them. @param argv: list of arguments to parse - @type argv: list of str + @type argv: list of unicode @rtype: int @returns: an exit code, or None if no actual action was taken. """ # note: no arguments should be passed as an empty list, not a list # with an empty str as ''.split(' ') returns + self.debug('calling %r.parse_args' % self) self.options, args = self.parser.parse_args(argv) - self.debug('parse_args called') + self.debug('called %r.parse_args' % self) # if we were asked to print help or usage, we are done if self.parser.usage_printed or self.parser.help_printed: @@ -254,7 +292,7 @@ # complain if we were asked for help on a subcommand, but we don't # have any if not self.subCommands: - self.stderr.write('No subcommands defined.') + self.stderr.write('No subcommands defined.\n') self.parser.print_usage(file=self.stderr) self.stderr.write( "Use --help to get more information about this command.\n") @@ -265,8 +303,11 @@ # command args = [args[1], args[0]] - # if we don't have subcommands, defer to our do() method - if not self.subCommands: + # if we don't have args or don't have subcommands, + # defer to our do() method + # allows implementing a do() for commands that also have subcommands + if not args or not self.subCommands: + self.debug('no args or no subcommands, doing') try: ret = self.do(args) except CommandOk, e: @@ -275,6 +316,11 @@ except CommandExited, e: ret = e.status self.stderr.write(e.output + '\n') + except NotImplementedError: + self.parser.print_usage(file=self.stderr) + self.stderr.write( + "Use --help to get a list of commands.\n") + return 1 # if everything's fine, we return 0 if not ret: @@ -291,6 +337,8 @@ "Use --help to get a list of commands.\n") return 1 + # FIXME: check users and enable this + # assert type(command) is unicode if command in self.subCommands.keys(): return self.subCommands[command].parse(args[1:]) @@ -298,7 +346,7 @@ if command in self.aliasedSubCommands.keys(): return self.aliasedSubCommands[command].parse(args[1:]) - self.stderr.write("Unknown command '%s'.\n" % command) + self.stderr.write("Unknown command '%s'.\n" % command.encode('utf-8')) self.parser.print_usage(file=self.stderr) return 1 @@ -308,20 +356,26 @@ """ pass - def outputHelp(self): + def outputHelp(self, file=None): """ Output help information. """ + __pychecker__ = 'no-shadowbuiltin' self.debug('outputHelp') - self.parser.print_help(file=self.stderr) + if not file: + file = self.stderr + self.parser.print_help(file=file) - def outputUsage(self): + def outputUsage(self, file=None): """ Output usage information. Used when the options or arguments were missing or wrong. """ + __pychecker__ = 'no-shadowbuiltin' self.debug('outputUsage') - self.parser.print_usage(file=self.stderr) + if not file: + file = self.stderr + self.parser.print_usage(file=file) def getRootCommand(self): """ @@ -338,6 +392,31 @@ """ pass + def getFullName(self): + names = [] + c = self + while c: + names.append(c.name) + c = c.parentCommand + names.reverse() + return " ".join(names) + + def _getStdout(self): + # if set explicitly, use it + if self._stdout: + return self._stdout + + # if I am the root command, default + if not self.parentCommand: + return sys.stdout + + # otherwise delegate to my parent + return self.parentCommand.stdout + + stdout = property(_getStdout) + # FIXME: do we want a separate one ? + stderr = property(_getStdout) + class CommandExited(Exception): @@ -357,3 +436,100 @@ def __init__(self, output): CommandExited.__init__(self, 3, output) + + +def commandToCmdClass(command): + """ + @type command: L{Command} + + Take a Command instance and create a L{cmd.Cmd} class from it that + implements a command line interpreter, using the commands under the given + Command instance as its subcommands. + + Example use in a command: + + >>> def do(self, args): + ... cmd = command.commandToCmdClass(self)() + ... cmd.prompt = 'prompt> ' + ... while not cmd.exited: + ... cmd.cmdloop() + + @rtype: L{cmd.Cmd} + """ + import cmd + + # internal class to subclass cmd.Cmd with a Ctrl-D handler + + class _CommandWrappingCmd(cmd.Cmd): + prompt = '(command) ' + exited = False + command = None # the original Command subclass + + def __repr__(self): + return "<_CommandWrappingCmd for Command %r>" % self.command + + def do_EOF(self, args): + self.stdout.write('\n') + self.exited = True + sys.exit(0) + + def do_exit(self, args): + self.exited = True + sys.exit(0) + + def help_EOF(self): + print 'Exit.' + + def help_exit(self): + print 'Exit.' + + # populate the Cmd interpreter from our command class + cmdClass = _CommandWrappingCmd + cmdClass.command = command + + for name, subCommand in command.subCommands.items() \ + + command.aliasedSubCommands.items(): + if name == 'shell': + continue + command.debug('Adding shell command %s for %r' % (name, subCommand)) + + # add do command + methodName = 'do_' + name + + def generateDo(c): + + def do_(s, line): + # line is coming from a terminal; usually it is a utf-8 encoded + # string. + # Instead of making every Command subclass implement do with + # unicode decoding, we do it here. + line = line.decode('utf-8') + # the do_ method is passed a single argument consisting of + # the remainder of the line + args = line.split(' ') + command.debug('Asking %r to parse %r' % (c, args)) + return c.parse(args) + return do_ + + method = generateDo(subCommand) + setattr(cmdClass, methodName, method) + + + # add help command + methodName = 'help_' + name + + def generateHelp(c): + + def help_(s): + command.parser.print_help(file=s.stdout) + return help_ + + method = generateHelp(subCommand) + setattr(cmdClass, methodName, method) + + return cmdClass + + +def commandToCmd(command): + # for compatibility reasons + return commandToCmdClass(command)() diff -Nru flumotion-0.6.1/flumotion/extern/exceptiondialog.py flumotion-0.9.1/flumotion/extern/exceptiondialog.py --- flumotion-0.6.1/flumotion/extern/exceptiondialog.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/exceptiondialog.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,9 +1,10 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# -# Copyright (C) 2005,2006,2007 by Async Open Source and Sicem S.L. -# 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2005,2006,2007 by Async Open Source and Sicem S.L. +# Copyright (C) 2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2 diff -Nru flumotion-0.6.1/flumotion/extern/fdpass/fdpass.c flumotion-0.9.1/flumotion/extern/fdpass/fdpass.c --- flumotion-0.6.1/flumotion/extern/fdpass/fdpass.c 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/fdpass/fdpass.c 2011-09-11 08:09:04.000000000 +0000 @@ -1,19 +1,15 @@ /* * Flumotion - a streaming media server - * Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). + * Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. + * Copyright (C) 2010,2011 Flumotion Services, S.A. * All rights reserved. * * This file may be distributed and/or modified under the terms of - * the GNU General Public License version 2 as published by + * the GNU Lesser General Public License version 2.1 as published by * the Free Software Foundation. * This file is distributed without any warranty; without even the implied * warranty of merchantability or fitness for a particular purpose. - * See "LICENSE.GPL" in the source distribution for more information. - * - * Licensees having purchased or holding a valid Flumotion Advanced - * Streaming Server license may use this file in accordance with the - * Flumotion Advanced Streaming Server Commercial License Agreement. - * See "LICENSE.Flumotion" in the source distribution for more information. + * See "LICENSE.LGPL" in the source distribution for more information. * * Headers in this file shall remain intact. */ diff -Nru flumotion-0.6.1/flumotion/extern/fdpass/__init__.py flumotion-0.9.1/flumotion/extern/fdpass/__init__.py --- flumotion-0.6.1/flumotion/extern/fdpass/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/fdpass/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,25 +1,21 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 7363 $" +__version__ = "$Rev$" import os diff -Nru flumotion-0.6.1/flumotion/extern/fdpass/Makefile.in flumotion-0.9.1/flumotion/extern/fdpass/Makefile.in --- flumotion-0.6.1/flumotion/extern/fdpass/Makefile.in 2009-09-09 11:37:56.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/fdpass/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -121,6 +120,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -130,18 +130,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -189,6 +182,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -206,16 +200,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -223,7 +219,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -238,6 +233,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -270,7 +266,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/extern/__init__.py flumotion-0.9.1/flumotion/extern/__init__.py --- flumotion-0.6.1/flumotion/extern/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/extern/log/log.py flumotion-0.9.1/flumotion/extern/log/log.py --- flumotion-0.6.1/flumotion/extern/log/log.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/log/log.py 2011-09-11 08:09:04.000000000 +0000 @@ -11,7 +11,8 @@ This module provides a Loggable class for objects, as well as various convenience methods for logging in general, and for logging with Twisted -and failures in particular. +and failures in particular. It is written such a way that it can be reused in +different projects to provide a controllable logging mechanism. Maintainer: U{Thomas Vander Stichele } """ @@ -22,6 +23,7 @@ import fnmatch import time import types +import logging import traceback # environment variables controlling levels for each category @@ -206,7 +208,7 @@ return filename -def getFileLine(where=-1): +def getFileLine(where=-1, targetModule=None): """ Return the filename and line number for the given location. @@ -217,6 +219,9 @@ @param where: how many frames to go back up, or function @type where: int (negative) or function + @param targetModule: continue going up the stack until that module is seen + @type targetModule: str or None + @return: tuple of (file, line) @rtype: tuple of (str, int) """ @@ -246,6 +251,14 @@ if not co: return "", 0 + if targetModule: + while stackFrame: + co = stackFrame.f_code + lineno = stackFrame.f_lineno + if targetModule in co.co_filename: + break + stackFrame = stackFrame.f_back + return scrubFilename(co.co_filename), lineno @@ -421,7 +434,14 @@ safeprintf(sys.stderr, '%s [%5d] %-32s %-17s %-15s ', getFormattedLevelName(level), os.getpid(), o, category, time.strftime("%b %d %H:%M:%S")) - safeprintf(sys.stderr, '%-4s %s %s\n', "", message, where) + + try: + safeprintf(sys.stderr, '%-4s %s %s\n', "", message, where) + except UnicodeEncodeError: + # this can happen if message is a unicode object, convert it back into + # a string using the UTF-8 encoding + message = message.encode('UTF-8') + safeprintf(sys.stderr, '%-4s %s %s\n', "", message, where) sys.stderr.flush() @@ -629,8 +649,13 @@ stack = traceback.extract_tb(sys.exc_info()[2]) if filename: stack = [f for f in stack if f[0].find(filename) > -1] - #import code; code.interact(local=locals()) - (filename, line, func, text) = stack[frame] + + # badly raised exceptions can come without a stack + if stack: + (filename, line, func, text) = stack[frame] + else: + (filename, line, func, text) = ('no stack', 0, 'none', '') + filename = scrubFilename(filename) exc = exception.__class__.__name__ msg = "" @@ -965,3 +990,67 @@ def clearIgnores(self): self._ignoreErrors = [] + + +def logLevelToStdLevel(level): + t = {ERROR: logging.CRITICAL, + WARN: logging.ERROR, + INFO: logging.WARNING, + DEBUG: logging.INFO, + LOG: logging.DEBUG} + return t.get(level, logging.NOTSET) + + +def stdLevelToLogLevel(level): + t = {logging.CRITICAL: ERROR, + logging.ERROR: WARN, + logging.WARNING: INFO, + logging.INFO: DEBUG, + logging.DEBUG: LOG} + return t.get(level, None) + + +def adaptStandardLogging(loggerName, logCategory, targetModule): + """ + Make a logger from the standard library log through the Flumotion logging + system. + + @param loggerName: The standard logger to adapt, e.g. 'library.module' + @type loggerName: str + @param logCategory: The Flumotion log category to use when reporting output + from the standard logger, e.g. 'librarymodule' + @type logCategory: str + @param targetModule: The name of the module that the logging should look + like it's coming from. Use this if you don't want to + see the file names and line numbers of the library + who's logger you are adapting. + @type targetModule: str or None + """ + logger = logging.getLogger(loggerName) + # if there is already a FluHandler, exit + if map(lambda h: isinstance(h, LogHandler), logger.handlers): + return + logger.setLevel(logLevelToStdLevel(getCategoryLevel(logCategory))) + logger.addHandler(LogHandler(logCategory, targetModule)) + + +class LogHandler(logging.Handler): + """ + A standard library logging handler that logs through the log system of this + module. + """ + + def __init__(self, logCategory, targetModule): + logging.Handler.__init__(self) + self.logCategory = logCategory + self.targetModule = targetModule + + def emit(self, record): + level = stdLevelToLogLevel(record.levelno) + if _canShortcutLogging(self.logCategory, level): + return + + filename, lineno = getFileLine(-1, self.targetModule) + doLog(level, None, self.logCategory, + self.format(record), None, 0, + scrubFilename(filename), lineno) diff -Nru flumotion-0.6.1/flumotion/extern/log/test_log.py flumotion-0.9.1/flumotion/extern/log/test_log.py --- flumotion-0.6.1/flumotion/extern/log/test_log.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/log/test_log.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,29 +1,28 @@ # -*- Mode: Python; test-case-name: test_log -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. -# Headers in this file shall remain intact. +import logging from twisted.trial import unittest import log -__version__ = "$Rev: 7971 $" +__version__ = "$Rev$" class LogTester(log.Loggable): @@ -69,13 +68,13 @@ # test a function object (filename, line) = log.getFileLine(where=self.testGetFileLine) self.failUnless(filename.endswith('test_log.py')) - self.assertEquals(line, 68) + self.assertEquals(line, 67) # test a lambda f = lambda x: x + 1 (filename, line) = log.getFileLine(where=f) self.failUnless(filename.endswith('test_log.py')) - self.assertEquals(line, 75) + self.assertEquals(line, 74) # test an eval f = eval("lambda x: x + 1") @@ -177,12 +176,56 @@ def testAddLogHandlerRaises(self): self.assertRaises(TypeError, log.addLogHandler, 1) + def testAdaptStandardLogging(self): + # create a standard logger + logger = logging.getLogger('standard.logger') + + # set the debug level for the "test" category + log.setDebug("test:3") + log.addLimitedLogHandler(self.handler) + + logger.warning('invisible') + # should not get anything, because the std module has not been adapted + assert not self.category + assert not self.level + assert not self.message + + log.adaptStandardLogging('standard.logger', 'test', 'test_log') + self.assertEquals(len(logger.handlers), 1) + + # trying to adapt it again should be a noop + log.adaptStandardLogging('standard.logger', 'test', 'test_log') + self.assertEquals(len(logger.handlers), 1) + + logger.info('invisible') + # should not get anything, because INFO translates to Flu debug 4 + assert not self.category + assert not self.level + assert not self.message + + logger.warning('visible') + # WARNING translates to INFO, see log.stdLevelToFluLevel + assert self.category == 'test', self.category + assert self.level == log.INFO + assert self.message == 'visible' + + self.message = self.level = self.category = None + + # lower the debug level + log.setDebug("test:2") + logger.warning('visible') + # should not get anything now + assert not self.category + assert not self.level + assert not self.message + class TestOwnLogHandler(unittest.TestCase): def setUp(self): self.category = self.level = self.message = None self.tester = LogFunctionTester() + log.reset() def handler(self, level, object, category, file, line, message): self.level = level @@ -207,6 +250,9 @@ class TestGetExceptionMessage(unittest.TestCase): + def setUp(self): + log.reset() + def func3(self): self.func2() @@ -319,5 +365,39 @@ self.assertEquals('DEBUG', log.getLevelName(4)) self.assertEquals('LOG', log.getLevelName(5)) + +class TestLogUnicode(unittest.TestCase): + + def setUp(self): + self.tester = LogTester() + # add stderrHandler to fully test unicode handling + log.addLogHandler(log.stderrHandler) + + def testUnicode(self): + # Test with a unicode input + self.tester.log(u'\xf3') + + def testUnicodeWithArgs(self): + self.tester.log('abc: %s', u'\xf3') + + def testNonASCIIByteString(self): + # Test with a non-ASCII bytestring + self.tester.log('\xc3\xa4') + + def testNonASCIIByteStringWithArgs(self): + self.tester.log('abc: %s', '\xc3\xa4') + + def testNonASCIIByteStringPlusUnicode(self): + # This should fail since were trying to combine + # a non-ascii string with a unicode string + self.assertRaises(UnicodeDecodeError, + self.tester.log, + 'abc\xf3n%s:', + u'a') + + def testASCIIFormatUnicodeArgs(self): + self.tester.log('abc: %s', u'\xc3\xa4') + + if __name__ == '__main__': unittest.main() diff -Nru flumotion-0.6.1/flumotion/extern/Makefile.am flumotion-0.9.1/flumotion/extern/Makefile.am --- flumotion-0.6.1/flumotion/extern/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -1,11 +1,19 @@ include $(top_srcdir)/common/python.mk +all-local: command + +command: + svn co http://thomas.apestaart.org/moap/svn/trunk/moap/extern/command + svn info command > command.revision + +command/__init__.py: command + flumotiondir = $(libdir)/flumotion/python/flumotion/extern -flumotion_PYTHON = \ - __init__.py \ - code.py \ - exceptiondialog.py +flumotion_PYTHON = \ + __init__.py \ + code.py \ + exceptiondialog.py \ unixcrypt.py logdir = $(libdir)/flumotion/python/flumotion/extern/log @@ -23,12 +31,6 @@ EXTRA_DIST = log/test_log.py -if BUILD_TRAYICON -PTI_DIR = pytrayicon -else -PTI_DIR = -endif - check-local: PYTHONPATH=$(srcdir):$$PYTHONPATH trial log.test_log @@ -38,4 +40,4 @@ SUBDIRS = fdpass \ $(PTI_DIR) -DIST_SUBDIRS = pytrayicon fdpass +DIST_SUBDIRS = fdpass diff -Nru flumotion-0.6.1/flumotion/extern/Makefile.in flumotion-0.9.1/flumotion/extern/Makefile.in --- flumotion-0.6.1/flumotion/extern/Makefile.in 2009-09-09 11:37:56.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -142,6 +141,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -151,18 +151,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -210,6 +203,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -227,16 +221,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -244,7 +240,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -259,6 +254,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -291,7 +287,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -313,9 +308,10 @@ top_srcdir = @top_srcdir@ flumotiondir = $(libdir)/flumotion/python/flumotion/extern flumotion_PYTHON = \ - __init__.py \ - code.py \ - exceptiondialog.py + __init__.py \ + code.py \ + exceptiondialog.py \ + unixcrypt.py logdir = $(libdir)/flumotion/python/flumotion/extern/log log_PYTHON = \ @@ -329,12 +325,10 @@ command/command.py EXTRA_DIST = log/test_log.py -@BUILD_TRAYICON_FALSE@PTI_DIR = -@BUILD_TRAYICON_TRUE@PTI_DIR = pytrayicon SUBDIRS = fdpass \ $(PTI_DIR) -DIST_SUBDIRS = pytrayicon fdpass +DIST_SUBDIRS = fdpass all: all-recursive .SUFFIXES: @@ -496,7 +490,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -521,7 +515,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -685,7 +679,7 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive -all-am: Makefile +all-am: Makefile all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(commanddir)" "$(DESTDIR)$(flumotiondir)" "$(DESTDIR)$(logdir)"; do \ @@ -788,12 +782,12 @@ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am check-local clean clean-generic \ - clean-libtool clean-local ctags ctags-recursive distclean \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-commandPYTHON install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am \ + all all-am all-local check check-am check-local clean \ + clean-generic clean-libtool clean-local ctags ctags-recursive \ + distclean distclean-generic distclean-libtool distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-commandPYTHON install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ install-flumotionPYTHON install-html install-html-am \ install-info install-info-am install-logPYTHON install-man \ install-pdf install-pdf-am install-ps install-ps-am \ @@ -814,7 +808,14 @@ # $(PYCHECKER_FILES); \ # fi #endif - unixcrypt.py + +all-local: command + +command: + svn co http://thomas.apestaart.org/moap/svn/trunk/moap/extern/command + svn info command > command.revision + +command/__init__.py: command check-local: PYTHONPATH=$(srcdir):$$PYTHONPATH trial log.test_log diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/config.h flumotion-0.9.1/flumotion/extern/pytrayicon/config.h --- flumotion-0.6.1/flumotion/extern/pytrayicon/config.h 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/config.h 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#define GETTEXT_PACKAGE "flumotion" diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/eggtrayicon.c flumotion-0.9.1/flumotion/extern/pytrayicon/eggtrayicon.c --- flumotion-0.6.1/flumotion/extern/pytrayicon/eggtrayicon.c 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/eggtrayicon.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,477 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* eggtrayicon.c - * Copyright (C) 2002 Anders Carlsson - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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. - */ - -#include -#include -#include - -#include "eggtrayicon.h" - -#include -#include - -#ifndef EGG_COMPILATION -#ifndef _ -#define _(x) dgettext (GETTEXT_PACKAGE, x) -#define N_(x) x -#endif -#else -#define _(x) x -#define N_(x) x -#endif - -#define SYSTEM_TRAY_REQUEST_DOCK 0 -#define SYSTEM_TRAY_BEGIN_MESSAGE 1 -#define SYSTEM_TRAY_CANCEL_MESSAGE 2 - -#define SYSTEM_TRAY_ORIENTATION_HORZ 0 -#define SYSTEM_TRAY_ORIENTATION_VERT 1 - -enum { - PROP_0, - PROP_ORIENTATION -}; - -static GtkPlugClass *parent_class = NULL; - -static void egg_tray_icon_init (EggTrayIcon *icon); -static void egg_tray_icon_class_init (EggTrayIconClass *klass); - -static void egg_tray_icon_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); - -static void egg_tray_icon_realize (GtkWidget *widget); -static void egg_tray_icon_unrealize (GtkWidget *widget); - -static void egg_tray_icon_update_manager_window (EggTrayIcon *icon); - -GType -egg_tray_icon_get_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - { - static const GTypeInfo our_info = - { - sizeof (EggTrayIconClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) egg_tray_icon_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (EggTrayIcon), - 0, /* n_preallocs */ - (GInstanceInitFunc) egg_tray_icon_init - }; - - our_type = g_type_register_static (GTK_TYPE_PLUG, "EggTrayIcon", &our_info, 0); - } - - return our_type; -} - -static void -egg_tray_icon_init (EggTrayIcon *icon) -{ - icon->stamp = 1; - icon->orientation = GTK_ORIENTATION_HORIZONTAL; - icon->tooltips = gtk_tooltips_new (); - - gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK); -} - -static void -egg_tray_icon_class_init (EggTrayIconClass *klass) -{ - GObjectClass *gobject_class = (GObjectClass *)klass; - GtkWidgetClass *widget_class = (GtkWidgetClass *)klass; - - parent_class = g_type_class_peek_parent (klass); - - gobject_class->get_property = egg_tray_icon_get_property; - - widget_class->realize = egg_tray_icon_realize; - widget_class->unrealize = egg_tray_icon_unrealize; - - g_object_class_install_property (gobject_class, - PROP_ORIENTATION, - g_param_spec_enum ("orientation", - _("Orientation"), - _("The orientation of the tray."), - GTK_TYPE_ORIENTATION, - GTK_ORIENTATION_HORIZONTAL, - G_PARAM_READABLE)); -} - -static void -egg_tray_icon_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - EggTrayIcon *icon = EGG_TRAY_ICON (object); - - switch (prop_id) - { - case PROP_ORIENTATION: - g_value_set_enum (value, icon->orientation); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -egg_tray_icon_get_orientation_property (EggTrayIcon *icon) -{ - Display *xdisplay; - Atom type; - int format; - union { - gulong *prop; - guchar *prop_ch; - } prop = { NULL }; - gulong nitems; - gulong bytes_after; - int error, result; - - g_assert (icon->manager_window != None); - - xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon))); - - gdk_error_trap_push (); - type = None; - result = XGetWindowProperty (xdisplay, - icon->manager_window, - icon->orientation_atom, - 0, G_MAXLONG, FALSE, - XA_CARDINAL, - &type, &format, &nitems, - &bytes_after, &(prop.prop_ch)); - error = gdk_error_trap_pop (); - - if (error || result != Success) - return; - - if (type == XA_CARDINAL) - { - GtkOrientation orientation; - - orientation = (prop.prop [0] == SYSTEM_TRAY_ORIENTATION_HORZ) ? - GTK_ORIENTATION_HORIZONTAL : - GTK_ORIENTATION_VERTICAL; - - if (icon->orientation != orientation) - { - icon->orientation = orientation; - - g_object_notify (G_OBJECT (icon), "orientation"); - } - } - - if (prop.prop) - XFree (prop.prop); -} - -static GdkFilterReturn -egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_data) -{ - EggTrayIcon *icon = user_data; - XEvent *xev = (XEvent *)xevent; - - if (xev->xany.type == ClientMessage && - xev->xclient.message_type == icon->manager_atom && - xev->xclient.data.l[1] == icon->selection_atom) - { - egg_tray_icon_update_manager_window (icon); - } - else if (xev->xany.window == icon->manager_window) - { - if (xev->xany.type == PropertyNotify && - xev->xproperty.atom == icon->orientation_atom) - { - egg_tray_icon_get_orientation_property (icon); - } - if (xev->xany.type == DestroyNotify) - { - egg_tray_icon_update_manager_window (icon); - } - } - - return GDK_FILTER_CONTINUE; -} - -static void -egg_tray_icon_unrealize (GtkWidget *widget) -{ - EggTrayIcon *icon = EGG_TRAY_ICON (widget); - GdkWindow *root_window; - - if (icon->manager_window != None) - { - GdkWindow *gdkwin; - - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget), - icon->manager_window); - - gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon); - } - - root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget)); - - gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon); - - if (GTK_WIDGET_CLASS (parent_class)->unrealize) - (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget); -} - -static void -egg_tray_icon_send_manager_message (EggTrayIcon *icon, - long message, - Window window, - long data1, - long data2, - long data3) -{ - XClientMessageEvent ev; - Display *display; - - ev.type = ClientMessage; - ev.window = window; - ev.message_type = icon->system_tray_opcode_atom; - ev.format = 32; - ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window); - ev.data.l[1] = message; - ev.data.l[2] = data1; - ev.data.l[3] = data2; - ev.data.l[4] = data3; - - display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon))); - - gdk_error_trap_push (); - XSendEvent (display, - icon->manager_window, False, NoEventMask, (XEvent *)&ev); - XSync (display, False); - gdk_error_trap_pop (); -} - -static void -egg_tray_icon_send_dock_request (EggTrayIcon *icon) -{ - egg_tray_icon_send_manager_message (icon, - SYSTEM_TRAY_REQUEST_DOCK, - icon->manager_window, - gtk_plug_get_id (GTK_PLUG (icon)), - 0, 0); -} - -static void -egg_tray_icon_update_manager_window (EggTrayIcon *icon) -{ - Display *xdisplay; - - xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon))); - - if (icon->manager_window != None) - { - GdkWindow *gdkwin; - - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)), - icon->manager_window); - - gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon); - } - - XGrabServer (xdisplay); - - icon->manager_window = XGetSelectionOwner (xdisplay, - icon->selection_atom); - - if (icon->manager_window != None) - XSelectInput (xdisplay, - icon->manager_window, StructureNotifyMask|PropertyChangeMask); - - XUngrabServer (xdisplay); - XFlush (xdisplay); - - if (icon->manager_window != None) - { - GdkWindow *gdkwin; - - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)), - icon->manager_window); - - gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon); - - /* Send a request that we'd like to dock */ - egg_tray_icon_send_dock_request (icon); - - egg_tray_icon_get_orientation_property (icon); - } -} - -static void -egg_tray_icon_realize (GtkWidget *widget) -{ - EggTrayIcon *icon = EGG_TRAY_ICON (widget); - GdkScreen *screen; - GdkDisplay *display; - Display *xdisplay; - char buffer[256]; - GdkWindow *root_window; - - if (GTK_WIDGET_CLASS (parent_class)->realize) - GTK_WIDGET_CLASS (parent_class)->realize (widget); - - screen = gtk_widget_get_screen (widget); - display = gdk_screen_get_display (screen); - xdisplay = gdk_x11_display_get_xdisplay (display); - - /* Now see if there's a manager window around */ - g_snprintf (buffer, sizeof (buffer), - "_NET_SYSTEM_TRAY_S%d", - gdk_screen_get_number (screen)); - - icon->selection_atom = XInternAtom (xdisplay, buffer, False); - - icon->manager_atom = XInternAtom (xdisplay, "MANAGER", False); - - icon->system_tray_opcode_atom = XInternAtom (xdisplay, - "_NET_SYSTEM_TRAY_OPCODE", - False); - - icon->orientation_atom = XInternAtom (xdisplay, - "_NET_SYSTEM_TRAY_ORIENTATION", - False); - - egg_tray_icon_update_manager_window (icon); - - root_window = gdk_screen_get_root_window (screen); - - /* Add a root window filter so that we get changes on MANAGER */ - gdk_window_add_filter (root_window, - egg_tray_icon_manager_filter, icon); -} - -EggTrayIcon * -egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name) -{ - g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL); - - return g_object_new (EGG_TYPE_TRAY_ICON, "screen", screen, "title", name, NULL); -} - -EggTrayIcon* -egg_tray_icon_new (const gchar *name) -{ - return g_object_new (EGG_TYPE_TRAY_ICON, "title", name, NULL); -} - -guint -egg_tray_icon_send_message (EggTrayIcon *icon, - gint timeout, - const gchar *message, - gint len) -{ - guint stamp; - - g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), 0); - g_return_val_if_fail (timeout >= 0, 0); - g_return_val_if_fail (message != NULL, 0); - - if (icon->manager_window == None) - return 0; - - if (len < 0) - len = strlen (message); - - stamp = icon->stamp++; - - /* Get ready to send the message */ - egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE, - (Window)gtk_plug_get_id (GTK_PLUG (icon)), - timeout, len, stamp); - - /* Now to send the actual message */ - gdk_error_trap_push (); - while (len > 0) - { - XClientMessageEvent ev; - Display *xdisplay; - - xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon))); - - ev.type = ClientMessage; - ev.window = (Window)gtk_plug_get_id (GTK_PLUG (icon)); - ev.format = 8; - ev.message_type = XInternAtom (xdisplay, - "_NET_SYSTEM_TRAY_MESSAGE_DATA", False); - if (len > 20) - { - memcpy (&ev.data, message, 20); - len -= 20; - message += 20; - } - else - { - memcpy (&ev.data, message, len); - len = 0; - } - - XSendEvent (xdisplay, - icon->manager_window, False, StructureNotifyMask, (XEvent *)&ev); - XSync (xdisplay, False); - } - gdk_error_trap_pop (); - - return stamp; -} - -void -egg_tray_icon_cancel_message (EggTrayIcon *icon, - guint id) -{ - g_return_if_fail (EGG_IS_TRAY_ICON (icon)); - g_return_if_fail (id > 0); - - egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE, - (Window)gtk_plug_get_id (GTK_PLUG (icon)), - id, 0, 0); -} - -GtkOrientation -egg_tray_icon_get_orientation (EggTrayIcon *icon) -{ - g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), GTK_ORIENTATION_HORIZONTAL); - - return icon->orientation; -} - -void -egg_tray_icon_set_tooltip (EggTrayIcon *icon, const gchar *tooltip) -{ - g_return_if_fail (EGG_IS_TRAY_ICON (icon)); - gtk_tooltips_set_tip (icon->tooltips, GTK_WIDGET (icon), tooltip, - NULL); -} diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/eggtrayicon.h flumotion-0.9.1/flumotion/extern/pytrayicon/eggtrayicon.h --- flumotion-0.6.1/flumotion/extern/pytrayicon/eggtrayicon.h 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/eggtrayicon.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* eggtrayicon.h - * Copyright (C) 2002 Anders Carlsson - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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. - */ - -#ifndef __EGG_TRAY_ICON_H__ -#define __EGG_TRAY_ICON_H__ - -#include -#include -#include - -G_BEGIN_DECLS - -#define EGG_TYPE_TRAY_ICON (egg_tray_icon_get_type ()) -#define EGG_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon)) -#define EGG_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass)) -#define EGG_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON)) -#define EGG_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON)) -#define EGG_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass)) - -typedef struct _EggTrayIcon EggTrayIcon; -typedef struct _EggTrayIconClass EggTrayIconClass; - -struct _EggTrayIcon -{ - GtkPlug parent_instance; - - guint stamp; - - Atom selection_atom; - Atom manager_atom; - Atom system_tray_opcode_atom; - Atom orientation_atom; - Window manager_window; - GtkTooltips *tooltips; - - GtkOrientation orientation; -}; - -struct _EggTrayIconClass -{ - GtkPlugClass parent_class; -}; - -GType egg_tray_icon_get_type (void); - -EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen *screen, - const gchar *name); - -EggTrayIcon *egg_tray_icon_new (const gchar *name); - -guint egg_tray_icon_send_message (EggTrayIcon *icon, - gint timeout, - const char *message, - gint len); -void egg_tray_icon_cancel_message (EggTrayIcon *icon, - guint id); - -void egg_tray_icon_set_tooltip (EggTrayIcon *icon, - const gchar *tooltip); - -GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon); - -G_END_DECLS - -#endif /* __EGG_TRAY_ICON_H__ */ diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/__init__.py flumotion-0.9.1/flumotion/extern/pytrayicon/__init__.py --- flumotion-0.6.1/flumotion/extern/pytrayicon/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/__init__.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -try: - from flumotion.extern.pytrayicon.pytrayicon import * -except ImportError: - import ltihooks - try: - from flumotion.extern.pytrayicon.pytrayicon import * - except ImportError: - # no pytrayicon anywhere - pass - ltihooks.uninstall() - -__version__ = "$Rev: 6125 $" diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/ltihooks.py flumotion-0.9.1/flumotion/extern/pytrayicon/ltihooks.py --- flumotion-0.6.1/flumotion/extern/pytrayicon/ltihooks.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/ltihooks.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 - -# ltihooks.py: python import hooks that understand libtool libraries. -# Copyright (C) 2000 James Henstridge. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -import ihooks -import os - - -class LibtoolHooks(ihooks.Hooks): - - def get_suffixes(self): - """Like normal get_suffixes, but adds .la suffixes to list""" - ret = ihooks.Hooks.get_suffixes(self) - ret.insert(0, ('module.la', 'rb', 3)) - ret.insert(0, ('.la', 'rb', 3)) - return ret - - def load_dynamic(self, name, filename, file=None): - """Like normal load_dynamic, but treat .la files specially""" - if len(filename) > 3 and filename[-3:] == '.la': - fp = open(filename, 'r') - dlname = '' - installed = 1 - line = fp.readline() - while line: - # dlname: the name that we can dlopen - if len(line) > 7 and line[:7] == 'dlname=': - dlname = line[8:-2] - # installed: whether it's already installed - elif len(line) > 10 and line[:10] == 'installed=': - installed = line[10:-1] == 'yes' - line = fp.readline() - fp.close() - if dlname: - if installed: - filename = os.path.join(os.path.dirname(filename), - dlname) - else: - # if .libs already there, don't need to add it again - if os.path.dirname(filename).endswith('.libs'): - filename = os.path.join(os.path.dirname(filename), - dlname) - else: - filename = os.path.join(os.path.dirname(filename), - '.libs', dlname) - return ihooks.Hooks.load_dynamic(self, name, filename, file) - -importer = ihooks.ModuleImporter() -importer.set_hooks(LibtoolHooks()) - - -def install(): - importer.install() - - -def uninstall(): - importer.uninstall() - -install() diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/Makefile.am flumotion-0.9.1/flumotion/extern/pytrayicon/Makefile.am --- flumotion-0.6.1/flumotion/extern/pytrayicon/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -include $(top_srcdir)/common/python.mk - -flumotiondir = $(libdir)/flumotion/python/flumotion/extern/pytrayicon - -flumotion_PYTHON = \ - __init__.py \ - ltihooks.py - -CLEANFILES = pytrayicon.c - -noinst_HEADERS = config.h eggtrayicon.h - -flumotion_LTLIBRARIES = pytrayicon.la -pytrayicon_la_SOURCES = eggtrayicon.c pytrayiconmodule.c pytrayicon.c -pytrayicon_la_CFLAGS = $(PYGTK_CFLAGS) $(PYTHON_INCLUDES) $(GTK_CFLAGS) -pytrayicon_la_LIBADD = $(GTK_LIBS) -pytrayicon_la_LDFLAGS = -module -avoid-version - -pytrayicon.c: pytrayicon.defs pytrayicon.override - (cd $(srcdir) \ - && $(PYGTK_CODEGEN) \ - --prefix pytrayicon \ - --register $(PYGTK_DEFSDIR)/gdk-types.defs \ - --register $(PYGTK_DEFSDIR)/gtk-types.defs \ - --override pytrayicon.override \ - pytrayicon.defs > $@) - -clean-local: - rm -rf *.pyc *.pyo - -EXTRA_DIST = $(flumotion_PYTHON) pytrayicon.defs pytrayicon.override \ - eggtrayicon.c eggtrayicon.h pytrayiconmodule.c diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/Makefile.in flumotion-0.9.1/flumotion/extern/pytrayicon/Makefile.in --- flumotion-0.6.1/flumotion/extern/pytrayicon/Makefile.in 2009-09-09 11:37:57.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,710 +0,0 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(flumotion_PYTHON) $(noinst_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/common/python.mk -subdir = flumotion/extern/pytrayicon -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ - $(top_srcdir)/common/as-libtool-tags.m4 \ - $(top_srcdir)/common/as-python.m4 \ - $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(flumotiondir)" \ - "$(DESTDIR)$(flumotiondir)" -LTLIBRARIES = $(flumotion_LTLIBRARIES) -am__DEPENDENCIES_1 = -pytrayicon_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_pytrayicon_la_OBJECTS = pytrayicon_la-eggtrayicon.lo \ - pytrayicon_la-pytrayiconmodule.lo pytrayicon_la-pytrayicon.lo -pytrayicon_la_OBJECTS = $(am_pytrayicon_la_OBJECTS) -pytrayicon_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(pytrayicon_la_CFLAGS) \ - $(CFLAGS) $(pytrayicon_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(pytrayicon_la_SOURCES) -DIST_SOURCES = $(pytrayicon_la_SOURCES) -py_compile = $(top_srcdir)/py-compile -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BINDIR = @BINDIR@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CORTADO_PREFIX = @CORTADO_PREFIX@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPYDOC = @EPYDOC@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ -INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ -INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_ICONV = @INTLTOOL_ICONV@ -INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ -INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ -INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ -INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ -INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ -INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ -INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ -INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ -INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ -INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ -INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ -INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ -INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ -INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ -INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ -INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALSTATEDIR = @LOCALSTATEDIR@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -POSUB = @POSUB@ -PYCHECKER = @PYCHECKER@ -PYGST_010_REQ = @PYGST_010_REQ@ -PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_INCLUDES = @PYTHON_INCLUDES@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -RELEASE = @RELEASE@ -SBINDIR = @SBINDIR@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SYSCONFDIR = @SYSCONFDIR@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XVFB = @XVFB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -flumotiondir = $(libdir)/flumotion/python/flumotion/extern/pytrayicon -flumotion_PYTHON = \ - __init__.py \ - ltihooks.py - -CLEANFILES = pytrayicon.c -noinst_HEADERS = config.h eggtrayicon.h -flumotion_LTLIBRARIES = pytrayicon.la -pytrayicon_la_SOURCES = eggtrayicon.c pytrayiconmodule.c pytrayicon.c -pytrayicon_la_CFLAGS = $(PYGTK_CFLAGS) $(PYTHON_INCLUDES) $(GTK_CFLAGS) -pytrayicon_la_LIBADD = $(GTK_LIBS) -pytrayicon_la_LDFLAGS = -module -avoid-version -EXTRA_DIST = $(flumotion_PYTHON) pytrayicon.defs pytrayicon.override \ - eggtrayicon.c eggtrayicon.h pytrayiconmodule.c - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/extern/pytrayicon/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu flumotion/extern/pytrayicon/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-flumotionLTLIBRARIES: $(flumotion_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(flumotiondir)" || $(MKDIR_P) "$(DESTDIR)$(flumotiondir)" - @list='$(flumotion_LTLIBRARIES)'; test -n "$(flumotiondir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(flumotiondir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(flumotiondir)"; \ - } - -uninstall-flumotionLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(flumotion_LTLIBRARIES)'; test -n "$(flumotiondir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(flumotiondir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(flumotiondir)/$$f"; \ - done - -clean-flumotionLTLIBRARIES: - -test -z "$(flumotion_LTLIBRARIES)" || rm -f $(flumotion_LTLIBRARIES) - @list='$(flumotion_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -pytrayicon.la: $(pytrayicon_la_OBJECTS) $(pytrayicon_la_DEPENDENCIES) - $(pytrayicon_la_LINK) -rpath $(flumotiondir) $(pytrayicon_la_OBJECTS) $(pytrayicon_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pytrayicon_la-eggtrayicon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pytrayicon_la-pytrayicon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pytrayicon_la-pytrayiconmodule.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -pytrayicon_la-eggtrayicon.lo: eggtrayicon.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pytrayicon_la_CFLAGS) $(CFLAGS) -MT pytrayicon_la-eggtrayicon.lo -MD -MP -MF $(DEPDIR)/pytrayicon_la-eggtrayicon.Tpo -c -o pytrayicon_la-eggtrayicon.lo `test -f 'eggtrayicon.c' || echo '$(srcdir)/'`eggtrayicon.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pytrayicon_la-eggtrayicon.Tpo $(DEPDIR)/pytrayicon_la-eggtrayicon.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eggtrayicon.c' object='pytrayicon_la-eggtrayicon.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pytrayicon_la_CFLAGS) $(CFLAGS) -c -o pytrayicon_la-eggtrayicon.lo `test -f 'eggtrayicon.c' || echo '$(srcdir)/'`eggtrayicon.c - -pytrayicon_la-pytrayiconmodule.lo: pytrayiconmodule.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pytrayicon_la_CFLAGS) $(CFLAGS) -MT pytrayicon_la-pytrayiconmodule.lo -MD -MP -MF $(DEPDIR)/pytrayicon_la-pytrayiconmodule.Tpo -c -o pytrayicon_la-pytrayiconmodule.lo `test -f 'pytrayiconmodule.c' || echo '$(srcdir)/'`pytrayiconmodule.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pytrayicon_la-pytrayiconmodule.Tpo $(DEPDIR)/pytrayicon_la-pytrayiconmodule.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pytrayiconmodule.c' object='pytrayicon_la-pytrayiconmodule.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pytrayicon_la_CFLAGS) $(CFLAGS) -c -o pytrayicon_la-pytrayiconmodule.lo `test -f 'pytrayiconmodule.c' || echo '$(srcdir)/'`pytrayiconmodule.c - -pytrayicon_la-pytrayicon.lo: pytrayicon.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pytrayicon_la_CFLAGS) $(CFLAGS) -MT pytrayicon_la-pytrayicon.lo -MD -MP -MF $(DEPDIR)/pytrayicon_la-pytrayicon.Tpo -c -o pytrayicon_la-pytrayicon.lo `test -f 'pytrayicon.c' || echo '$(srcdir)/'`pytrayicon.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pytrayicon_la-pytrayicon.Tpo $(DEPDIR)/pytrayicon_la-pytrayicon.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pytrayicon.c' object='pytrayicon_la-pytrayicon.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pytrayicon_la_CFLAGS) $(CFLAGS) -c -o pytrayicon_la-pytrayicon.lo `test -f 'pytrayicon.c' || echo '$(srcdir)/'`pytrayicon.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-flumotionPYTHON: $(flumotion_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(flumotiondir)" || $(MKDIR_P) "$(DESTDIR)$(flumotiondir)" - @list='$(flumotion_PYTHON)'; dlist=; list2=; test -n "$(flumotiondir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ - $(am__strip_dir) \ - dlist="$$dlist $$f"; \ - list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ - for file in $$list2; do echo $$file; done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(flumotiondir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(flumotiondir)" || exit $$?; \ - done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(flumotiondir)" $$dlist; \ - else \ - PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(flumotiondir)" $$dlist; \ - fi; \ - else :; fi - -uninstall-flumotionPYTHON: - @$(NORMAL_UNINSTALL) - @list='$(flumotion_PYTHON)'; test -n "$(flumotiondir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - filesc=`echo "$$files" | sed 's|$$|c|'`; \ - fileso=`echo "$$files" | sed 's|$$|o|'`; \ - echo " ( cd '$(DESTDIR)$(flumotiondir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(flumotiondir)" && rm -f $$files || exit $$?; \ - echo " ( cd '$(DESTDIR)$(flumotiondir)' && rm -f" $$filesc ")"; \ - cd "$(DESTDIR)$(flumotiondir)" && rm -f $$filesc || exit $$?; \ - echo " ( cd '$(DESTDIR)$(flumotiondir)' && rm -f" $$fileso ")"; \ - cd "$(DESTDIR)$(flumotiondir)" && rm -f $$fileso - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(flumotiondir)" "$(DESTDIR)$(flumotiondir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-flumotionLTLIBRARIES clean-generic clean-libtool \ - clean-local mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-flumotionLTLIBRARIES install-flumotionPYTHON - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-flumotionLTLIBRARIES uninstall-flumotionPYTHON - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean \ - clean-flumotionLTLIBRARIES clean-generic clean-libtool \ - clean-local ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-flumotionLTLIBRARIES \ - install-flumotionPYTHON install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-flumotionLTLIBRARIES \ - uninstall-flumotionPYTHON - - -#if HAVE_PYCHECKER -#check-local: $(PYCHECKER_FILES) -# if test ! -z "$(PYCHECKER_FILES)"; \ -# then \ -# PYTHONPATH=$(top_srcdir):$(top_builddir) \ -# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ -# $(PYCHECKER_FILES); \ -# fi -#endif - -pytrayicon.c: pytrayicon.defs pytrayicon.override - (cd $(srcdir) \ - && $(PYGTK_CODEGEN) \ - --prefix pytrayicon \ - --register $(PYGTK_DEFSDIR)/gdk-types.defs \ - --register $(PYGTK_DEFSDIR)/gtk-types.defs \ - --override pytrayicon.override \ - pytrayicon.defs > $@) - -clean-local: - rm -rf *.pyc *.pyo - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/pytrayicon.c flumotion-0.9.1/flumotion/extern/pytrayicon/pytrayicon.c --- flumotion-0.6.1/flumotion/extern/pytrayicon/pytrayicon.c 2009-09-09 11:38:32.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/pytrayicon.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,218 +0,0 @@ -/* -- THIS FILE IS GENERATED - DO NOT EDIT *//* -*- Mode: C; c-basic-offset: 4 -*- */ - -#include - - - -#line 3 "pytrayicon.override" -#include -#include "pygobject.h" -#include "eggtrayicon.h" -#line 12 "pytrayicon.c" - - -/* ---------- types from other modules ---------- */ -static PyTypeObject *_PyGtkPlug_Type; -#define PyGtkPlug_Type (*_PyGtkPlug_Type) - - -/* ---------- forward type declarations ---------- */ -PyTypeObject G_GNUC_INTERNAL PyEggTrayIcon_Type; - -#line 23 "pytrayicon.c" - - - -/* ----------- EggTrayIcon ----------- */ - -static int -_wrap_egg_tray_icon_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "name", NULL }; - char *name; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:EggTrayIcon.__init__", kwlist, &name)) - return -1; - self->obj = (GObject *)egg_tray_icon_new(name); - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create EggTrayIcon object"); - return -1; - } - pygobject_register_wrapper((PyObject *)self); - return 0; -} - -#line 12 "pytrayicon.override" -static PyObject* -_wrap_egg_tray_icon_send_message(PyGObject *self, - PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = {"timeout", "message", NULL}; - int timeout, len, ret; - char *message; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "is#:TrayIcon.send_message", kwlist, - &timeout, &message, &len)) - return NULL; - ret = egg_tray_icon_send_message(EGG_TRAY_ICON(self->obj), - timeout, message, len); - return PyInt_FromLong(ret); -} -#line 64 "pytrayicon.c" - - -static PyObject * -_wrap_egg_tray_icon_cancel_message(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "id", NULL }; - PyObject *py_id = NULL; - guint id = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:EggTrayIcon.cancel_message", kwlist, &py_id)) - return NULL; - if (py_id) { - if (PyLong_Check(py_id)) - id = PyLong_AsUnsignedLong(py_id); - else if (PyInt_Check(py_id)) - id = PyInt_AsLong(py_id); - else - PyErr_SetString(PyExc_TypeError, "Parameter 'id' must be an int or a long"); - if (PyErr_Occurred()) - return NULL; - } - - egg_tray_icon_cancel_message(EGG_TRAY_ICON(self->obj), id); - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_egg_tray_icon_get_orientation(PyGObject *self) -{ - gint ret; - - - ret = egg_tray_icon_get_orientation(EGG_TRAY_ICON(self->obj)); - - return pyg_enum_from_gtype(GTK_TYPE_ORIENTATION, ret); -} - -static PyObject * -_wrap_egg_tray_icon_set_tooltip(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "tooltip", NULL }; - char *tooltip; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:EggTrayIcon.set_tooltip", kwlist, &tooltip)) - return NULL; - - egg_tray_icon_set_tooltip(EGG_TRAY_ICON(self->obj), tooltip); - - Py_INCREF(Py_None); - return Py_None; -} - -static const PyMethodDef _PyEggTrayIcon_methods[] = { - { "send_message", (PyCFunction)_wrap_egg_tray_icon_send_message, METH_VARARGS|METH_KEYWORDS, - NULL }, - { "cancel_message", (PyCFunction)_wrap_egg_tray_icon_cancel_message, METH_VARARGS|METH_KEYWORDS, - NULL }, - { "get_orientation", (PyCFunction)_wrap_egg_tray_icon_get_orientation, METH_NOARGS, - NULL }, - { "set_tooltip", (PyCFunction)_wrap_egg_tray_icon_set_tooltip, METH_VARARGS|METH_KEYWORDS, - NULL }, - { NULL, NULL, 0, NULL } -}; - -PyTypeObject G_GNUC_INTERNAL PyEggTrayIcon_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ - "pytrayicon.TrayIcon", /* tp_name */ - sizeof(PyGObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)0, /* tp_dealloc */ - (printfunc)0, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - (cmpfunc)0, /* tp_compare */ - (reprfunc)0, /* tp_repr */ - (PyNumberMethods*)0, /* tp_as_number */ - (PySequenceMethods*)0, /* tp_as_sequence */ - (PyMappingMethods*)0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)0, /* tp_str */ - (getattrofunc)0, /* tp_getattro */ - (setattrofunc)0, /* tp_setattro */ - (PyBufferProcs*)0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - NULL, /* Documentation string */ - (traverseproc)0, /* tp_traverse */ - (inquiry)0, /* tp_clear */ - (richcmpfunc)0, /* tp_richcompare */ - offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */ - (getiterfunc)0, /* tp_iter */ - (iternextfunc)0, /* tp_iternext */ - (struct PyMethodDef*)_PyEggTrayIcon_methods, /* tp_methods */ - (struct PyMemberDef*)0, /* tp_members */ - (struct PyGetSetDef*)0, /* tp_getset */ - NULL, /* tp_base */ - NULL, /* tp_dict */ - (descrgetfunc)0, /* tp_descr_get */ - (descrsetfunc)0, /* tp_descr_set */ - offsetof(PyGObject, inst_dict), /* tp_dictoffset */ - (initproc)_wrap_egg_tray_icon_new, /* tp_init */ - (allocfunc)0, /* tp_alloc */ - (newfunc)0, /* tp_new */ - (freefunc)0, /* tp_free */ - (inquiry)0 /* tp_is_gc */ -}; - - - -/* ----------- functions ----------- */ - -static PyObject * -_wrap_egg_tray_icon_get_type(PyObject *self) -{ - GType ret; - - - ret = egg_tray_icon_get_type(); - - return pyg_type_wrapper_new(ret); -} - -const PyMethodDef pytrayicon_functions[] = { - { "egg_tray_icon_get_type", (PyCFunction)_wrap_egg_tray_icon_get_type, METH_NOARGS, - NULL }, - { NULL, NULL, 0, NULL } -}; - -/* initialise stuff extension classes */ -void -pytrayicon_register_classes(PyObject *d) -{ - PyObject *module; - - if ((module = PyImport_ImportModule("gtk")) != NULL) { - _PyGtkPlug_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Plug"); - if (_PyGtkPlug_Type == NULL) { - PyErr_SetString(PyExc_ImportError, - "cannot import name Plug from gtk"); - return ; - } - } else { - PyErr_SetString(PyExc_ImportError, - "could not import gtk"); - return ; - } - - -#line 217 "pytrayicon.c" - pygobject_register_class(d, "EggTrayIcon", EGG_TYPE_TRAY_ICON, &PyEggTrayIcon_Type, Py_BuildValue("(O)", &PyGtkPlug_Type)); -} diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/pytrayicon.defs flumotion-0.9.1/flumotion/extern/pytrayicon/pytrayicon.defs --- flumotion-0.6.1/flumotion/extern/pytrayicon/pytrayicon.defs 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/pytrayicon.defs 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -;; -*- scheme -*- -; object definitions ... -(define-object TrayIcon - (in-module "Egg") - (parent "GtkPlug") - (c-name "EggTrayIcon") - (gtype-id "EGG_TYPE_TRAY_ICON") -) - -;; Enumerations and flags ... - - -;; From eggtrayicon.h - -(define-function egg_tray_icon_get_type - (c-name "egg_tray_icon_get_type") - (return-type "GType") -) - -;(define-function egg_tray_icon_new_for_screen -; (c-name "egg_tray_icon_new_for_screen") -; (return-type "EggTrayIcon*") -; (parameters -; '("GdkScreen*" "screen") -; '("const-gchar*" "name") -; ) -;) - -(define-function egg_tray_icon_new - (c-name "egg_tray_icon_new") - (is-constructor-of "EggTrayIcon") - (return-type "EggTrayIcon*") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method send_message - (of-object "EggTrayIcon") - (c-name "egg_tray_icon_send_message") - (return-type "guint") - (parameters - '("gint" "timeout") - '("const-char*" "message") - '("gint" "len") - ) -) - -(define-method cancel_message - (of-object "EggTrayIcon") - (c-name "egg_tray_icon_cancel_message") - (return-type "none") - (parameters - '("guint" "id") - ) -) - -(define-method get_orientation - (of-object "EggTrayIcon") - (c-name "egg_tray_icon_get_orientation") - (return-type "GtkOrientation") -) - -(define-method set_tooltip - (of-object "EggTrayIcon") - (c-name "egg_tray_icon_set_tooltip") - (return-type "none") - (parameters - '("const-char*" "tooltip") - ) -) diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/pytrayiconmodule.c flumotion-0.9.1/flumotion/extern/pytrayicon/pytrayiconmodule.c --- flumotion-0.6.1/flumotion/extern/pytrayicon/pytrayiconmodule.c 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/pytrayiconmodule.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -#include - -void pytrayicon_register_classes (PyObject *d); -extern PyMethodDef pytrayicon_functions[]; - -DL_EXPORT(void) -initpytrayicon(void) -{ - PyObject *m, *d; - - init_pygobject (); - - m = Py_InitModule ("pytrayicon", pytrayicon_functions); - d = PyModule_GetDict (m); - - pytrayicon_register_classes (d); - - if (PyErr_Occurred ()) { - Py_FatalError ("can't initialise module pytrayicon"); - } -} diff -Nru flumotion-0.6.1/flumotion/extern/pytrayicon/pytrayicon.override flumotion-0.9.1/flumotion/extern/pytrayicon/pytrayicon.override --- flumotion-0.6.1/flumotion/extern/pytrayicon/pytrayicon.override 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/pytrayicon/pytrayicon.override 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -%% -headers -#include -#include "pygobject.h" -#include "eggtrayicon.h" -%% -modulename pytrayicon -%% -import gtk.Plug as PyGtkPlug_Type -%% -override egg_tray_icon_send_message kwargs -static PyObject* -_wrap_egg_tray_icon_send_message(PyGObject *self, - PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = {"timeout", "message", NULL}; - int timeout, len, ret; - char *message; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "is#:TrayIcon.send_message", kwlist, - &timeout, &message, &len)) - return NULL; - ret = egg_tray_icon_send_message(EGG_TRAY_ICON(self->obj), - timeout, message, len); - return PyInt_FromLong(ret); -} -%% diff -Nru flumotion-0.6.1/flumotion/extern/unixcrypt.py flumotion-0.9.1/flumotion/extern/unixcrypt.py --- flumotion-0.6.1/flumotion/extern/unixcrypt.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/extern/unixcrypt.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,653 @@ +# drop in replacement for the C "crypt" module. +# (c)2000 Michal J Wallace (sabren@manifestation.com) +# made available to one and all under the python license. +# +# Based on perl code by Martin Vorlaender, martin@radiogaga.harz.de, +# 11-DEC-1997. +# which was based upon Java source code written by jdumas@zgs.com, +# which was based upon C source code written by Eric Young, eay@psych.uq.oz.au. +# +#################################################3 + +""" this module supposedly emulates the unix crypt() routine. + +don't ask me how it works, because I have no clue. I just +ported Crypt::UnixCrypt from perl into python.. :) + +encryptedtext = crypt(plaintext, salt) + +NOTE: supposedly, it doesn't work the same way unix does +when salt is not in [A-Za-z0-9./]{2} + +0423.2000: I CAN't get this working. I'm going to try +porting Crypt::PasswdMD5... +""" + +ITERATIONS = 16 + +con_salt = ( + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, + 0x0A, 0x0B, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, + 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, + 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, + 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, + 0x23, 0x24, 0x25, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, ) + +shifts2 = ( + 0, 0, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 0, ) + +skb0 = ( + # for C bits (numbered as per FIPS 46) 1 2 3 4 5 6 + 0x00000000, 0x00000010, 0x20000000, 0x20000010, + 0x00010000, 0x00010010, 0x20010000, 0x20010010, + 0x00000800, 0x00000810, 0x20000800, 0x20000810, + 0x00010800, 0x00010810, 0x20010800, 0x20010810, + 0x00000020, 0x00000030, 0x20000020, 0x20000030, + 0x00010020, 0x00010030, 0x20010020, 0x20010030, + 0x00000820, 0x00000830, 0x20000820, 0x20000830, + 0x00010820, 0x00010830, 0x20010820, 0x20010830, + 0x00080000, 0x00080010, 0x20080000, 0x20080010, + 0x00090000, 0x00090010, 0x20090000, 0x20090010, + 0x00080800, 0x00080810, 0x20080800, 0x20080810, + 0x00090800, 0x00090810, 0x20090800, 0x20090810, + 0x00080020, 0x00080030, 0x20080020, 0x20080030, + 0x00090020, 0x00090030, 0x20090020, 0x20090030, + 0x00080820, 0x00080830, 0x20080820, 0x20080830, + 0x00090820, 0x00090830, 0x20090820, 0x20090830, ) + +skb1 = ( + # for C bits (numbered as per FIPS 46) 7 8 10 11 12 13 + 0x00000000, 0x02000000, 0x00002000, 0x02002000, + 0x00200000, 0x02200000, 0x00202000, 0x02202000, + 0x00000004, 0x02000004, 0x00002004, 0x02002004, + 0x00200004, 0x02200004, 0x00202004, 0x02202004, + 0x00000400, 0x02000400, 0x00002400, 0x02002400, + 0x00200400, 0x02200400, 0x00202400, 0x02202400, + 0x00000404, 0x02000404, 0x00002404, 0x02002404, + 0x00200404, 0x02200404, 0x00202404, 0x02202404, + 0x10000000, 0x12000000, 0x10002000, 0x12002000, + 0x10200000, 0x12200000, 0x10202000, 0x12202000, + 0x10000004, 0x12000004, 0x10002004, 0x12002004, + 0x10200004, 0x12200004, 0x10202004, 0x12202004, + 0x10000400, 0x12000400, 0x10002400, 0x12002400, + 0x10200400, 0x12200400, 0x10202400, 0x12202400, + 0x10000404, 0x12000404, 0x10002404, 0x12002404, + 0x10200404, 0x12200404, 0x10202404, 0x12202404, ) + +skb2 = ( + # for C bits (numbered as per FIPS 46) 14 15 16 17 19 20 + 0x00000000, 0x00000001, 0x00040000, 0x00040001, + 0x01000000, 0x01000001, 0x01040000, 0x01040001, + 0x00000002, 0x00000003, 0x00040002, 0x00040003, + 0x01000002, 0x01000003, 0x01040002, 0x01040003, + 0x00000200, 0x00000201, 0x00040200, 0x00040201, + 0x01000200, 0x01000201, 0x01040200, 0x01040201, + 0x00000202, 0x00000203, 0x00040202, 0x00040203, + 0x01000202, 0x01000203, 0x01040202, 0x01040203, + 0x08000000, 0x08000001, 0x08040000, 0x08040001, + 0x09000000, 0x09000001, 0x09040000, 0x09040001, + 0x08000002, 0x08000003, 0x08040002, 0x08040003, + 0x09000002, 0x09000003, 0x09040002, 0x09040003, + 0x08000200, 0x08000201, 0x08040200, 0x08040201, + 0x09000200, 0x09000201, 0x09040200, 0x09040201, + 0x08000202, 0x08000203, 0x08040202, 0x08040203, + 0x09000202, 0x09000203, 0x09040202, 0x09040203, ) + + + +skb3 = ( + # for C bits (numbered as per FIPS 46) 21 23 24 26 27 28 + 0x00000000, 0x00100000, 0x00000100, 0x00100100, + 0x00000008, 0x00100008, 0x00000108, 0x00100108, + 0x00001000, 0x00101000, 0x00001100, 0x00101100, + 0x00001008, 0x00101008, 0x00001108, 0x00101108, + 0x04000000, 0x04100000, 0x04000100, 0x04100100, + 0x04000008, 0x04100008, 0x04000108, 0x04100108, + 0x04001000, 0x04101000, 0x04001100, 0x04101100, + 0x04001008, 0x04101008, 0x04001108, 0x04101108, + 0x00020000, 0x00120000, 0x00020100, 0x00120100, + 0x00020008, 0x00120008, 0x00020108, 0x00120108, + 0x00021000, 0x00121000, 0x00021100, 0x00121100, + 0x00021008, 0x00121008, 0x00021108, 0x00121108, + 0x04020000, 0x04120000, 0x04020100, 0x04120100, + 0x04020008, 0x04120008, 0x04020108, 0x04120108, + 0x04021000, 0x04121000, 0x04021100, 0x04121100, + 0x04021008, 0x04121008, 0x04021108, 0x04121108, ) + +skb4 = ( + # for D bits (numbered as per FIPS 46) 1 2 3 4 5 6 + 0x00000000, 0x10000000, 0x00010000, 0x10010000, + 0x00000004, 0x10000004, 0x00010004, 0x10010004, + 0x20000000, 0x30000000, 0x20010000, 0x30010000, + 0x20000004, 0x30000004, 0x20010004, 0x30010004, + 0x00100000, 0x10100000, 0x00110000, 0x10110000, + 0x00100004, 0x10100004, 0x00110004, 0x10110004, + 0x20100000, 0x30100000, 0x20110000, 0x30110000, + 0x20100004, 0x30100004, 0x20110004, 0x30110004, + 0x00001000, 0x10001000, 0x00011000, 0x10011000, + 0x00001004, 0x10001004, 0x00011004, 0x10011004, + 0x20001000, 0x30001000, 0x20011000, 0x30011000, + 0x20001004, 0x30001004, 0x20011004, 0x30011004, + 0x00101000, 0x10101000, 0x00111000, 0x10111000, + 0x00101004, 0x10101004, 0x00111004, 0x10111004, + 0x20101000, 0x30101000, 0x20111000, 0x30111000, + 0x20101004, 0x30101004, 0x20111004, 0x30111004, ) + +skb5 = ( + # for D bits (numbered as per FIPS 46) 8 9 11 12 13 14 + 0x00000000, 0x08000000, 0x00000008, 0x08000008, + 0x00000400, 0x08000400, 0x00000408, 0x08000408, + 0x00020000, 0x08020000, 0x00020008, 0x08020008, + 0x00020400, 0x08020400, 0x00020408, 0x08020408, + 0x00000001, 0x08000001, 0x00000009, 0x08000009, + 0x00000401, 0x08000401, 0x00000409, 0x08000409, + 0x00020001, 0x08020001, 0x00020009, 0x08020009, + 0x00020401, 0x08020401, 0x00020409, 0x08020409, + 0x02000000, 0x0A000000, 0x02000008, 0x0A000008, + 0x02000400, 0x0A000400, 0x02000408, 0x0A000408, + 0x02020000, 0x0A020000, 0x02020008, 0x0A020008, + 0x02020400, 0x0A020400, 0x02020408, 0x0A020408, + 0x02000001, 0x0A000001, 0x02000009, 0x0A000009, + 0x02000401, 0x0A000401, 0x02000409, 0x0A000409, + 0x02020001, 0x0A020001, 0x02020009, 0x0A020009, + 0x02020401, 0x0A020401, 0x02020409, 0x0A020409, ) + + +skb6 = ( + # for D bits (numbered as per FIPS 46) 16 17 18 19 20 21 + 0x00000000, 0x00000100, 0x00080000, 0x00080100, + 0x01000000, 0x01000100, 0x01080000, 0x01080100, + 0x00000010, 0x00000110, 0x00080010, 0x00080110, + 0x01000010, 0x01000110, 0x01080010, 0x01080110, + 0x00200000, 0x00200100, 0x00280000, 0x00280100, + 0x01200000, 0x01200100, 0x01280000, 0x01280100, + 0x00200010, 0x00200110, 0x00280010, 0x00280110, + 0x01200010, 0x01200110, 0x01280010, 0x01280110, + 0x00000200, 0x00000300, 0x00080200, 0x00080300, + 0x01000200, 0x01000300, 0x01080200, 0x01080300, + 0x00000210, 0x00000310, 0x00080210, 0x00080310, + 0x01000210, 0x01000310, 0x01080210, 0x01080310, + 0x00200200, 0x00200300, 0x00280200, 0x00280300, + 0x01200200, 0x01200300, 0x01280200, 0x01280300, + 0x00200210, 0x00200310, 0x00280210, 0x00280310, + 0x01200210, 0x01200310, 0x01280210, 0x01280310, ) + + +skb7 = ( + # for D bits (numbered as per FIPS 46) 22 23 24 25 27 28 + 0x00000000, 0x04000000, 0x00040000, 0x04040000, + 0x00000002, 0x04000002, 0x00040002, 0x04040002, + 0x00002000, 0x04002000, 0x00042000, 0x04042000, + 0x00002002, 0x04002002, 0x00042002, 0x04042002, + 0x00000020, 0x04000020, 0x00040020, 0x04040020, + 0x00000022, 0x04000022, 0x00040022, 0x04040022, + 0x00002020, 0x04002020, 0x00042020, 0x04042020, + 0x00002022, 0x04002022, 0x00042022, 0x04042022, + 0x00000800, 0x04000800, 0x00040800, 0x04040800, + 0x00000802, 0x04000802, 0x00040802, 0x04040802, + 0x00002800, 0x04002800, 0x00042800, 0x04042800, + 0x00002802, 0x04002802, 0x00042802, 0x04042802, + 0x00000820, 0x04000820, 0x00040820, 0x04040820, + 0x00000822, 0x04000822, 0x00040822, 0x04040822, + 0x00002820, 0x04002820, 0x00042820, 0x04042820, + 0x00002822, 0x04002822, 0x00042822, 0x04042822, ) + +SPtrans0 = ( + # nibble 0 + 0x00820200, 0x00020000, 0x80800000, 0x80820200, + 0x00800000, 0x80020200, 0x80020000, 0x80800000, + 0x80020200, 0x00820200, 0x00820000, 0x80000200, + 0x80800200, 0x00800000, 0x00000000, 0x80020000, + 0x00020000, 0x80000000, 0x00800200, 0x00020200, + 0x80820200, 0x00820000, 0x80000200, 0x00800200, + 0x80000000, 0x00000200, 0x00020200, 0x80820000, + 0x00000200, 0x80800200, 0x80820000, 0x00000000, + 0x00000000, 0x80820200, 0x00800200, 0x80020000, + 0x00820200, 0x00020000, 0x80000200, 0x00800200, + 0x80820000, 0x00000200, 0x00020200, 0x80800000, + 0x80020200, 0x80000000, 0x80800000, 0x00820000, + 0x80820200, 0x00020200, 0x00820000, 0x80800200, + 0x00800000, 0x80000200, 0x80020000, 0x00000000, + 0x00020000, 0x00800000, 0x80800200, 0x00820200, + 0x80000000, 0x80820000, 0x00000200, 0x80020200, ) + + +SPtrans1 = ( + # nibble 1 + 0x10042004, 0x00000000, 0x00042000, 0x10040000, + 0x10000004, 0x00002004, 0x10002000, 0x00042000, + 0x00002000, 0x10040004, 0x00000004, 0x10002000, + 0x00040004, 0x10042000, 0x10040000, 0x00000004, + 0x00040000, 0x10002004, 0x10040004, 0x00002000, + 0x00042004, 0x10000000, 0x00000000, 0x00040004, + 0x10002004, 0x00042004, 0x10042000, 0x10000004, + 0x10000000, 0x00040000, 0x00002004, 0x10042004, + 0x00040004, 0x10042000, 0x10002000, 0x00042004, + 0x10042004, 0x00040004, 0x10000004, 0x00000000, + 0x10000000, 0x00002004, 0x00040000, 0x10040004, + 0x00002000, 0x10000000, 0x00042004, 0x10002004, + 0x10042000, 0x00002000, 0x00000000, 0x10000004, + 0x00000004, 0x10042004, 0x00042000, 0x10040000, + 0x10040004, 0x00040000, 0x00002004, 0x10002000, + 0x10002004, 0x00000004, 0x10040000, 0x00042000, ) + + +SPtrans2 = ( + # nibble 2 + 0x41000000, 0x01010040, 0x00000040, 0x41000040, + 0x40010000, 0x01000000, 0x41000040, 0x00010040, + 0x01000040, 0x00010000, 0x01010000, 0x40000000, + 0x41010040, 0x40000040, 0x40000000, 0x41010000, + 0x00000000, 0x40010000, 0x01010040, 0x00000040, + 0x40000040, 0x41010040, 0x00010000, 0x41000000, + 0x41010000, 0x01000040, 0x40010040, 0x01010000, + 0x00010040, 0x00000000, 0x01000000, 0x40010040, + 0x01010040, 0x00000040, 0x40000000, 0x00010000, + 0x40000040, 0x40010000, 0x01010000, 0x41000040, + 0x00000000, 0x01010040, 0x00010040, 0x41010000, + 0x40010000, 0x01000000, 0x41010040, 0x40000000, + 0x40010040, 0x41000000, 0x01000000, 0x41010040, + 0x00010000, 0x01000040, 0x41000040, 0x00010040, + 0x01000040, 0x00000000, 0x41010000, 0x40000040, + 0x41000000, 0x40010040, 0x00000040, 0x01010000, ) + + +SPtrans3 = ( + # nibble 3 + 0x00100402, 0x04000400, 0x00000002, 0x04100402, + 0x00000000, 0x04100000, 0x04000402, 0x00100002, + 0x04100400, 0x04000002, 0x04000000, 0x00000402, + 0x04000002, 0x00100402, 0x00100000, 0x04000000, + 0x04100002, 0x00100400, 0x00000400, 0x00000002, + 0x00100400, 0x04000402, 0x04100000, 0x00000400, + 0x00000402, 0x00000000, 0x00100002, 0x04100400, + 0x04000400, 0x04100002, 0x04100402, 0x00100000, + 0x04100002, 0x00000402, 0x00100000, 0x04000002, + 0x00100400, 0x04000400, 0x00000002, 0x04100000, + 0x04000402, 0x00000000, 0x00000400, 0x00100002, + 0x00000000, 0x04100002, 0x04100400, 0x00000400, + 0x04000000, 0x04100402, 0x00100402, 0x00100000, + 0x04100402, 0x00000002, 0x04000400, 0x00100402, + 0x00100002, 0x00100400, 0x04100000, 0x04000402, + 0x00000402, 0x04000000, 0x04000002, 0x04100400, ) + + +SPtrans4 = ( + # nibble 4 + 0x02000000, 0x00004000, 0x00000100, 0x02004108, + 0x02004008, 0x02000100, 0x00004108, 0x02004000, + 0x00004000, 0x00000008, 0x02000008, 0x00004100, + 0x02000108, 0x02004008, 0x02004100, 0x00000000, + 0x00004100, 0x02000000, 0x00004008, 0x00000108, + 0x02000100, 0x00004108, 0x00000000, 0x02000008, + 0x00000008, 0x02000108, 0x02004108, 0x00004008, + 0x02004000, 0x00000100, 0x00000108, 0x02004100, + 0x02004100, 0x02000108, 0x00004008, 0x02004000, + 0x00004000, 0x00000008, 0x02000008, 0x02000100, + 0x02000000, 0x00004100, 0x02004108, 0x00000000, + 0x00004108, 0x02000000, 0x00000100, 0x00004008, + 0x02000108, 0x00000100, 0x00000000, 0x02004108, + 0x02004008, 0x02004100, 0x00000108, 0x00004000, + 0x00004100, 0x02004008, 0x02000100, 0x00000108, + 0x00000008, 0x00004108, 0x02004000, 0x02000008, ) + + +SPtrans5 = ( + # nibble 5 + 0x20000010, 0x00080010, 0x00000000, 0x20080800, + 0x00080010, 0x00000800, 0x20000810, 0x00080000, + 0x00000810, 0x20080810, 0x00080800, 0x20000000, + 0x20000800, 0x20000010, 0x20080000, 0x00080810, + 0x00080000, 0x20000810, 0x20080010, 0x00000000, + 0x00000800, 0x00000010, 0x20080800, 0x20080010, + 0x20080810, 0x20080000, 0x20000000, 0x00000810, + 0x00000010, 0x00080800, 0x00080810, 0x20000800, + 0x00000810, 0x20000000, 0x20000800, 0x00080810, + 0x20080800, 0x00080010, 0x00000000, 0x20000800, + 0x20000000, 0x00000800, 0x20080010, 0x00080000, + 0x00080010, 0x20080810, 0x00080800, 0x00000010, + 0x20080810, 0x00080800, 0x00080000, 0x20000810, + 0x20000010, 0x20080000, 0x00080810, 0x00000000, + 0x00000800, 0x20000010, 0x20000810, 0x20080800, + 0x20080000, 0x00000810, 0x00000010, 0x20080010, ) + + +SPtrans6 = ( + # nibble 6 + 0x00001000, 0x00000080, 0x00400080, 0x00400001, + 0x00401081, 0x00001001, 0x00001080, 0x00000000, + 0x00400000, 0x00400081, 0x00000081, 0x00401000, + 0x00000001, 0x00401080, 0x00401000, 0x00000081, + 0x00400081, 0x00001000, 0x00001001, 0x00401081, + 0x00000000, 0x00400080, 0x00400001, 0x00001080, + 0x00401001, 0x00001081, 0x00401080, 0x00000001, + 0x00001081, 0x00401001, 0x00000080, 0x00400000, + 0x00001081, 0x00401000, 0x00401001, 0x00000081, + 0x00001000, 0x00000080, 0x00400000, 0x00401001, + 0x00400081, 0x00001081, 0x00001080, 0x00000000, + 0x00000080, 0x00400001, 0x00000001, 0x00400080, + 0x00000000, 0x00400081, 0x00400080, 0x00001080, + 0x00000081, 0x00001000, 0x00401081, 0x00400000, + 0x00401080, 0x00000001, 0x00001001, 0x00401081, + 0x00400001, 0x00401080, 0x00401000, 0x00001001, ) + +SPtrans7 = ( + # nibble 7 + 0x08200020, 0x08208000, 0x00008020, 0x00000000, + 0x08008000, 0x00200020, 0x08200000, 0x08208020, + 0x00000020, 0x08000000, 0x00208000, 0x00008020, + 0x00208020, 0x08008020, 0x08000020, 0x08200000, + 0x00008000, 0x00208020, 0x00200020, 0x08008000, + 0x08208020, 0x08000020, 0x00000000, 0x00208000, + 0x08000000, 0x00200000, 0x08008020, 0x08200020, + 0x00200000, 0x00008000, 0x08208000, 0x00000020, + 0x00200000, 0x00008000, 0x08000020, 0x08208020, + 0x00008020, 0x08000000, 0x00000000, 0x00208000, + 0x08200020, 0x08008020, 0x08008000, 0x00200020, + 0x08208000, 0x00000020, 0x00200020, 0x08008000, + 0x08208020, 0x00200000, 0x08200000, 0x08000020, + 0x00208000, 0x00008020, 0x08008020, 0x08200000, + 0x00000020, 0x08208000, 0x00208020, 0x00000000, + 0x08000000, 0x08200020, 0x00008000, 0x00208020, ) + + +cov_2char = ( + 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, + 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, + 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, + 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, + 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, + 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, ) + + +def ushr(n, s): + """only for ints! (mimics the Java >>> operator)""" + + s = s & 0x1f + return (n >> s) & (~0 >> s) # perl ~0 == 4294967295 + + +def toByte(value): + """this turns value into a shortint..""" + # the perl version was called toByte, but it returns signed numbers. + # maybe java bytes are signed? i don't remember.. + + value = value & 0xff # makes it a byte + if (value & 0x80): + value = -((~value & 0xff)+1) # is this right?? perl was: + # $value = -((~$value & 0xff) + 1) + # if $value & 0x80; + # but perl's "~" and python's "~" + # don't do the + # same thing exactly... + return value + + +def toInt(value): + if value & 0x80000000: + value = - ((~value & 0xffffffff) + 1) + return value + + +def byteToUnsigned(value): + if value >= 0: + return value + else: + return value + 256 + + +def fourBytesToInt(b, offset): + + value = byteToUnsigned(b[offset]) + value = value | (byteToUnsigned(b[offset+1]) << 8) + value = value | (byteToUnsigned(b[offset+2]) << 16) + value = value | (byteToUnsigned(b[offset+3]) << 24) + + return toInt(value) + + +def intToFourBytes(iValue, b, offset): + + b[offset] = toByte(ushr(iValue, 0) & 0xff) + b[offset+1] = toByte(ushr(iValue, 8) & 0xff) + b[offset+2] = toByte(ushr(iValue, 16) & 0xff) + b[offset+3] = toByte(ushr(iValue, 24) & 0xff) + + return None + + +def PERM_OP(a, b, n, m, results): + + t = (ushr(a, n) ^ b) & m + a = a ^ (t << n) # is order of operations right? + b = b ^ t + + results[0] = toInt(a) + results[1] = toInt(b) + + return None + + +def HPERM_OP(a, n, m): + + t = ((a << (16 - n)) ^ a) & m + a = a ^ t ^ ushr(t, 16 - n) + + return toInt(a) + + +def des_set_key(key): + + schedule = [None] * (ITERATIONS * 2) + # original version of that line was: + # my @schedule; $#schedule = $ITERATIONS * 2 -1; + + c = fourBytesToInt(key, 0) + d = fourBytesToInt(key, 4) + + results = [None, None] + # my @results; $#results = 1; + + PERM_OP(d, c, 4, 0x0f0f0f0f, results) + d = results[0] + c = results[1] + + c = HPERM_OP(c, -2, 0xcccc0000) + d = HPERM_OP(d, -2, 0xcccc0000) + + PERM_OP(d, c, 1, 0x55555555, results) + d = results[0] + c = results[1] + + PERM_OP(c, d, 8, 0x00ff00ff, results) + c = results[0] + d = results[1] + + PERM_OP(d, c, 1, 0x55555555, results) + d = results[0] + c = results[1] + + d = (((d & 0x000000ff) << 16) | (d & 0x0000ff00) | + ushr(d & 0x00ff0000, 16) | ushr(c & 0xf0000000, 4)) + + c = c & 0x0fffffff + + j = 0 + + for i in range(ITERATIONS): + if (shifts2[i]): + c = ushr(c, 2) | (c << 26) + d = ushr(d, 2) | (d << 26) + else: + c = ushr(c, 1) | (c << 27) + d = ushr(d, 1) | (d << 27) + + c = c & 0x0fffffff + d = d & 0x0fffffff + + s = skb0[(c) & 0x3f]| \ + skb1[(ushr(c, 6) & 0x03) | (ushr(c, 7) & 0x3c)]| \ + skb2[(ushr(c, 13) & 0x0f) | (ushr(c, 14) & 0x30)]| \ + skb3[(ushr(c, 20) & 0x01) | (ushr(c, 21) & 0x06) | \ + (ushr(c, 22) & 0x38)] + + t = skb4[(d) & 0x3f]| \ + skb5[(ushr(d, 7) & 0x03) | (ushr(d, 8) & 0x3c)]| \ + skb6[ushr(d, 15) & 0x3f]| \ + skb7[(ushr(d, 21) & 0x0f) | (ushr(d, 22) & 0x30)] + + schedule[j] = ((t << 16) | + (s & 0x0000ffff)) & 0xffffffff + s = (ushr(s, 16) | (t & 0xffff0000)) + j = j + 1 + + s = (s << 4) | ushr(s, 28) + schedule[j] = s & 0xffffffff + j = j + 1 + + return schedule + + +def D_ENCRYPT(L, R, S, E0, E1, s): + + v = R ^ ushr(R, 16) + u = v & E0 + v = v & E1 + u = (u ^ (u << 16)) ^ R ^ s[S] + t = (v ^ (v << 16)) ^ R ^ s[S + 1] + t = ushr(t, 4) | (t << 28) + + L = L ^ (SPtrans1[(t) & 0x3f] | \ + SPtrans3[ushr(t, 8) & 0x3f] | \ + SPtrans5[ushr(t, 16) & 0x3f] | \ + SPtrans7[ushr(t, 24) & 0x3f] | \ + SPtrans0[(u) & 0x3f] | \ + SPtrans2[ushr(u, 8) & 0x3f] | \ + SPtrans4[ushr(u, 16) & 0x3f] | \ + SPtrans6[ushr(u, 24) & 0x3f]) + + return L + + +def body(schedule, Eswap0, Eswap1): + + left = 0 + right = 0 + t = 0 + + + for j in range(25): + + for i in range(0, ITERATIONS * 2, 4): + left = D_ENCRYPT(left, right, i, Eswap0, Eswap1, schedule) + right = D_ENCRYPT(right, left, i + 2, Eswap0, Eswap1, schedule) + + left, right = right, left + + t = right + + right = ushr(left, 1) | (left << 31) + left = ushr(t, 1) | (t << 31) + + left = left & 0xffffffff + right = right & 0xffffffff + + results = [None, None] + # was: + # my @results; $#results = 1; + + PERM_OP(right, left, 1, 0x55555555, results) + right = results[0] + left = results[1] + + PERM_OP(left, right, 8, 0x00ff00ff, results) + left = results[0] + right = results[1] + + PERM_OP(right, left, 2, 0x33333333, results) + right = results[0] + left = results[1] + + PERM_OP(left, right, 16, 0x0000ffff, results) + left = results[0] + right = results[1] + + PERM_OP(right, left, 4, 0x0f0f0f0f, results) + right = results[0] + left = results[1] + + return [left, right] + + +def crypt(plaintext, salt): + buffer = '' + + if salt=='': + return buffer + + if len(salt)<2: + salt = salt + salt + + buffer = salt[:2] + + Eswap0 = con_salt[ord(salt[0])] + Eswap1 = con_salt[ord(salt[1])] << 4 + + key = [0] * 8 + + iChar = map(lambda c: ord(c) << 1, plaintext) + + for i in range(len(key)): + if i >= len(iChar): + break + key[i] = toByte(iChar[i]) + + + schedule = des_set_key(key) + out = body(schedule, Eswap0, Eswap1) + + b = [None] * 9 + + intToFourBytes(out[0], b, 0) + intToFourBytes(out[1], b, 4) + b[8] = 0 + + + y = 0 + u = 0x80 + + for i in range(2, 13): + + c = 0 + for j in range(6): + c = c << 1 + + if (b[y] & u) != 0: + c = c | 1 + + u = u >> 1 + + if(u == 0): + y = y + 1 + u = 0x80 + + buffer = buffer + chr(cov_2char[c]) + + return buffer + + +if __name__=="__main__": + print crypt("cat", "hat") diff -Nru flumotion-0.6.1/flumotion/__init__.py flumotion-0.9.1/flumotion/__init__.py --- flumotion-0.6.1/flumotion/__init__.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/__init__.py 2011-09-11 08:09:03.000000000 +0000 @@ -1,22 +1,16 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. - -__version__ = "$Rev: 5969 $" diff -Nru flumotion-0.6.1/flumotion/job/__init__.py flumotion-0.9.1/flumotion/job/__init__.py --- flumotion-0.6.1/flumotion/job/__init__.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/job/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ code for jobs executing for workers """ -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/job/job.py flumotion-0.9.1/flumotion/job/job.py --- flumotion-0.6.1/flumotion/job/job.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/job/job.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -38,7 +34,8 @@ from twisted.spread import pb from zope.interface import implements -from flumotion.common import errors, interfaces, log, keycards +from flumotion.common import errors, interfaces, log + from flumotion.common import medium, package from flumotion.common.reflectcall import createComponent, reflectCallCatching from flumotion.component import component @@ -47,7 +44,10 @@ from flumotion.twisted import pb as fpb from flumotion.twisted import defer as fdefer -__version__ = "$Rev: 7248 $" +# register serializables +from flumotion.common import keycards + +__version__ = "$Rev$" class JobMedium(medium.BaseMedium): diff -Nru flumotion-0.6.1/flumotion/job/main.py flumotion-0.9.1/flumotion/job/main.py --- flumotion-0.6.1/flumotion/job/main.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/job/main.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,42 +1,37 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -import os - from twisted.internet import reactor -from flumotion.configure import configure -from flumotion.common import log, keycards, common, errors -from flumotion.job import job from flumotion.twisted import credentials, fdserver -from flumotion.common.options import OptionParser +from flumotion.common import log, common, options +from flumotion.job import job + +# register serializables +from flumotion.common import keycards -__version__ = "$Rev: 7980 $" +__version__ = "$Rev$" def main(args): - parser = OptionParser(domain="flumotion-job") + parser = options.OptionParser(domain="flumotion-job") log.debug('job', 'Parsing arguments (%r)' % ', '.join(args)) - options, args = parser.parse_args(args) + opts, args = parser.parse_args(args) # check if a config file was specified; if so, parse config and copy over if len(args) != 3: diff -Nru flumotion-0.6.1/flumotion/job/Makefile.in flumotion-0.9.1/flumotion/job/Makefile.in --- flumotion-0.6.1/flumotion/job/Makefile.in 2009-09-09 11:37:57.000000000 +0000 +++ flumotion-0.9.1/flumotion/job/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -101,6 +100,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -110,18 +110,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -169,6 +162,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -186,16 +180,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -203,7 +199,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -218,6 +213,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -250,7 +246,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/launch/__init__.py flumotion-0.9.1/flumotion/launch/__init__.py --- flumotion-0.6.1/flumotion/launch/__init__.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/launch/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ code for flumotion-launch """ -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/launch/inspect.py flumotion-0.9.1/flumotion/launch/inspect.py --- flumotion-0.6.1/flumotion/launch/inspect.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/launch/inspect.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import sys @@ -24,7 +20,7 @@ from flumotion.common import log, common, registry from flumotion.common.options import OptionParser -__version__ = "$Rev: 7386 $" +__version__ = "$Rev$" def printMultiline(indent, data): diff -Nru flumotion-0.6.1/flumotion/launch/main.py flumotion-0.9.1/flumotion/launch/main.py --- flumotion-0.6.1/flumotion/launch/main.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/launch/main.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -48,6 +44,13 @@ flumotion-launch http-streamer /requestlogger-file,logfile=/dev/stdout +Compound properties can be specified with: + + propname=[subname1=value1,subname2=[subsubname1=subsubvalue1]] + +Characters '\', '[' and ']' can be escaped with '\' +to remove there special meaning. + Flumotion-launch explicitly avoids much of Flumotion's core logic. It does not import flumotion.manager, flumotion.admin, or flumotion.worker. There is no depgraph, no feed server, no job process. Although it might @@ -67,13 +70,12 @@ from flumotion.common import i18n from flumotion.common.options import OptionParser from flumotion.configure import configure -from flumotion.twisted import flavors from flumotion.launch import parse from gettext import gettext as _ -__version__ = "$Rev: 7352 $" +__version__ = "$Rev$" _headings = { messages.ERROR: _('Error'), messages.WARNING: _('Warning'), diff -Nru flumotion-0.6.1/flumotion/launch/Makefile.in flumotion-0.9.1/flumotion/launch/Makefile.in --- flumotion-0.6.1/flumotion/launch/Makefile.in 2009-09-09 11:37:57.000000000 +0000 +++ flumotion-0.9.1/flumotion/launch/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -101,6 +100,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -110,18 +110,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -169,6 +162,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -186,16 +180,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -203,7 +199,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -218,6 +213,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -250,7 +246,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/launch/parse.py flumotion-0.9.1/flumotion/launch/parse.py --- flumotion-0.6.1/flumotion/launch/parse.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/launch/parse.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -26,11 +22,11 @@ import copy import sys -from flumotion.common import log, common, dag, registry +from flumotion.common import dag, registry from flumotion.manager import config __all__ = ['parse_args'] -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" def err(x): @@ -249,19 +245,96 @@ def parse_plug(arg): - plugargs = arg.split(',') - plug = plugargs.pop(0)[1:] - return plug, [parse_prop(arg) for arg in plugargs] + if ',' not in arg: + return arg[1:], [] + plugname, plugargs = arg.split(',', 1) + return plugname[1:], parse_props(plugargs) + + +def parse_props(props): + """ + Splits a property line respecting compound properties. + Ex: a1=[c1=d1,c2=[e1=[g1=h1],e2=f2]],a2=b2 + -> [("a1", [("c1", "d1"), + ("c2", [("e1", [("g1", "h1")]), + ("e2", "f2")])], + ("a2", "b2")] + """ + start = 0 + level = 0 + result = [] + for i, c in enumerate(props): + if c == '[': + level += 1 + continue + if c == ']': + level -= 1 + continue + if c == ',' and level == 0: + result.append(props[start:i]) + start = i + 1 + continue + if level == 0: + result.append(props[start:]) + else: + raise ValueError(props) + return [parse_prop(v) for v in result] def parse_prop(arg): + """ + Parses a property. + Supports compounds properties. + """ prop = arg[:arg.index('=')] val = arg[arg.index('=')+1:] if not prop or not val: err('Invalid property setting: %s' % arg) + if val[0] == '[' and val[-1] == ']': + val = parse_props(val[1:-1]) + else: + val = sloppy_unescape(val, "[]") return prop, val +def sloppy_unescape(value, escaped, escape='\\'): + """ + Permissively unescapes a string. + + Examples with \ as escape character, + E as escaped character and X as a non-escaped character: + X -> X + \E -> E + \\ -> \ + \X -> \X + X\ -> X\ + E\ -> E\ + \\\E -> \E + \\\X -> \\X + """ + res = [] + escaping = False + escaped = set(list(escaped)) + escaped.add(escape) + for char in value: + if escaping: + if char in escaped: + res.append(char) + escaping = False + continue + res.append(escape) + res.append(char) + escaping = False + continue + if char == escape: + escaping = True + continue + res.append(char) + if escaping: + res.append(escape) + return ''.join(res) + + def parse_arg(arg, components, linker): def assert_in_component(msg): diff -Nru flumotion-0.6.1/flumotion/Makefile.in flumotion-0.9.1/flumotion/Makefile.in --- flumotion-0.6.1/flumotion/Makefile.in 2009-09-09 11:37:52.000000000 +0000 +++ flumotion-0.9.1/flumotion/Makefile.in 2011-09-11 08:09:18.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -144,6 +143,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -153,18 +153,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -212,6 +205,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -229,16 +223,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -246,7 +242,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -261,6 +256,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -293,7 +289,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -443,7 +438,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -468,7 +463,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/flumotion/manager/admin.py flumotion-0.9.1/flumotion/manager/admin.py --- flumotion-0.6.1/flumotion/manager/admin.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/manager/admin.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_manager_admin -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -30,21 +26,21 @@ from twisted.internet import reactor from twisted.python import failure -from twisted.spread import pb from zope.interface import implements from flumotion.manager import base from flumotion.common import errors, interfaces, log, planet, registry, debug +from flumotion.common import common from flumotion.common.python import makedirs +from flumotion.monitor.nagios import util # make Result and Message proxyable from flumotion.common import messages # make ComponentState proxyable -from flumotion.twisted import flavors from flumotion.common import componentui -__version__ = "$Rev: 7981 $" +__version__ = "$Rev$" # FIXME: rename to Avatar since we are in the admin. namespace ? @@ -172,6 +168,87 @@ raise errors.RemoteMethodError(methodName, log.getExceptionMessage(e)) + def perspective_componentsList(self): + """ + List components in the planet. Returns a list of avatar ids. + """ + componentStates = self.vishnu.state.getComponents() + avatar_ids = [common.componentId(c.get('parent').get('name'), + c.get('name')) + for c in componentStates] + return avatar_ids + + def perspective_componentInvoke(self, avatarId, methodName, + *args, **kwargs): + """ + Call a remote method on the component. + + @param avatarId: the component avatar id + @type avatarId: str + @param methodName: name of the method to call + @type methodName: str + """ + component = util.findComponent(self.vishnu.state, avatarId) + if not component: + self.warning('No component with avatar id %s' % avatarId) + raise errors.UnknownComponentError(avatarId) + return self.perspective_componentCallRemote(component, methodName, + *args, **kwargs) + + def perspective_upstreamList(self, avatarId): + """ + List a component and its upstream components along with + types and worker hosts. + + @param avatarId: the component avatar id + @type avatarId: str + """ + + def get_eaters_ids(eaters_dic): + avatars = [] + for flow in eaters_dic.keys(): + comps = eaters_dic[flow] + for c in comps: + (name, what) = c[0].split(':') + avatars.append('/%s/%s' % (flow, name)) + return avatars + + def create_response(components, workers): + comps = [] + for c in components: + workerName = c.get('workerName') + host = "unknown" + for w in workers: + if workerName == w.get('name'): + host = w.get('host') + break + comps.append((c.get('name'), c.get('type'), host)) + return comps + + component = util.findComponent(self.vishnu.state, avatarId) + if not component: + self.warning('No component with avatar id %s' % avatarId) + raise errors.UnknownComponentError(avatarId) + + eaters = component.get('config').get('eater', {}) + eaters_id = get_eaters_ids(eaters) + comps = [component] + while len(eaters_id) > 0: + eaters = {} + for i in eaters_id: + try: + compState = util.findComponent(self.vishnu.state, i) + comps.append(compState) + eaters.update(compState.get('config').get('eater', {})) + except Exception, e: + self.debug(log.getExceptionMessage(e)) + emsg = "Error retrieving component '%s'" % i + raise errors.UnknownComponentError(emsg) + eaters_id = get_eaters_ids(eaters) + + workers = self.vishnu.workerHeaven.state.get('workers') + return create_response(comps, workers) + def perspective_workerCallRemote(self, workerName, methodName, *args, **kwargs): """ @@ -467,14 +544,14 @@ if wizard.type not in types: continue if provides is not None: - for format in wizard.provides: - if format.media_type in provides: + for formatProvided in wizard.provides: + if formatProvided.media_type in provides: break else: continue if accepts is not None: - for format in wizard.accepts: - if format.media_type in accepts: + for formatAccepted in wizard.accepts: + if formatAccepted.media_type in accepts: break else: continue @@ -504,6 +581,11 @@ return None return componentRegistryEntry + def perspective_invokeOnComponents(self, componentType, methodName, + *args, **kwargs): + return self.vishnu.invokeOnComponents(componentType, methodName, + *args, **kwargs) + class AdminHeaven(base.ManagerHeaven): """ diff -Nru flumotion-0.6.1/flumotion/manager/base.py flumotion-0.9.1/flumotion/manager/base.py --- flumotion-0.6.1/flumotion/manager/base.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/manager/base.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_manager_common -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -24,14 +20,14 @@ """ from twisted.internet import reactor, defer -from twisted.spread import pb, flavors -from twisted.python import failure, reflect +from twisted.spread import pb +from twisted.python import reflect -from flumotion.common import errors, interfaces, log, common +from flumotion.common import errors, log, common from flumotion.common.planet import moods from flumotion.twisted import pb as fpb -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class ManagerAvatar(fpb.PingableAvatar, log.Loggable): diff -Nru flumotion-0.6.1/flumotion/manager/component.py flumotion-0.9.1/flumotion/manager/component.py --- flumotion-0.6.1/flumotion/manager/component.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/manager/component.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_manager_component -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -25,23 +21,21 @@ API Stability: semi-stable """ -import time - -from twisted.spread import pb from twisted.internet import reactor, defer -from twisted.internet import error as terror from twisted.python.failure import Failure from zope.interface import implements -from flumotion.configure import configure from flumotion.manager import base, config -from flumotion.common import errors, interfaces, keycards, log, planet +from flumotion.common import errors, interfaces, log, planet from flumotion.common import messages, common + +# registers serializable +from flumotion.common import keycards + from flumotion.common.i18n import N_, gettexter from flumotion.common.planet import moods -from flumotion.twisted import flavors -__version__ = "$Rev: 7740 $" +__version__ = "$Rev$" T_ = gettexter() @@ -417,6 +411,16 @@ return self.mindCallRemote('feedTo', feederName, fullFeedId, host, port) + def modifyProperty(self, property_name, value): + """ + Tell the remote component to modify a property with a new value. + + @param property_name: The name of the property to change + @param value: The new value of the property + @rtype: L{twisted.internet.defer.Deferred} + """ + return self.mindCallRemote('modifyProperty', property_name, value) + # FIXME: maybe make a BouncerComponentAvatar subclass ? def authenticate(self, keycard): diff -Nru flumotion-0.6.1/flumotion/manager/config.py flumotion-0.9.1/flumotion/manager/config.py --- flumotion-0.6.1/flumotion/manager/config.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/manager/config.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,25 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ parsing of manager configuration files """ +import operator import warnings from flumotion.common import log, errors, common, registry @@ -30,7 +27,7 @@ from flumotion.common.xmlwriter import cmpComponentType, XMLWriter from flumotion.configure import configure -__version__ = "$Rev: 7669 $" +__version__ = "$Rev$" def _ignore(*args): @@ -285,13 +282,12 @@ return version elif isinstance(version, str): try: - - def parse(maj, min, mic, nan=0): - return maj, min, mic, nan - return parse(*map(int, version.split('.'))) + return common.versionStringToTuple(version) except: - raise errors.ConfigError(" version not parseable") - raise errors.ConfigError(" version not parseable") + raise errors.ConfigError( + " version %r not parseable" % version) + raise errors.ConfigError( + " version %r not parseable" % version) def _buildConfig(self, propertyList, plugsList, eatersList, isClockMaster, project, version, virtualFeeds): @@ -351,7 +347,14 @@ class ConfigEntryFlow: - "I represent a entry in a planet config file" + """ + I represent a entry in a planet config file. + + @ivar name: name of flow + @type name: str + @ivar components: dict of name -> component config + @type components: dict of str -> L{ConfigEntryComponent} + """ def __init__(self, name, components): self.name = name @@ -424,7 +427,7 @@ # ...* # * # - # F0.8 + # F0.10 # source tag is deprecated attrs = self.parseAttributes(node, ('name', 'type'), @@ -795,16 +798,9 @@ attrs = [('name', flow.get('name'))] self.pushTag('flow', attrs) - # FIXME: When we can depend on Python 2.4, use - # sorted(flow.get('components'), - # cmp=cmpComponentType, - # key=operator.attrgetter('type')) - # - - def componentSort(a, b): - return cmpComponentType(a.get('type'), b.get('type')) - components = list(flow.get('components')) - components.sort(cmp=componentSort) + components = sorted(flow.get('components'), + cmp=cmpComponentType, + key=operator.itemgetter('type')) for component in components: self._writeComponent(component) self.popTag() @@ -864,8 +860,7 @@ self.popTag() def _writePlug(self, plug, socket): - attrs = [('socket', socket), - ('type', plug['type'])] + attrs = [('type', plug['type'])] self.pushTag('plug', attrs) self._writeProperties(plug['properties'].items()) self.popTag() diff -Nru flumotion-0.6.1/flumotion/manager/__init__.py flumotion-0.9.1/flumotion/manager/__init__.py --- flumotion-0.6.1/flumotion/manager/__init__.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/manager/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ manager-side code """ -__version__ = "$Rev: 6125 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/manager/main.py flumotion-0.9.1/flumotion/manager/main.py --- flumotion-0.6.1/flumotion/manager/main.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/manager/main.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -35,7 +31,7 @@ from flumotion.common.process import startup from flumotion.configure import configure -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" defaultSSLPort = configure.defaultSSLManagerPort defaultTCPPort = configure.defaultTCPManagerPort diff -Nru flumotion-0.6.1/flumotion/manager/Makefile.in flumotion-0.9.1/flumotion/manager/Makefile.in --- flumotion-0.6.1/flumotion/manager/Makefile.in 2009-09-09 11:37:57.000000000 +0000 +++ flumotion-0.9.1/flumotion/manager/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -103,6 +102,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -112,18 +112,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -171,6 +164,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -188,16 +182,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -205,7 +201,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -220,6 +215,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -252,7 +248,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/manager/manager.py flumotion-0.9.1/flumotion/manager/manager.py --- flumotion-0.6.1/flumotion/manager/manager.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/manager/manager.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_manager_manager -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -33,25 +29,23 @@ import os from twisted.internet import reactor, defer -from twisted.python import components, failure from twisted.spread import pb from twisted.cred import portal from zope.interface import implements from flumotion.common import errors, interfaces, log, registry -from flumotion.common import planet, common, dag, messages, reflectcall, server +from flumotion.common import planet, common, messages, reflectcall, server from flumotion.common.i18n import N_, gettexter from flumotion.common.identity import RemoteIdentity, LocalIdentity from flumotion.common.netutils import addressGetHost from flumotion.common.planet import moods from flumotion.configure import configure from flumotion.manager import admin, component, worker, base, config -from flumotion.twisted import checkers from flumotion.twisted import portal as fportal from flumotion.project import project __all__ = ['ManagerServerFactory', 'Vishnu'] -__version__ = "$Rev: 7408 $" +__version__ = "$Rev$" T_ = gettexter() LOCAL_IDENTITY = LocalIdentity('manager') @@ -277,6 +271,9 @@ self.info("Registry changed, rebuilding") registry.getRegistry().verify(force=True) self.bundlerBasket = registry.getRegistry().makeBundlerBasket() + elif not self.bundlerBasket.isUptodate(registry.getRegistry().mtime): + self.info("BundlerBasket is older than the Registry, rebuilding") + self.bundlerBasket = registry.getRegistry().makeBundlerBasket() return self.bundlerBasket def addMessage(self, level, mid, format, *args, **kwargs): @@ -1013,6 +1010,12 @@ # called when a worker logs out workerId = workerAvatar.avatarId self.debug('vishnu.workerDetached(): id %s' % workerId) + # Get all sad components for the detached worker and set the mood to + # sleeping + sadComponents = list([c for c in self.getComponentStates() + if c.get('workerRequested') == workerId and \ + c.get('mood') == moods.sad.value]) + map(lambda c: c.setMood(moods.sleeping.value), sadComponents) def addComponentToFlow(self, componentState, flowName): # check if we have this flow yet and add if not @@ -1282,3 +1285,43 @@ return self._componentMappers[object].state return None + + def invokeOnComponents(self, componentType, methodName, *args, **kwargs): + """ + Invokes method on all components of a certain type + """ + + def invokeOnOneComponent(component, methodName, *args, **kwargs): + m = self.getComponentMapper(component) + if not m: + self.warning('Component %s not mapped. Maybe deleted.', + component.get('name')) + raise errors.UnknownComponentError(component) + + avatar = m.avatar + if not avatar: + self.warning('No avatar for %s, cannot call remote', + component.get('name')) + raise errors.SleepingComponentError(component) + + try: + return avatar.mindCallRemote(methodName, *args, **kwargs) + except Exception, e: + log_message = log.getExceptionMessage(e) + msg = "exception on remote call %s: %s" % (methodName, + log_message) + self.warning(msg) + raise errors.RemoteMethodError(methodName, + log_message) + + # only do this on happy or hungry components of type componentType + dl_array = [] + for c in self.getComponentStates(): + if c.get('type') == componentType and \ + (c.get('mood') is moods.happy.value or + c.get('mood') is moods.hungry.value): + self.info("component %r to have %s run", c, methodName) + d = invokeOnOneComponent(c, methodName, *args, **kwargs) + dl_array.append(d) + dl = defer.DeferredList(dl_array) + return dl diff -Nru flumotion-0.6.1/flumotion/manager/worker.py flumotion-0.9.1/flumotion/manager/worker.py --- flumotion-0.6.1/flumotion/manager/worker.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/manager/worker.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_manager_worker -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -26,11 +22,11 @@ from twisted.internet import defer from flumotion.manager import base -from flumotion.common import errors, interfaces, log, registry +from flumotion.common import errors, log, registry from flumotion.common import worker, common from flumotion.common.vfs import registerVFSJelly -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class WorkerAvatar(base.ManagerAvatar): diff -Nru flumotion-0.6.1/flumotion/monitor/__init__.py flumotion-0.9.1/flumotion/monitor/__init__.py --- flumotion-0.6.1/flumotion/monitor/__init__.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/monitor/Makefile.in flumotion-0.9.1/flumotion/monitor/Makefile.in --- flumotion-0.6.1/flumotion/monitor/Makefile.in 2009-09-09 11:37:57.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -141,6 +140,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -150,18 +150,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -209,6 +202,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -226,16 +220,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -243,7 +239,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -258,6 +253,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -290,7 +286,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -402,7 +397,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -427,7 +422,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/flumotion/monitor/nagios/component.py flumotion-0.9.1/flumotion/monitor/nagios/component.py --- flumotion-0.6.1/flumotion/monitor/nagios/component.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/nagios/component.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,212 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + + +from twisted.internet import reactor, defer + +from flumotion.common import planet, log +from flumotion.monitor.nagios import util + + +class Mood(util.LogCommand): + description = "Check the mood of a component." + usage = "[mood options] [component id]" + + def addOptions(self): + default = "hungry" + self.parser.add_option('-w', '--warning', + action="store", dest="warning", + help="moods to give a warning for (defaults to %s)" % (default), + default=default) + default = "sleeping,lost,sad" + self.parser.add_option('-c', '--critical', + action="store", dest="critical", + help="moods to give a critical for (defaults to %s)" % (default), + default=default) + + def handleOptions(self, options): + self._warning = options.warning.split(',') + self._critical = options.critical.split(',') + + def do(self, args): + if not args: + self.stderr.write( + 'Please specify a component to check the mood of.\n.') + return 3 + + self._component = args[0] + # call our callback after connecting + self.parentCommand.managerDeferred.addCallback(self._callback) + + def _callback(self, result): + d = self.parentCommand.adminModel.callRemote('getPlanetState') + + def gotPlanetStateCb(result): + self.debug('gotPlanetStateCb') + c = util.findComponent(result, self._component) + if not c: + return util.unknown('Could not find component %s' % + self._component) + + moodValue = c.get('mood') + moodName = planet.moods.get(moodValue).name + + if moodName in self._critical: + return util.critical('Component %s is %s' % (self._component, + moodName)) + + if moodName in self._warning: + return util.warning('Component %s is %s' % (self._component, + moodName)) + + return util.ok('Component %s is %s' % (self._component, + moodName)) + + d.addCallback(gotPlanetStateCb) + d.addCallback(lambda e: setattr(reactor, 'exitStatus', e)) + return d + + +class FlipFlopDetector(object): + + def __init__(self, timeout, flipflops, mood_a, mood_b, state): + self.timeout = timeout + self.flipflops = flipflops + self.mood_a = mood_a + self.mood_b = mood_b + self.state = state + + self.cancel = None + self.flip_count = 0 + if state.get('mood') == self.mood_a: + self.current_state = self.mood_a + else: + self.current_state = None + self.waiting_d = defer.Deferred() + + def wait(self): + return self.waiting_d + + def start(self): + self.state.addListener(self, set_=self.state_set) + self.cancel = reactor.callLater(self.timeout, + self.success) + + def state_set(self, cs, key, value): + if key != 'mood': + return + + # the first time it goes to mood_a is not treated as a flip + if value == self.mood_a and self.current_state is None: + self.current_state = value + return + + # mood_a -> mood_b and mood_a -> mood_b transitions are flips + if (self.current_state, value) in ((self.mood_a, self.mood_b), + (self.mood_b, self.mood_a)): + self.current_state = value + self.flip_count += 1 + + if self.flip_count >= self.flipflops: + self.failure() + + def success(self): + self.state.removeListener(self) + s = '' + if self.flip_count != 1: + s = 's' + self.waiting_d.callback("%d mood change%s detected" % + (self.flip_count, s)) + + def failure(self): + self.state.removeListener(self) + if self.cancel: + self.cancel.cancel() + s = '' + if self.flip_count != 1: + s = 's' + self.waiting_d.errback(Exception("%d mood change%s detected" % + (self.flip_count, s))) + + +class FlipFlop(util.LogCommand): + """ + This check connects to the manager and watches the state of a component for + a given amout of time. Raises a critical if the mood alternates between two + extremes (by default: happy and hungry) more than the given number of + times. + """ + + description = "Check if the mood of a component is flipflopping." + + def addOptions(self): + self.parser.add_option('-i', '--component-id', + action="store", + help="component id of the component") + self.parser.add_option('-t', '--timeout', type="int", + action="store", default=15, + help="how long to test for flopflops") + self.parser.add_option('-f', '--flipflops', type="int", + action="store", default=2, + help=("how many mood changes should " + "be considered a flipflop")) + self.parser.add_option('-a', '--mood-a', + action="store", default="happy", + help=("the initial mood of the flipflop")) + self.parser.add_option('-b', '--mood-b', + action="store", default="hungry", + help=("the final mood of the flipflop")) + + def handleOptions(self, options): + if not options.component_id: + raise util.NagiosUnknown("Please specify a component id " + "with '-i [component-id]'") + + try: + self.mood_a = getattr(planet.moods, options.mood_a).value + except AttributeError: + raise util.NagiosUnknown("Invalid mood name '%s'" % options.mood_a) + try: + self.mood_b = getattr(planet.moods, options.mood_b).value + except AttributeError: + raise util.NagiosUnknown("Invalid mood name '%s'" % options.mood_b) + + self.component_id = options.component_id + self.timeout = options.timeout + self.flipflops = options.flipflops + + def do(self, args): + self.parentCommand.managerDeferred.addCallback(self._get_planet_state) + self.parentCommand.managerDeferred.addCallback(self._got_planet_state) + + def _get_planet_state(self, _): + return self.parentCommand.adminModel.callRemote('getPlanetState') + + def _got_planet_state(self, planet_state): + c = util.findComponent(planet_state, self.component_id) + if not c: + return util.unknown('Could not find component %s' % + self.component_id) + return self._detect_flipflops(c) + + def _detect_flipflops(self, component_state): + f = FlipFlopDetector(self.timeout, self.flipflops, self.mood_a, + self.mood_b, component_state) + f.start() + d = f.wait() + return d.addCallbacks(util.ok, lambda f: + util.critical(f.getErrorMessage())) diff -Nru flumotion-0.6.1/flumotion/monitor/nagios/__init__.py flumotion-0.9.1/flumotion/monitor/nagios/__init__.py --- flumotion-0.6.1/flumotion/monitor/nagios/__init__.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/nagios/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,18 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/monitor/nagios/log.py flumotion-0.9.1/flumotion/monitor/nagios/log.py --- flumotion-0.6.1/flumotion/monitor/nagios/log.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/nagios/log.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,16 +1,25 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + + import commands import time -# F0.8 -# makes for an easier backport to platform-3 -try: - from flumotion.common.format import formatTime -except ImportError: - from flumotion.common.common import formatTime - +from flumotion.common import format as formatting from flumotion.monitor.nagios import util __version__ = "$Rev: 6687 $" @@ -95,7 +104,7 @@ msg = 'Last log line%s is %s old.' % ( self.options.string and " with '%s'" % self.options.string or '', - formatTime(delta, fractional=2)) + formatting.formatTime(delta, fractional=2)) if delta > int(self.options.critical): return util.critical(msg) elif delta > int(self.options.warning): diff -Nru flumotion-0.6.1/flumotion/monitor/nagios/main.py flumotion-0.9.1/flumotion/monitor/nagios/main.py --- flumotion-0.6.1/flumotion/monitor/nagios/main.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/nagios/main.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -26,73 +22,21 @@ import sys from twisted.internet import reactor, defer +from twisted.internet.defer import failure -from flumotion.common import common, errors, planet, log -from flumotion.admin.connections import parsePBConnectionInfoRecent +from flumotion.common import common, errors, log from flumotion.admin import admin -from flumotion.monitor.nagios import util, process, stream, log as nlog +# registers serializables +from flumotion.common import planet -__version__ = "$Rev: 7822 $" +from flumotion.monitor.nagios import util, process, stream, component +from flumotion.monitor.nagios import log as nlog +from flumotion.admin.connections import parsePBConnectionInfoRecent -class Mood(util.LogCommand): - description = "Check the mood of a component." - usage = "[mood options] [component id]" - - def addOptions(self): - default = "hungry" - self.parser.add_option('-w', '--warning', - action="store", dest="warning", - help="moods to give a warning for (defaults to %s)" % (default), - default=default) - default = "sleeping,lost,sad" - self.parser.add_option('-c', '--critical', - action="store", dest="critical", - help="moods to give a critical for (defaults to %s)" % (default), - default=default) - - def handleOptions(self, options): - self._warning = options.warning.split(',') - self._critical = options.critical.split(',') +__version__ = "$Rev$" - def do(self, args): - if not args: - self.stderr.write( - 'Please specify a component to check the mood of.\n.') - return 3 - - self._component = args[0] - # call our callback after connecting - self.parentCommand.managerDeferred.addCallback(self._callback) - - def _callback(self, result): - d = self.parentCommand.adminModel.callRemote('getPlanetState') - - def gotPlanetStateCb(result): - self.debug('gotPlanetStateCb') - c = util.findComponent(result, self._component) - if not c: - return util.unknown('Could not find component %s' % - self._component) - - moodValue = c.get('mood') - moodName = planet.moods.get(moodValue).name - - if moodName in self._critical: - return util.critical('Component %s is %s' % (self._component, - moodName)) - - if moodName in self._warning: - return util.warning('Component %s is %s' % (self._component, - moodName)) - - return util.ok('Component %s is %s' % (self._component, - moodName)) - - d.addCallback(gotPlanetStateCb) - d.addCallback(lambda e: setattr(reactor, 'exitStatus', e)) - return d # Because we run a reactor and use deferreds, the flow is slightly different # from the usual Command flow. @@ -117,7 +61,7 @@ managerDeferred = None # deferred that fires upon connection adminModel = None # AdminModel connected to the manager - subCommandClasses = [Mood, ] + subCommandClasses = [component.Mood, component.FlipFlop] def addOptions(self): default = "user:test@localhost:7531" @@ -163,12 +107,12 @@ self.debug('parse: cb: done') reactor.callLater(0, reactor.stop) - def eb(failure): + def eb(f): self.debug( - 'parse: eb: failure %s' % log.getFailureMessage(failure)) + 'parse: eb: failure %s' % log.getFailureMessage(f)) # Nagios exceptions have already got their feedback covered - if not failure.check(util.NagiosException): - util.unknown(log.getFailureMessage(failure)) + if not f.check(util.NagiosException): + util.unknown(log.getFailureMessage(f)) reactor.callLater(0, reactor.stop) self.managerDeferred.addCallback(cb) self.managerDeferred.addErrback(eb) @@ -225,12 +169,19 @@ self.debug('Connected to manager.') self.managerDeferred.callback(result) - def _connectedEb(self, failure): - if failure.check(errors.ConnectionFailedError): - util.unknown("Unable to connect to manager.") - if failure.check(errors.ConnectionRefusedError): - util.critical("Manager refused connection.") - self.managerDeferred.errback(failure) + def _connectedEb(self, f): + if f.check(errors.ConnectionFailedError): + # switch the failure and return an UNKNOWN status + msg = "Unable to connect to manager." + f = failure.Failure(util.NagiosUnknown(msg)) + util.unknown(msg) + if f.check(errors.ConnectionRefusedError): + # switch the failure and return a CRITICAL status + msg = "Manager refused connection." + f = failure.Failure(util.NagiosCritical(msg)) + util.critical(msg) + # all other failures get forwarded to the managerDeferred errback as-is + self.managerDeferred.errback(f) class Stream(util.LogCommand): diff -Nru flumotion-0.6.1/flumotion/monitor/nagios/Makefile.am flumotion-0.9.1/flumotion/monitor/nagios/Makefile.am --- flumotion-0.6.1/flumotion/monitor/nagios/Makefile.am 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/nagios/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -8,7 +8,8 @@ util.py \ main.py \ process.py \ - stream.py + stream.py \ + component.py TAGS_FILES = $(flumotion_PYTHON) ETAGS_ARGS = --lang=python $(flumotion_PYTHON) diff -Nru flumotion-0.6.1/flumotion/monitor/nagios/Makefile.in flumotion-0.9.1/flumotion/monitor/nagios/Makefile.in --- flumotion-0.6.1/flumotion/monitor/nagios/Makefile.in 2009-09-09 11:37:57.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/nagios/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -103,6 +102,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -112,18 +112,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -171,6 +164,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -188,16 +182,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -205,7 +201,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -220,6 +215,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -252,7 +248,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -279,7 +274,8 @@ util.py \ main.py \ process.py \ - stream.py + stream.py \ + component.py TAGS_FILES = $(flumotion_PYTHON) ETAGS_ARGS = --lang=python $(flumotion_PYTHON) diff -Nru flumotion-0.6.1/flumotion/monitor/nagios/process.py flumotion-0.9.1/flumotion/monitor/nagios/process.py --- flumotion-0.6.1/flumotion/monitor/nagios/process.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/nagios/process.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,15 +1,24 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -import os +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + -# F0.8 -# makes for an easier backport to platform-3 -try: - from flumotion.common.format import formatStorage -except ImportError: - from flumotion.common.common import formatStorage +import os +from flumotion.common import format as formatting from flumotion.monitor.nagios import util __version__ = "$Rev: 6687 $" @@ -183,7 +192,7 @@ """ Given a size string, convert to an int in base unit. suffixes are interpreted in SI, as multiples of 1000, not 1024. - Opposite of L{flumotion.common.format.formatStorage} + Opposite of L{flumotion.common.formatting.formatStorage} @rtype: int """ @@ -299,18 +308,20 @@ which = [t for t in l if t[1] >= critical] return util.critical( '%d %s(s) above critical level - highest is %d at %s' % ( - len(which), self.process_type, pid, formatStorage(vsize))) + len(which), self.process_type, pid, + formatting.formatStorage(vsize))) if vsize >= warning: # count number of warning jobs which = [t for t in l if t[1] >= warning] return util.warning( '%d %s(s) above warning level - highest is %d at %s' % ( - len(which), self.process_type, pid, formatStorage(vsize))) + len(which), self.process_type, pid, + formatting.formatStorage(vsize))) return util.ok('No %s processes above warning level ' - '(highest is %d at %s)' % (self.process_type, pid, - formatStorage(vsize))) + '(highest is %d at %s)' % ( + self.process_type, pid, formatting.formatStorage(vsize))) class JobVSize(ProcessVSize): diff -Nru flumotion-0.6.1/flumotion/monitor/nagios/stream.py flumotion-0.9.1/flumotion/monitor/nagios/stream.py --- flumotion-0.6.1/flumotion/monitor/nagios/stream.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/nagios/stream.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -31,6 +27,7 @@ import datetime import urlparse import urllib2 +import cookielib import gst import gobject @@ -57,6 +54,8 @@ 'audiodepth': 'audio_depth', 'audiomimetype': 'audio_mime'} +jar = cookielib.FileCookieJar("cookies") + def gen_timed_link(relative_path, secret_key, timeout, type): start_time = '%08x' % (time.time() - 10) @@ -69,9 +68,15 @@ return '%s%s%s' % (hashed, start_time, stop_time) +def urlOpenWithCookies(url): + opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(jar)) + r = opener.open(url) + return r + + def getURLFromPlaylist(url): try: - playlist = urllib2.urlopen(url) + playlist = urlOpenWithCookies(url) except urllib2.URLError, e: raise util.NagiosCritical(e) @@ -98,7 +103,6 @@ self.model = None self._path = '' self._tmpfile = '' - self.token = '' util.LogCommand.__init__(self, parentCommand, **kwargs) def handleOptions(self, options): @@ -195,6 +199,8 @@ (fd, self._tmpfile) = tempfile.mkstemp( suffix='.flumotion-nagios.%s-%s' % ( datetime.datetime.now().strftime('%Y%m%dT%H%M%S'), slug)) + # make the dump file group readable + os.chmod(self._tmpfile, 0640) if self.options.bouncer: # Check for a valid IPv4 address with numbers and dots @@ -209,14 +215,6 @@ if reactor.exitStatus != 0: sys.exit(reactor.exitStatus) - # Simple playlist detection - if not self.options.playlist and self._url[-3:] in PLAYLIST_SUFFIX: - self._url = getURLFromPlaylist(self._url) - self.options.playlist = True - # If it is a playlist, take the correct URL - elif self.options.playlist: - self._url = getURLFromPlaylist(self._url) - # Determine if this stream would have audio/video if self.options.videowidth or self.options.videoheight or \ self.options.videoframerate or self.options.videopar or \ @@ -227,11 +225,37 @@ self.options.audiomimetype: self._expectAudio = True - # Add token only if we need it - if self.token: - self._url += '?token=%s' % self.token + # Simple playlist detection + p = urlparse.urlparse(self._url) + (tmpfd, tmpPath) = tempfile.mkstemp() + tmp = os.fdopen(tmpfd, 'wb') + if p[2][-4:] == "m3u8": + self._url = getURLFromPlaylist(self._url) + p = urlparse.urlparse(self._url) + if p[2][-4:] == "m3u8": + self._url = getURLFromPlaylist(self._url) + self.options.playlist = True + try: + segment = urlOpenWithCookies(self._url) + except urllib2.HTTPError, e: + # For fragmented streams, a 404 is not critical + if e.code == 404: + return self.warning("Fetching segment returned " + "\"%s\". The stream might be out of sync." % e) + raise + c = segment.read() + tmp.write(c) + tmp.close() + self._url = "file://%s" % (tmpPath, ) + elif not self.options.playlist and self._url[-3:] in PLAYLIST_SUFFIX: + self._url = getURLFromPlaylist(self._url) + self.options.playlist = True + # If it is a playlist, take the correct URL + elif self.options.playlist: + self._url = getURLFromPlaylist(self._url) result = self.checkStream() + os.unlink(tmpPath) return result def checkStream(self): @@ -275,6 +299,10 @@ return util.critical('%s: %s [dump at %s]' % (self._url, message, self._tmpfile)) + def warning(self, message): + os.remove(self._tmpfile) + return util.warning('%s: %s' % (self._url, message)) + def ok(self, message): # remove tempfile with the stream if all goes ok os.remove(self._tmpfile) @@ -376,24 +404,14 @@ error = None def __init__(self, uri, options, tmpfile): - # it's fine to not have any of them and then have pipeline parsing - # fail trying to use the last option - for factory in ['gnomevfssrc', 'neonhttpsrc', 'souphttpsrc']: - try: - gst.element_factory_make(factory) - break - except gst.PluginNotFoundError: - pass - PIPELINE = '%s name=input ! tee name = t ! \ + PIPELINE = '%s ! tee name = t ! \ queue ! decodebin name=dbin t. ! \ - queue ! filesink location=%s' % (factory, tmpfile) + queue ! filesink location=%s' % (uri, tmpfile) if options.timeout: gobject.timeout_add(int(options.timeout) * 1000, self.timedOut) self.mainloop = gobject.MainLoop() self.pipeline = gst.parse_launch(PIPELINE) - self.input = self.pipeline.get_by_name('input') - self.input.props.location = uri self.dbin = self.pipeline.get_by_name('dbin') self.bus = self.pipeline.get_bus() self.bus.add_watch(self.onBusMessage) diff -Nru flumotion-0.6.1/flumotion/monitor/nagios/util.py flumotion-0.9.1/flumotion/monitor/nagios/util.py --- flumotion-0.6.1/flumotion/monitor/nagios/util.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/monitor/nagios/util.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -30,7 +26,7 @@ from flumotion.common import common, log from flumotion.extern.command import command -__version__ = "$Rev: 7404 $" +__version__ = "$Rev$" class LogCommand(command.Command, log.Loggable): diff -Nru flumotion-0.6.1/flumotion/project/__init__.py flumotion-0.9.1/flumotion/project/__init__.py --- flumotion-0.6.1/flumotion/project/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/project/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/project/Makefile.in flumotion-0.9.1/flumotion/project/Makefile.in --- flumotion-0.6.1/flumotion/project/Makefile.in 2009-09-09 11:37:57.000000000 +0000 +++ flumotion-0.9.1/flumotion/project/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,14 +45,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -105,6 +104,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -114,18 +114,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -173,6 +166,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -190,16 +184,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -207,7 +203,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -222,6 +217,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -254,7 +250,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/project/project.py flumotion-0.9.1/flumotion/project/project.py --- flumotion-0.6.1/flumotion/project/project.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/project/project.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -27,7 +23,7 @@ import flumotion.project -__version__ = "$Rev: 7986 $" +__version__ = "$Rev$" def list(): diff -Nru flumotion-0.6.1/flumotion/scenario/__init__.py flumotion-0.9.1/flumotion/scenario/__init__.py --- flumotion-0.6.1/flumotion/scenario/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ diff -Nru flumotion-0.6.1/flumotion/scenario/live/__init__.py flumotion-0.9.1/flumotion/scenario/live/__init__.py --- flumotion-0.6.1/flumotion/scenario/live/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/live/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ diff -Nru flumotion-0.6.1/flumotion/scenario/live/Makefile.in flumotion-0.9.1/flumotion/scenario/live/Makefile.in --- flumotion-0.6.1/flumotion/scenario/live/Makefile.in 2009-09-09 11:37:58.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/live/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/scenario/live/wizard_gtk.py flumotion-0.9.1/flumotion/scenario/live/wizard_gtk.py --- flumotion-0.6.1/flumotion/scenario/live/wizard_gtk.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/live/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. @@ -26,11 +22,12 @@ from flumotion.admin.assistant.interfaces import IScenarioAssistantPlugin from flumotion.admin.gtk.basesteps import ConsumerStep -from flumotion.scenario.steps.productionsteps import SelectProducersStep +from flumotion.scenario.steps.productionsteps import SelectProducersStep, \ + LiveProductionStep from flumotion.scenario.steps.consumptionsteps import ConsumptionStep -from flumotion.scenario.steps.conversionsteps import ConversionStep +from flumotion.scenario.steps.conversionsteps import ConversionStep, \ + SelectFormatStep from flumotion.scenario.steps.licensestep import LicenseStep -from flumotion.scenario.steps.productionsteps import LiveProductionStep from flumotion.scenario.steps.summarysteps import LiveSummaryStep _ = gettext.gettext @@ -53,7 +50,7 @@ self._mode = 'normal' self._videoEncoder = None self._audioEncoder = None - self._muxerEntry = None + self._muxer = None # IScenarioAssistantPlugin @@ -63,9 +60,13 @@ elif self._mode == 'addformat': self._selectProducerStep = SelectProducersStep(wizard) wizard.addStepSection(self._selectProducerStep) - - wizard.addStepSection(ConversionStep) - wizard.addStepSection(ConsumptionStep) + elif self._mode == 'addstreamer': + self._selectFormatStep = SelectFormatStep(wizard) + wizard.addStepSection(self._selectFormatStep) + + if self._mode != 'addstreamer': + wizard.addStepSection(ConversionStep) + wizard.addStepSection(ConsumptionStep) if self._mode == 'normal': wizard.addStepSection(LicenseStep) @@ -87,9 +88,10 @@ encodingStep = wizard.getStep('Encoding') saver.setAudioEncoder(self.getAudioEncoder()) saver.setVideoEncoder(self.getVideoEncoder()) - saver.setMuxer(encodingStep.getMuxerType(), encodingStep.worker) - - consumptionStep = wizard.getStep('Consumption') + if self._muxer: + saver.addMuxer(self._muxer.type, self._muxer) + else: + saver.setMuxer(encodingStep.getMuxerType(), encodingStep.worker) httpPorters = wizard.getHTTPPorters() steps = list(self._getConsumptionSteps(wizard)) @@ -97,7 +99,7 @@ for step in steps: consumerType = step.getConsumerType() consumer = step.getConsumerModel() - if consumer.componentType == 'http-streamer': + if consumer.requiresPorter: porter = self._obtainPorter(httpPorters, consumer.getPorter()) if porter not in httpPorters: @@ -119,7 +121,7 @@ return self._defaultConsumer.name def setMode(self, mode): - if not mode in ['normal', 'addformat']: + if not mode in ['normal', 'addformat', 'addstreamer']: raise ValueError() self._mode = mode @@ -145,6 +147,9 @@ @returns: producer or None @rtype: L{flumotion.admin.assistant.models.AudioProducer} """ + if not wizard.hasStep('Production'): + return None + productionStep = wizard.getStep('Production') return productionStep.getAudioProducer() @@ -153,6 +158,9 @@ @returns: producer or None @rtype: L{flumotion.admin.assistant.models.VideoProducer} """ + if not wizard.hasStep('Production'): + return None + productionStep = wizard.getStep('Production') return productionStep.getVideoProducer() @@ -184,17 +192,8 @@ """ self._audioEncoder = audioEncoder - def setMuxerEntry(self, muxerEntry): - """Select a muxer entry - @param audioEncoder: muxer entry - """ - self._muxerEntry = muxerEntry - - def getMuxerEntry(self): - """Returns the muxer entry - @returns: the muxer entry - """ - return self._muxerEntry + def setExistingMuxer(self, muxer): + self._muxer = muxer def setAudioProducers(self, audioProducers): self._selectProducerStep.setAudioProducers(audioProducers) @@ -202,6 +201,9 @@ def setVideoProducers(self, videoProducers): self._selectProducerStep.setVideoProducers(videoProducers) + def setMuxers(self, muxers): + self._selectFormatStep.setMuxers(muxers) + # Private def _getConsumptionSteps(self, wizard): diff -Nru flumotion-0.6.1/flumotion/scenario/loadflow/__init__.py flumotion-0.9.1/flumotion/scenario/loadflow/__init__.py --- flumotion-0.6.1/flumotion/scenario/loadflow/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/loadflow/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,22 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +""" +code for the existing configuration scenario. +""" + +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/scenario/loadflow/loadflow.xml flumotion-0.9.1/flumotion/scenario/loadflow/loadflow.xml --- flumotion-0.6.1/flumotion/scenario/loadflow/loadflow.xml 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/loadflow/loadflow.xml 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + diff -Nru flumotion-0.6.1/flumotion/scenario/loadflow/Makefile.am flumotion-0.9.1/flumotion/scenario/loadflow/Makefile.am --- flumotion-0.6.1/flumotion/scenario/loadflow/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/loadflow/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,16 @@ +include $(top_srcdir)/common/python.mk + +componentdir = $(libdir)/flumotion/python/flumotion/scenario/loadflow +component_PYTHON = \ + __init__.py \ + wizard_gtk.py + +component_DATA = \ + loadflow.xml + +TAGS_FILES = $(component_PYTHON) + +clean-local: + rm -rf *.pyc *.pyo + +EXTRA_DIST = $(component_DATA) diff -Nru flumotion-0.6.1/flumotion/scenario/loadflow/Makefile.in flumotion-0.9.1/flumotion/scenario/loadflow/Makefile.in --- flumotion-0.6.1/flumotion/scenario/loadflow/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/loadflow/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -0,0 +1,544 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# py_compile = $(top_srcdir)/common/py-compile-destdir --destdir $(DESTDIR) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(component_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common/python.mk +subdir = flumotion/scenario/loadflow +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/common/as-ac-expand.m4 \ + $(top_srcdir)/common/as-libtool-tags.m4 \ + $(top_srcdir)/common/as-python.m4 \ + $(top_srcdir)/common/as-version.m4 \ + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(componentdir)" \ + "$(DESTDIR)$(componentdir)" +py_compile = $(top_srcdir)/py-compile +DATA = $(component_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BINDIR = @BINDIR@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CORTADO_PREFIX = @CORTADO_PREFIX@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EPYDOC = @EPYDOC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GST_010_REQ = @GST_010_REQ@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_ICONV = @INTLTOOL_ICONV@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ +INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALSTATEDIR = @LOCALSTATEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ +PYCHECKER = @PYCHECKER@ +PYGST_010_REQ = @PYGST_010_REQ@ +PYGTK_010_REQ = @PYGTK_010_REQ@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SBINDIR = @SBINDIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSCONFDIR = @SYSCONFDIR@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XVFB = @XVFB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +componentdir = $(libdir)/flumotion/python/flumotion/scenario/loadflow +component_PYTHON = \ + __init__.py \ + wizard_gtk.py + +component_DATA = \ + loadflow.xml + +TAGS_FILES = $(component_PYTHON) +EXTRA_DIST = $(component_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/python.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flumotion/scenario/loadflow/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu flumotion/scenario/loadflow/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-componentPYTHON: $(component_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_PYTHON)'; dlist=; list2=; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(componentdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(componentdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-componentPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(component_PYTHON)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$fileso +install-componentDATA: $(component_DATA) + @$(NORMAL_INSTALL) + test -z "$(componentdir)" || $(MKDIR_P) "$(DESTDIR)$(componentdir)" + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(componentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(componentdir)" || exit $$?; \ + done + +uninstall-componentDATA: + @$(NORMAL_UNINSTALL) + @list='$(component_DATA)'; test -n "$(componentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(componentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(componentdir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(componentdir)" "$(DESTDIR)$(componentdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-componentDATA install-componentPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-componentDATA uninstall-componentPYTHON + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-componentDATA install-componentPYTHON \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-componentDATA uninstall-componentPYTHON + + +#if HAVE_PYCHECKER +#check-local: $(PYCHECKER_FILES) +# if test ! -z "$(PYCHECKER_FILES)"; \ +# then \ +# PYTHONPATH=$(top_srcdir):$(top_builddir) \ +# pychecker -Q -F $(top_srcdir)/misc/pycheckerrc \ +# $(PYCHECKER_FILES); \ +# fi +#endif + +clean-local: + rm -rf *.pyc *.pyo + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru flumotion-0.6.1/flumotion/scenario/loadflow/wizard_gtk.py flumotion-0.9.1/flumotion/scenario/loadflow/wizard_gtk.py --- flumotion-0.6.1/flumotion/scenario/loadflow/wizard_gtk.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/loadflow/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,48 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gettext + +from zope.interface import implements + +from flumotion.admin.assistant.interfaces import IScenarioAssistantPlugin +from flumotion.scenario.steps.loadflowstep import LoadFlowStep +from flumotion.scenario.steps.summarysteps import LiveSummaryStep + +_ = gettext.gettext + + +class LoadFlowAssistantPlugin(object): + implements(IScenarioAssistantPlugin) + short = _("Load flow") + description = _( + """Allows you to load an existing flow file to set up a flow. + """) + + # IScenarioAssistantPlugin + + def addSteps(self, wizard): + wizard.addStepSection(LoadFlowStep) + wizard.addStepSection(LiveSummaryStep) + + def save(self, wizard, saver): + step = wizard.getStep('LoadFlow') + xmlFile = step.getFlowFilename() + saver.setFlowFile(xmlFile) + + def getSelectComponentName(self): + return None diff -Nru flumotion-0.6.1/flumotion/scenario/Makefile.am flumotion-0.9.1/flumotion/scenario/Makefile.am --- flumotion-0.6.1/flumotion/scenario/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -14,6 +14,7 @@ SUBDIRS = \ live \ + loadflow \ ondemand \ steps diff -Nru flumotion-0.6.1/flumotion/scenario/Makefile.in flumotion-0.9.1/flumotion/scenario/Makefile.in --- flumotion-0.6.1/flumotion/scenario/Makefile.in 2009-09-09 11:37:57.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/Makefile.in 2011-09-11 08:09:23.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -144,6 +143,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -153,18 +153,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -212,6 +205,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -229,16 +223,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -246,7 +242,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -261,6 +256,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -293,7 +289,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -323,6 +318,7 @@ TAGS_FILES = $(component_PYTHON) SUBDIRS = \ live \ + loadflow \ ondemand \ steps @@ -432,7 +428,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -457,7 +453,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/flumotion/scenario/ondemand/__init__.py flumotion-0.9.1/flumotion/scenario/ondemand/__init__.py --- flumotion-0.6.1/flumotion/scenario/ondemand/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/ondemand/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ diff -Nru flumotion-0.6.1/flumotion/scenario/ondemand/Makefile.in flumotion-0.9.1/flumotion/scenario/ondemand/Makefile.in --- flumotion-0.6.1/flumotion/scenario/ondemand/Makefile.in 2009-09-09 11:37:58.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/ondemand/Makefile.in 2011-09-11 08:09:24.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/scenario/ondemand/wizard_gtk.py flumotion-0.9.1/flumotion/scenario/ondemand/wizard_gtk.py --- flumotion-0.6.1/flumotion/scenario/ondemand/wizard_gtk.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/ondemand/wizard_gtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -47,8 +43,36 @@ def save(self, wizard, saver): ondemandStep = wizard.getStep('Demand') consumer = ondemandStep.getServerConsumer() + httpPorters = wizard.getHTTPPorters() + porter = self._obtainPorter(httpPorters, consumer.getPorter()) + if porter not in httpPorters: + saver.addPorter(porter, 'http') + httpPorters.append(porter) + consumer.setPorter(porter) saver.addServerConsumer(consumer, 'ondemand') self._consumer = consumer def getSelectComponentName(self): return self._consumer.name + + def _obtainPorter(self, actualPorters, consumerPorter): + """ + Looks if the consumerPorter has been already created and is inside + the actualPorters list. If it is so, we return the existent porter, + otherwise we return the consumerPorter. + + @param actualPorters : list of already exsisting porters. + @type actualPorters : list of L{flumotion.assistant.models.Porter} + @param consumerPorter: porter model created by the consumer. + @type consumerPorter: L{flumotion.assistant.models.Porter} + + @rtype : L{flumotion.assistant.models.Porter} + """ + for porter in actualPorters: + p1 = porter.getProperties() + p2 = consumerPorter.getProperties() + + if p1.port == p2.port and porter.worker == consumerPorter.worker: + return porter + + return consumerPorter diff -Nru flumotion-0.6.1/flumotion/scenario/steps/consumptionsteps.py flumotion-0.9.1/flumotion/scenario/steps/consumptionsteps.py --- flumotion-0.6.1/flumotion/scenario/steps/consumptionsteps.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/consumptionsteps.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,41 +1,38 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext -from flumotion.admin.assistant.models import Porter +import gtk + from flumotion.admin.gtk.workerstep import WorkerWizardStep +from flumotion.common.i18n import N_ from flumotion.common.python import any as pany +from flumotion.common.errors import NoBundleError from flumotion.configure import configure -from flumotion.scenario.steps.httpstreamersteps import HTTPBothStep, \ - HTTPAudioStep, HTTPVideoStep -from flumotion.scenario.steps.diskersteps import DiskBothStep, DiskAudioStep, \ - DiskVideoStep -from flumotion.scenario.steps.shout2steps import Shout2BothStep, \ - Shout2AudioStep, Shout2VideoStep from flumotion.ui.wizard import WizardStep -__version__ = "$Rev: 7749 $" +__version__ = "$Rev$" _ = gettext.gettext +CONSUMER_BOTH = [('audio-video', _('Audio & Video'))] +CONSUMER_VIDEO = [('video', _('Video only'))] +CONSUMER_AUDIO = [('audio', _('Audio only'))] + class ConsumptionStep(WizardStep): name = 'Consumption' @@ -49,160 +46,143 @@ # WizardStep - def activated(self): + def setup(self): hasAudio = self.wizard.getScenario().hasAudio(self.wizard) hasVideo = self.wizard.getScenario().hasVideo(self.wizard) - hasBoth = hasAudio and hasVideo + self._hasBoth = hasAudio and hasVideo - possibleButtons = [self.http_audio_video, - self.http_audio, - self.http_video, - self.disk_audio_video, - self.disk_audio, - self.disk_video, - ] - shoutButtons = [self.shout2_audio_video, - self.shout2_audio, - self.shout2_video] + self._buttons = {} + self._consumerTypes = [] + self._stepsGen = None + self._steplist = [] + if self._hasBoth: + self._consumers = CONSUMER_BOTH + CONSUMER_VIDEO + CONSUMER_AUDIO + elif hasAudio: + self._consumers = CONSUMER_AUDIO + elif hasVideo: + self._consumers = CONSUMER_VIDEO - if self._canEmbedShout(): - possibleButtons.extend(shoutButtons) - else: - self.shout2.set_active(False) - self.shout2.hide() - for button in shoutButtons: - button.hide() - - # Hide all checkbuttons if we don't have both audio and video selected - for checkbutton in possibleButtons: - checkbutton.set_property('visible', hasBoth) + self._populateField() + + def _gotEntries(self, entries): + encodingStep = self.wizard.getStep('Encoding') + format = encodingStep.getMuxerFormat() + entries = filter(lambda entry: (len(entry.getAcceptedMediaTypes()) == 0 + or format in entry.getAcceptedMediaTypes()), + entries) + entries.sort(key=lambda entry: entry.getRank(), reverse=True) + + for entry in entries: + hbox = gtk.HBox() + vbox = gtk.VBox() + for type, desc in self._consumers: + consumer = "%s-%s" % (entry.componentType, type) + self._packButtonToBox(vbox, consumer, desc) + self._buttons[consumer].set_sensitive(False) + + hbox.pack_start(vbox, padding=24) + + vbox = gtk.VBox() + self._packButtonToBox(vbox, entry.componentType, + _(entry.description)) + self._consumerTypes.append(entry.componentType) + + vbox.pack_start(hbox) + self.consumers.pack_start(vbox) + + self._buttons[entries[0].componentType].set_active(True) + + self.consumers.show_all() + self._verify() + + def _packButtonToBox(self, box, name, description): + self._buttons[name] = gtk.CheckButton(label=description) + self._buttons[name].connect('toggled', + self.on_checkbutton_toggled, name) + box.pack_start(self._buttons[name], expand=False, fill=False) + + def _populateField(self): + d = self.wizard.getWizardEntries(wizardTypes=['consumer']) + d.addCallback(self._gotEntries) + return d + + def _loadStep(self, componentType, type): + + def gotFactory(factory): + plugin = factory(self.wizard) + return plugin.getConsumptionStep(type) + + def noBundle(failure): + failure.trap(NoBundleError) + + d = self.wizard.getWizardEntry(componentType) + d.addCallback(gotFactory) + d.addErrback(noBundle) + return d + + def getSteps(self): + self._steplist = [] + for ctype in self._consumerTypes: + if not self._buttons[ctype].get_active(): + continue + for consumer, desc in self._consumers: + if self._buttons[ctype+'-'+consumer].get_active(): + d = self._loadStep(ctype, consumer) + yield d def getNext(self, step=None): - steps = self._getSteps() - assert steps + if not self._stepsGen: + self._stepsGen = self.getSteps() - if not step: - step_class = steps[0] + def addToList(newStep): + self._steplist.append(newStep) + return newStep + + if step in self._steplist and self._steplist[-1] != step: + return self._steplist[self._steplist.index(step)+1] + elif not step and self._steplist: + return self._steplist[0] else: - step_class = step.__class__ - if step_class in steps and steps[-1] != step_class: - step_class = steps[steps.index(step_class)+1] - else: + try: + next = self._stepsGen.next() + next.addCallback(addToList) + return next + except StopIteration: + if not step: + return self._steplist[0] return - return step_class(self.wizard) - # Private def _verify(self): - disk = self.disk.get_active() - disk_audio = self.disk_audio.get_active() - disk_video = self.disk_video.get_active() - disk_audio_video = self.disk_audio_video.get_active() - http = self.http.get_active() - http_audio = self.http_audio.get_active() - http_video = self.http_video.get_active() - http_audio_video = self.http_audio_video.get_active() - shout2 = self.shout2.get_active() - shout2_audio = self.shout2_audio.get_active() - shout2_video = self.shout2_video.get_active() - shout2_audio_video = self.shout2_audio_video.get_active() - blockNext = True - if ((disk and pany([disk_audio, disk_video, disk_audio_video])) or - (http and pany([http_audio, http_video, http_audio_video])) or - (shout2 and pany([shout2_audio, - shout2_video, shout2_audio_video]))): - blockNext = False - self.wizard.blockNext(blockNext) - def _canEmbedShout(self): - encodingStep = self.wizard.getStep('Encoding') - # Shoutcast supports only mp3 and ogg - if (encodingStep.getAudioFormat() == 'mp3' or - encodingStep.getMuxerFormat() == 'ogg'): - return True - return False - - def _getSteps(self): - uielements = [] - retval = [] - if self.http.get_active(): - uielements.append( - ([HTTPAudioStep, HTTPVideoStep, HTTPBothStep], - [self.http_audio, - self.http_video, - self.http_audio_video])) - if self.disk.get_active(): - uielements.append( - ([DiskAudioStep, DiskVideoStep, DiskBothStep], - [self.disk_audio, - self.disk_video, - self.disk_audio_video])) - if self.shout2.get_active() and self._canEmbedShout(): - uielements.append( - ([Shout2AudioStep, Shout2VideoStep, Shout2BothStep], - [self.shout2_audio, - self.shout2_video, - self.shout2_audio_video])) - - has_audio = self.wizard.getScenario().hasAudio(self.wizard) - has_video = self.wizard.getScenario().hasVideo(self.wizard) - - for steps, (audio, video, audio_video) in uielements: - # Audio & Video, all checkbuttons are visible and - # changeable by the user - if has_audio and has_video: - enable_audio_video = audio_video.get_active() - enable_audio = audio.get_active() - enable_video = video.get_active() - # Audio only, user cannot chose, the checkbuttons are not - # visible and it is not possible for the user to change, - # just add audio, and nothing else - elif has_audio and not has_video: - enable_audio_video = False - enable_audio = True - enable_video = False - # Video only, like audio only but with video - elif has_video and not has_audio: - enable_audio_video = False - enable_audio = False - enable_video = True - else: - raise AssertionError - - audio_step, video_step, audio_video_step = steps - if enable_audio_video: - retval.append(audio_video_step) - if enable_audio: - retval.append(audio_step) - if enable_video: - retval.append(video_step) - - return retval - - # Callbacks - - def on_disk__toggled(self, button): - value = self.disk.get_active() - self.disk_audio_video.set_sensitive(value) - self.disk_audio.set_sensitive(value) - self.disk_video.set_sensitive(value) + elements = self._buttons - self._verify() + def partials(ctype): + if not elements[ctype].get_active(): + return False + return pany([elements[ctype+'-'+consumer].get_active() + for consumer, _ in self._consumers]) + + if reduce(bool.__or__, map(partials, self._consumerTypes)): + blockNext = False - def on_shout2__toggled(self, button): - value = self.shout2.get_active() - self.shout2_audio_video.set_sensitive(value) - self.shout2_audio.set_sensitive(value) - self.shout2_video.set_sensitive(value) + self.wizard.blockNext(blockNext) - self._verify() + # Callback - def on_http__toggled(self, button): - value = self.http.get_active() - self.http_audio_video.set_sensitive(value) - self.http_audio.set_sensitive(value) - self.http_video.set_sensitive(value) + def on_checkbutton_toggled(self, button, type): + if type in self._consumerTypes: + value = self._buttons[type].get_active() + for key, desc in self._consumers: + consumer = "%s-%s" % (type, key) + self._buttons[consumer].set_sensitive(value) + if self._hasBoth and key != 'audio-video': + continue + if value: + self._buttons[consumer].set_active(value) self._verify() + self._stepsGen = self.getSteps() + self._steplist = [] diff -Nru flumotion-0.6.1/flumotion/scenario/steps/conversionsteps.py flumotion-0.9.1/flumotion/scenario/steps/conversionsteps.py --- flumotion-0.6.1/flumotion/scenario/steps/conversionsteps.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/conversionsteps.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,32 +1,33 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext +import re + +from twisted.internet import defer from flumotion.admin.assistant.models import AudioEncoder, VideoEncoder, Muxer from flumotion.admin.gtk.workerstep import WorkerWizardStep +from flumotion.ui.wizard import WizardStep from flumotion.common import errors, messages from flumotion.common.i18n import N_, gettexter +from flumotion.scenario.steps.summarysteps import LiveSummaryStep -__version__ = "$Rev: 7788 $" +__version__ = "$Rev$" _ = gettext.gettext T_ = gettexter() @@ -53,6 +54,10 @@ docAnchor = '' docVersion = 'local' + def __init__(self, wizard): + WorkerWizardStep.__init__(self, wizard) + self._muxer = None + # Public API def getAudioPage(self): @@ -66,7 +71,7 @@ @returns: the muxer @rtype: string """ - entry = self.wizard.getScenario().getMuxerEntry() + entry = self.muxer.get_selected() return entry.componentType def getMuxerFormat(self): @@ -74,7 +79,7 @@ @returns: the muxer formats @rtype: string """ - entry = self.wizard.getScenario().getMuxerEntry() + entry = self.muxer.get_selected() return entry.getProvidedMediaTypes()[0] def getAudioFormat(self): @@ -98,11 +103,9 @@ # WizardStep def activated(self): - data = [('muxer', self.muxer, None, - self.wizard.getScenario().getMuxerEntry())] + data = [('muxer', self.muxer, None, None)] - audioProducer = self.wizard.getScenario().getAudioProducer(self.wizard) - if audioProducer: + if self.wizard.getScenario().hasAudio(self.wizard): oldAudioEncoder = self.wizard.getScenario().getAudioEncoder() data.append(('audio-encoder', self.audio, _PREFERRED_AUDIO_ENCODER, @@ -112,8 +115,7 @@ self.label_audio.hide() self.wizard.getScenario().setAudioEncoder(None) - videoProducer = self.wizard.getScenario().getVideoProducer(self.wizard) - if videoProducer: + if self.wizard.getScenario().hasVideo(self.wizard): oldVideoEncoder = self.wizard.getScenario().getVideoEncoder() data.append(('video-encoder', self.video, _PREFERRED_VIDEO_ENCODER, @@ -142,20 +144,31 @@ else: raise AssertionError + def workerChanged(self, worker): + if self._muxer: + self._muxer.workerChanged(worker) + # Private def _populateCombos(self, combos, provides=None): self.debug("populating combos %r", combos) + self.wizard.waitForTask('querying encoders') + + defers = [] for ctype, combo, defaultType, oldComponent in combos: + combo.prefill([('...', None)]) + combo.set_sensitive(False) + d = self.wizard.getWizardEntries( wizardTypes=[ctype], provides=provides) d.addCallback(self._addEntries, ctype, combo, defaultType, oldComponent) - combo.prefill([('...', None)]) - combo.set_sensitive(False) - self.wizard.waitForTask('querying encoders') + defers.append(d) + + d = defer.DeferredList(defers) d.addCallback(lambda x: self.wizard.taskFinished()) + return d def _canAddMuxer(self, entry): # Fetch the media types the muxer accepts ('audio', 'video') @@ -220,7 +233,6 @@ entry = combo.get_selected() d = self._loadPlugin(entry) d.addCallback(pluginLoaded, entry) - return d def _getAudioPage(self): @@ -249,21 +261,154 @@ def _muxerChanged(self): muxerEntry = self.muxer.get_selected() + self.wizard.message_area.clear() # '...' used while waiting for the query to be done if muxerEntry is None: return - self.wizard.getScenario().setMuxerEntry(muxerEntry) + + def combosPopulated(unused): + return self._loadPlugin(muxerEntry) + + def pluginLoaded(plugin, entry): + if plugin: + self._muxer = plugin + return plugin.workerChanged(self.worker) + else: + # no plugin defined, behaving like before + # FIXME: make check should make sure all muxers have a + # plugin/factory and fail if not + self.wizard.clear_msg('assistant-bundle') + self.wizard.taskFinished() provides = map(lambda f: f.find(':') > 0 and f.split(':', 1)[1] or f, - muxerEntry.getAcceptedMediaTypes()) - self._populateCombos( + muxerEntry.getAcceptedMediaTypes()) + d = self._populateCombos( [('audio-encoder', self.audio, _PREFERRED_AUDIO_ENCODER, self.wizard.getScenario().getAudioEncoder()), ('video-encoder', self.video, _PREFERRED_VIDEO_ENCODER, self.wizard.getScenario().getVideoEncoder())], provides=provides) + d.addCallback(combosPopulated) + d.addCallback(pluginLoaded, muxerEntry) + return d # Callbacks def on_muxer__changed(self, combo): self._muxerChanged() + + +class SelectFormatStep(WizardStep): + name = 'Encoding' + title = _('Select Format') + section = _('Format') + gladeFile = 'encoding-wizard.glade' + docSection = 'help-configuration-assistant-encoders' + docAnchor = '' + docVersion = 'local' + # Public API + + def setMuxers(self, muxers): + self._muxers = [muxer for muxer in muxers] + + def getMuxerFormat(self): + """Returns the format of the muxer, such as "ogg". + @returns: the muxer formats + @rtype: string + """ + muxer = self.muxer.get_selected() + if not muxer: + return + + entry = self._entries[muxer.componentType] + return entry.getProvidedMediaTypes()[0] + + def getMuxerType(self): + """Returns the component-type, such as "ogg-muxer" + of the currently selected muxer. + @returns: the muxer + @rtype: string + """ + muxer = self.muxer.get_selected() + if not muxer: + return + + entry = self._entries[muxer.componentType] + return entry.componentType + + def getAudioFormat(self): + """Returns the format of the audio encoder, such as "vorbis" + @returns: the audio format + @rtype: string + """ + return None + + def getVideoFormat(self): + """Returns the format of the video encoder, such as "theora" + @returns: the video format + @rtype: string + """ + return None + + # WizardStep + + def activated(self): + self.audio.hide() + self.label_audio.hide() + self.wizard.getScenario().setAudioEncoder(None) + self.video.hide() + self.label_video.hide() + self.wizard.getScenario().setVideoEncoder(None) + + self._populateCombo() + + def _populateCombo(self): + self.debug("populating muxer combo") + self.wizard.waitForTask('get entries') + d = self.wizard.getWizardEntries(wizardTypes=['muxer']) + d.addCallback(self._addEntries) + self.muxer.prefill([('...', None)]) + d.addCallback(lambda x: self.wizard.taskFinished() and + self.muxer.set_sensitive(True)) + + def _addEntries(self, entries): + data = [] + self._entries = \ + dict([(entry.componentType, entry) for entry in entries]) + for muxer in self._muxers: + pattern = re.compile('^muxer-(.*?)\d*$') + match = pattern.search(muxer.name) + muxer.type = match.group(1) + + desc = '%s (%s)' % (N_(muxer.description), muxer.name) + data.append((desc, muxer)) + + self.muxer.prefill(data) + + def getNext(self): + # Return audio/video/audio-video http streamer page + self.wizard.cleanFutureSteps() + muxer = self.muxer.get_selected() + + def gotFactory(factory): + plugin = factory(self.wizard) + step = plugin.getConsumptionStep(muxer.type) + self.wizard.addStepSection(step) + self.wizard.addStepSection(LiveSummaryStep) + + def noBundle(failure): + failure.trap(NoBundleError) + + d = self.wizard.getWizardEntry('http-streamer') + d.addCallback(gotFactory) + d.addErrback(noBundle) + return d + + # Callbacks + + def on_muxer__changed(self, combo): + muxer = combo.get_selected() + if not muxer: + return + + self.wizard.getScenario().setExistingMuxer(muxer) diff -Nru flumotion-0.6.1/flumotion/scenario/steps/diskersteps.py flumotion-0.9.1/flumotion/scenario/steps/diskersteps.py --- flumotion-0.6.1/flumotion/scenario/steps/diskersteps.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/diskersteps.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,225 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -import gettext - -import gtk - -from flumotion.admin.assistant.models import Consumer -from flumotion.admin.gtk.basesteps import ConsumerStep -from flumotion.ui.fileselector import FileSelectorDialog - -__version__ = "$Rev: 7667 $" -_ = gettext.gettext - -(SIZE_KB, - SIZE_MB, - SIZE_GB, - SIZE_TB) = tuple([1 << (10L*i) for i in range(1, 5)]) - -TIME_MINUTE = 60 -TIME_HOUR = 60*60 -TIME_DAY = 60*60*24 -TIME_WEEK = 60*60*24*7 - - -class Disker(Consumer): - """I am a model representing the configuration file for a - Disk consumer. - - @ivar has_time: if rotation should be done based on time - @ivar has_size: if rotation should be done based on size - @ivar time_unit: the selected size unit, - size will be multiplied by this value when saved - @ivar size_unit: the selected time unit, - time will be multiplied by this value when saved - """ - componentType = 'disk-consumer' - - def __init__(self): - super(Disker, self).__init__() - self.has_size = False - self.has_time = False - self.size = 10 - self.size_unit = SIZE_KB - self.time = 12 - self.time_unit = TIME_HOUR - - self.properties.directory = "/tmp" - self.properties.start_recording = False - - def _getRotationType(self): - if self.has_time: - return 'time' - elif self.has_size: - return 'size' - else: - return 'none' - - # Component - - def getProperties(self): - properties = super(Disker, self).getProperties() - properties.rotate_type = self._getRotationType() - if 'size' == properties.rotate_type: - properties.size = self.size_unit * self.size - elif 'time' == properties.rotate_type: - properties.time = self.time_unit * self.time - - return properties - - -class DiskStep(ConsumerStep): - gladeFile = 'disker-wizard.glade' - icon = 'kcmdevices.png' - - def __init__(self, wizard): - self.model = Disker() - ConsumerStep.__init__(self, wizard) - - # ConsumerStep - - def getConsumerModel(self): - return self.model - - # WizardStep - - def setup(self): - self.directory.data_type = str - self.has_size.data_type = bool - self.has_time.data_type = bool - self.size.data_type = int - self.size_unit.data_type = long - self.start_recording.data_type = bool - self.time.data_type = int - self.time_unit.data_type = int - - self.size_unit.prefill([ - (_('kB'), SIZE_KB), - (_('MB'), SIZE_MB), - (_('GB'), SIZE_GB), - (_('TB'), SIZE_TB), - ]) - self.time_unit.prefill([ - (_('minute(s)'), TIME_MINUTE), - (_('hour(s)'), TIME_HOUR), - (_('day(s)'), TIME_DAY), - (_('week(s)'), TIME_WEEK)]) - self.time_unit.select(TIME_HOUR) - - self.add_proxy(self.model, - ['has_size', - 'has_time', - 'rotate', - 'size_unit', - 'time_unit', - 'time', - 'size']) - - self._proxy = self.add_proxy(self.model.properties, - ['directory', - 'start_recording']) - - def workerChanged(self, worker): - self.model.worker = worker - self.wizard.requireElements(self.worker, 'multifdsink') - - # Private - - def _updateRadio(self): - rotate = self.rotate.get_active() - self.has_size.set_sensitive(rotate) - self.has_time.set_sensitive(rotate) - - hasSize = rotate and self.has_size.get_active() - self.size.set_sensitive(hasSize) - self.size_unit.set_sensitive(hasSize) - self.model.has_size = hasSize - - hasTime = rotate and self.has_time.get_active() - self.time.set_sensitive(hasTime) - self.time_unit.set_sensitive(hasTime) - self.model.has_time = hasTime - - def _select(self): - - def response(fs, response): - fs.hide() - if response == gtk.RESPONSE_OK: - self.model.properties.directory = fs.getFilename() - self._proxy.update('directory') - - def deleteEvent(fs, event): - pass - fs = FileSelectorDialog(self.wizard.window, - self.wizard.getAdminModel()) - fs.connect('response', response) - fs.connect('delete-event', deleteEvent) - fs.selector.setWorkerName(self.model.worker) - fs.setDirectory(self.model.properties.directory) - fs.show_all() - - # Callbacks - - def on_has_time__toggled(self, radio): - self._updateRadio() - - def on_has_size__toggled(self, radio): - self._updateRadio() - - def on_rotate__toggled(self, check): - self._updateRadio() - - def on_select__clicked(self, check): - self._select() - - -class DiskBothStep(DiskStep): - name = 'Disk (audio & video)' - title = _('Disk (Audio and Video)') - sidebarName = _('Disk Audio/Video') - - # ConsumerStep - - def getConsumerType(self): - return 'audio-video' - - -class DiskAudioStep(DiskStep): - name = 'Disk (audio only)' - title = _('Disk (Audio Only)') - sidebarName = _('Disk Audio') - - # ConsumerStep - - def getConsumerType(self): - return 'audio' - - -class DiskVideoStep(DiskStep): - name = 'Disk (video only)' - title = _('Disk (Video Only)') - sidebarName = _('Disk Video') - - # ConsumerStep - - def getConsumerType(self): - return 'video' diff -Nru flumotion-0.6.1/flumotion/scenario/steps/httpstreamersteps.py flumotion-0.9.1/flumotion/scenario/steps/httpstreamersteps.py --- flumotion-0.6.1/flumotion/scenario/steps/httpstreamersteps.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/httpstreamersteps.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,586 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -"""HTTP wizard integration - -This provides a step which you can chose: -- http port -- bandwidth/client limit -- mount point (eg, the url it will be accessed as) -- burst on connect -- cortado java applet - -A component of type 'http-streamer' will always be created. -In addition, if you include the java applet, a 'porter' and -'http-server' will be included to share the port between the streamer -and the server and to serve an html file plus the java applet itself. -On the http-server the applet will be provided with help of a plug. -""" - -import gettext -import re - -import gobject -from kiwi.utils import gsignal -import gtk -from twisted.internet import defer - -from flumotion.admin.assistant.models import Consumer, Porter -from flumotion.admin.gtk.basesteps import ConsumerStep -from flumotion.configure import configure -from flumotion.common import errors, log, messages -from flumotion.common.i18n import N_, gettexter, ngettext - -__version__ = "$Rev: 8057 $" -_ = gettext.gettext -T_ = gettexter() - - -class HTTPStreamer(Consumer): - """I am a model representing the configuration file for a - HTTP streamer component. - @ivar has_client_limit: If a client limit was set - @ivar client_limit: The client limit - @ivar has_bandwidth_limit: If a bandwidth limit was set - @ivar bandwidth_limit: The bandwidth limit - @ivar set_hostname: If a hostname was set - @ivar hostname: the hostname this will be streamed on - @ivar port: The port this server will be listening to - """ - componentType = 'http-streamer' - - def __init__(self): - super(HTTPStreamer, self).__init__() - - self.setPorter( - Porter(worker=None, port=configure.defaultHTTPStreamPort)) - - self.has_plugins = False - - self.has_client_limit = False - self.client_limit = 1000 - self.has_bandwidth_limit = False - self.bandwidth_limit = 500.0 - self.set_hostname = False - self.hostname = '' - self.port = None - - self.properties.burst_on_connect = False - - # Public - - def getURL(self): - """Fetch the url to this stream - @returns: the url - """ - return 'http://%s:%d%s' % ( - self.getHostname(), - self.getPorter().getPort(), - self.properties.mount_point) - - def getHostname(self): - """Fetch the hostname this stream will be published on - @returns: the hostname - """ - return self.hostname - - def setData(self, model): - """ - Sets the data from another model so we can reuse it. - - @param model : model to get the data from - @type model : L{HTTPStreamer} - """ - self.has_client_limit = model.has_client_limit - self.has_bandwidth_limit = model.has_bandwidth_limit - self.client_limit = model.client_limit - self.bandwidth_limit = model.bandwidth_limit - self.set_hostname = model.set_hostname - self.hostname = model.hostname - self.properties.burst_on_connect = model.properties.burst_on_connect - self.port = model.port - - # Component - - def getPorter(self): - """ - Obtains this streamer's porter model. - """ - porter = Consumer.getPorter(self) - porter.worker = self.worker - if self.port: - porter.properties.port = self.port - return porter - - def getProperties(self): - properties = super(HTTPStreamer, self).getProperties() - if self.has_bandwidth_limit: - properties.bandwidth_limit = int(self.bandwidth_limit * 1e6) - if self.has_client_limit: - properties.client_limit = self.client_limit - - porter = self.getPorter() - hostname = self.getHostname() - if hostname and self.set_hostname: - properties.hostname = hostname - properties.porter_socket_path = porter.getSocketPath() - properties.porter_username = porter.getUsername() - properties.porter_password = porter.getPassword() - properties.type = 'slave' - # FIXME: Try to maintain the port empty when we are slave. Needed - # for now as the adminwindow tab shows the URL based on this property. - properties.port = self.port or self.getPorter().getProperties().port - - return properties - - -class PlugPluginLine(gtk.VBox): - """I am a line in the plug plugin area representing a single plugin. - Rendered, I am visible as a checkbutton containing a label with the - description of the plugin. - Signals:: - - enable-changed: emitted when I am enabled/disabled - @ivar plugin: plugin instance - """ - gsignal('enable-changed') - - def __init__(self, plugin, description): - """ - @param plugin: plugin instance - @param description: description of the plugin - """ - gtk.VBox.__init__(self) - self.plugin = plugin - self.checkbutton = gtk.CheckButton(description) - self.checkbutton.connect('toggled', - self._on_checkbutton__toggled) - self.checkbutton.set_active(True) - self.pack_start(self.checkbutton) - self.checkbutton.show() - - def isEnabled(self): - """Find out if the plugin is going to be enabled or not - @returns: enabled - @rtype: bool - """ - return self.checkbutton.get_active() - - def _on_checkbutton__toggled(self, checkbutton): - self.emit('enable-changed') -gobject.type_register(PlugPluginLine) - - -class PlugPluginArea(gtk.VBox): - """I am plugin area representing all available plugins. I keep track - of the plugins and their internal state. You can ask me to add new plugins - or get the internal models of the plugins. - """ - - def __init__(self, streamer=None): - self.streamer = streamer - gtk.VBox.__init__(self, spacing=6) - self._lines = [] - - # Public - - def setStreamer(self, streamer): - """ - Stablishes the streamer's model the plug is related to. - """ - self.streamer = streamer - - def addPlug(self, plugin, description): - """Add a plug, eg a checkbutton with a description such as - 'Cortado Java applet'. - @param plugin: plugin instance - @param description: label description - """ - line = PlugPluginLine(plugin, description) - line.connect('enable-changed', self._on_plugline__enable_changed) - self._lines.append(line) - self.pack_start(line, False, False) - line.show() - self._updateStreamer() - - def getServerConsumers(self, audio_producer, video_producer): - """Fetch a list of server consumers which are going to be used by all - available plugins. - @returns: consumers - @rtype: a sequence of L{HTTPServer} subclasses - """ - for plugin in self._getEnabledPlugins(): - yield plugin.getConsumer(self.streamer, audio_producer, - video_producer) - - # Private - - def _hasEnabledPlugins(self): - for line in self._lines: - if line.isEnabled(): - return True - return False - - def _getEnabledPlugins(self): - for line in self._lines: - if line.isEnabled(): - yield line.plugin - - def _updateStreamer(self): - self.streamer.has_plugins = self._hasEnabledPlugins() - - # Callbacks - - def _on_plugline__enable_changed(self, line): - self._updateStreamer() - - -class HTTPSpecificStep(ConsumerStep): - """I am a step of the configuration wizard which allows you - to configure a stream to be served over HTTP. - """ - section = _('Consumption') - gladeFile = 'httpstreamer-wizard.glade' - - def __init__(self, wizard): - self.model = HTTPStreamer() - ConsumerStep.__init__(self, wizard) - - def updateModel(self, model): - """ - There is a previous httpstreamer step from where the data can be copied - It will be copied to the actual model and the advanced - tab would be hidden. - - @param model: The previous model we are going to copy. - @type model: L{HTTPStreamer} - """ - self.model.setData(model) - self.expander.set_expanded(False) - self._proxy2.set_model(self.model) - - # ConsumerStep - - def getConsumerModel(self): - return self.model - - def getServerConsumers(self): - return self.plugarea.getServerConsumers( - self.wizard.getScenario().getAudioProducer(self.wizard), - self.wizard.getScenario().getVideoProducer(self.wizard)) - - # WizardStep - - def setup(self): - self.mount_point.data_type = str - self.bandwidth_limit.data_type = float - self.burst_on_connect.data_type = bool - self.client_limit.data_type = int - self.port.data_type = int - self.hostname.data_type = str - - self.model.properties.mount_point = self._getDefaultMountPath() - self._proxy1 = self.add_proxy(self.model.properties, - ['mount_point', 'burst_on_connect']) - self._proxy2 = self.add_proxy( - self.model, ['has_client_limit', - 'has_bandwidth_limit', - 'client_limit', - 'bandwidth_limit', - 'set_hostname', - 'hostname', - 'port']) - - self.client_limit.set_sensitive(self.model.has_client_limit) - self.bandwidth_limit.set_sensitive(self.model.has_bandwidth_limit) - self.hostname.set_sensitive(self.model.set_hostname) - - self.plugarea.setStreamer(self.model) - - self.port.connect('changed', self.on_port_changed) - self.mount_point.connect('changed', self.on_mount_point_changed) - - def workerChanged(self, worker): - self.model.worker = worker - d = self._runChecks() - d.addCallback(self._populatePlugins) - return d - - def getNext(self): - next = ConsumerStep.getNext(self) - if next and next.model.componentType == self.model.componentType: - next.updateModel(self.model) - return next - - # Private - - def _getDefaultMountPath(self): - encodingStep = self.wizard.getStep('Encoding') - return '/%s-%s/' % (str(encodingStep.getMuxerFormat()), - self.getConsumerType(), ) - - def _suggestMountPoint(self, mountPoint): - # FIXME: Generalise this method and use the same in f.a.a.save module. - # Resolve naming conflicts, using a simple algorithm - # First, find all the trailing digits, for instance in - # 'audio-producer42' -> '42' - mountPoint = mountPoint.rstrip('/') - - pattern = re.compile('(\d*$)') - match = pattern.search(mountPoint) - trailingDigit = match.group() - - # Now if we had a digit in the end, convert it to - # a number and increase it by one and remove the trailing - # digits the existing component name - if trailingDigit: - digit = int(trailingDigit) + 1 - mountPoint = mountPoint[:-len(trailingDigit)] - # No number in the end, use 2 the first one so we end up - # with 'audio-producer' and 'audio-producer2' in case of - # a simple conflict - else: - digit = 2 - return mountPoint + str(digit) + '/' - - def _populatePlugins(self, canPopulate): - if not canPopulate: - return - - def gotEntries(entries): - log.debug('httpwizard', 'got %r' % (entries, )) - for entry in entries: - if not self._canAddPlug(entry): - continue - - def response(factory, entry): - # FIXME: verify that factory implements IHTTPConsumerPlugin - plugin = factory(self.wizard) - if hasattr(plugin, 'workerChanged'): - d = plugin.workerChanged(self.worker) - - def cb(found, plugin, entry): - if found: - self._addPlug( - plugin, N_(entry.description)) - d.addCallback(cb, plugin, entry) - else: - self._addPlug(plugin, N_(entry.description)) - d = self.wizard.getWizardPlugEntry(entry.componentType) - d.addCallback(response, entry) - - d = self.wizard.getWizardEntries(wizardTypes=['http-consumer']) - d.addCallbacks(gotEntries) - - def _canAddPlug(self, entry): - # This function filters out entries which are - # not matching the accepted media types of the entry - muxerTypes = [] - audioTypes = [] - videoTypes = [] - for mediaType in entry.getAcceptedMediaTypes(): - kind, name = mediaType.split(':', 1) - if kind == 'muxer': - muxerTypes.append(name) - elif kind == 'video': - videoTypes.append(name) - elif kind == 'audio': - audioTypes.append(name) - else: - raise AssertionError - - encoding_step = self.wizard.getStep('Encoding') - if encoding_step.getMuxerFormat() not in muxerTypes: - return False - - audioFormat = encoding_step.getAudioFormat() - videoFormat = encoding_step.getVideoFormat() - if ((audioFormat and audioFormat not in audioTypes) or - (videoFormat and videoFormat not in videoTypes)): - return False - - return True - - def _addPlug(self, plugin, description): - self.plugarea.addPlug(plugin, description) - - def _runChecks(self): - self.wizard.waitForTask('http streamer check') - - def hostnameErrback(failure): - failure.trap(errors.RemoteRunError) - self.wizard.taskFinished(blockNext=True) - return False - - def gotHostname(hostname): - self.model.hostname = hostname - self._proxy2.update('hostname') - self.wizard.taskFinished() - return True - - def getHostname(result): - if not result: - return False - - d = self.wizard.runInWorker( - self.worker, 'flumotion.worker.checks.http', - 'runHTTPStreamerChecks') - d.addCallback(gotHostname) - d.addErrback(hostnameErrback) - return d - - def checkImport(elements): - if elements: - self.wizard.taskFinished(blockNext=True) - return False - - d = self.wizard.requireImport( - self.worker, 'twisted.web', projectName='Twisted project', - projectURL='http://www.twistedmatrix.com/') - d.addCallback(getHostname) - return d - - # first check elements - d = self.wizard.requireElements(self.worker, 'multifdsink') - d.addCallback(checkImport) - return d - - def _checkMountPoint(self, port=None, worker=None, - mount_point=None, need_fix=False): - """ - Checks whether the provided mount point is available with the - current configuration (port, worker). It can provide a valid - mountpoint if it is required with need_fix=True. - - @param port : The port the streamer is going to be listening. - @type port : int - @param worker : The worker the streamer will be running. - @type worker : str - @param mount_point : The desired mount point. - @type mount_point : str - @param need_fix : Whether the method should search for a valid - mount_point if the provided one is not. - @type need_fix : bool - - @returns : True if the mount_point can be used, False if it is in use. - @rtype : bool - """ - self.wizard.clear_msg('http-streamer-mountpoint') - - port = port or self.model.port - worker = worker or self.model.worker - mount_point = mount_point or self.model.properties.mount_point - - self.wizard.waitForTask('http-streamer-mountpoint') - - if self.wizard.addMountPoint(worker, port, mount_point, - self.getConsumerType()): - self.wizard.taskFinished() - return True - else: - if need_fix: - while not self.wizard.addMountPoint(worker, port, - mount_point, - self.getConsumerType()): - mount_point=self._suggestMountPoint(mount_point) - - self.model.properties.mount_point = mount_point - self._proxy1.update('mount_point') - self.wizard.taskFinished() - return True - - message = messages.Error(T_(N_( - "The mount point %s is already being used for worker %s and " - "port %s. Please correct this to be able to go forward."), - mount_point, worker, port)) - message.id = 'http-streamer-mountpoint' - self.wizard.add_msg(message) - self.wizard.taskFinished(True) - return False - - # Callbacks - - def on_mount_point_changed(self, entry): - if not entry.get_text(): - self.wizard.clear_msg('http-streamer-mountpoint') - message = messages.Error(T_(N_( - "Mountpoint cannot be left empty.\n" - "Fill the text field with a correct mount point to" - "be able to go forward."))) - message.id = 'http-streamer-mountpoint' - self.wizard.add_msg(message) - self.wizard.blockNext(True) - else: - self._checkMountPoint(mount_point=entry.get_text()) - - def on_has_client_limit_toggled(self, cb): - self.client_limit.set_sensitive(cb.get_active()) - - def on_has_bandwidth_limit_toggled(self, cb): - self.bandwidth_limit.set_sensitive(cb.get_active()) - - def on_set_hostname__toggled(self, cb): - self.hostname.set_sensitive(cb.get_active()) - - def on_port_changed(self, widget): - if widget.get_text().isdigit(): - self._checkMountPoint(port=int(widget.get_text())) - - -class HTTPBothStep(HTTPSpecificStep): - name = 'HTTPStreamerBoth' - title = _('HTTP Streamer (Audio and Video)') - sidebarName = _('HTTP Audio/Video') - docSection = 'help-configuration-assistant-http-streaming-both' - docAnchor = '' - docVersion = 'local' - - # ConsumerStep - - def getConsumerType(self): - return 'audio-video' - - -class HTTPAudioStep(HTTPSpecificStep): - name = 'HTTPStreamerAudio' - title = _('HTTP Streamer (Audio Only)') - sidebarName = _('HTTP Audio') - docSection = 'help-configuration-assistant-http-streaming-audio-only' - docAnchor = '' - docVersion = 'local' - - # ConsumerStep - - def getConsumerType(self): - return 'audio' - - -class HTTPVideoStep(HTTPSpecificStep): - name = 'HTTPStreamerVideo' - title = _('HTTP Streamer (Video Only)') - sidebarName = _('HTTP Video') - docSection = 'help-configuration-assistant-http-streaming-video-only' - docAnchor = '' - docVersion = 'local' - - # ConsumerStep - - def getConsumerType(self): - return 'video' diff -Nru flumotion-0.6.1/flumotion/scenario/steps/__init__.py flumotion-0.9.1/flumotion/scenario/steps/__init__.py --- flumotion-0.6.1/flumotion/scenario/steps/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ diff -Nru flumotion-0.6.1/flumotion/scenario/steps/licensestep.py flumotion-0.9.1/flumotion/scenario/steps/licensestep.py --- flumotion-0.6.1/flumotion/scenario/steps/licensestep.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/licensestep.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """Scenarios for the ConfigurationAssistant diff -Nru flumotion-0.6.1/flumotion/scenario/steps/loadflowstep.py flumotion-0.9.1/flumotion/scenario/steps/loadflowstep.py --- flumotion-0.6.1/flumotion/scenario/steps/loadflowstep.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/loadflowstep.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,101 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +"""A wizard step for configuring an on demand stream +""" + +import gettext +from os.path import dirname, basename + +import gobject +import gtk + +from flumotion.ui.wizard import WizardStep +from flumotion.common import messages +from flumotion.common.i18n import N_, gettexter +from flumotion.ui.fileselector import FileSelectorDialog +from flumotion.admin.settings import getSettings + +__version__ = "$Rev$" +_ = gettext.gettext +T_ = gettexter() + + +class LoadFlowStep(WizardStep): + """I am a step of the wizard which allows you to use an existing + configuration file to set up the server + """ + name = 'LoadFlow' + title = _('Load Flow') + sidebarName = _('Load Flow') + section = _('Load Flow') + gladeFile = 'loadflow-wizard.glade' + docSection = 'help-configuration-assistant-loadflow' + docAnchor = '' + docVersion = 'local' + + def activated(self): + self.wizard.blockNext(True) + + # WizardStep + + def setup(self): + self.filename.data_type = str + + def getNext(self): + return None + + # Public + + def getFlowFilename(self): + return self.filename.get_text() + + # Callbacks + + def on_select__clicked(self, button): + settings = getSettings() + dialog = gtk.FileChooserDialog( + _("Import Flow..."), self._window, + gtk.FILE_CHOOSER_ACTION_OPEN, + (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, + _('Import'), gtk.RESPONSE_ACCEPT)) + dialog.set_modal(True) + dialog.set_default_response(gtk.RESPONSE_ACCEPT) + ffilter = gtk.FileFilter() + ffilter.set_name(_("Flumotion XML Flow files")) + ffilter.add_pattern("*.xml") + dialog.add_filter(ffilter) + ffilter = gtk.FileFilter() + ffilter.set_name(_("All files")) + ffilter.add_pattern("*") + dialog.add_filter(ffilter) + if settings.hasValue('import_dir'): + dialog.set_current_folder_uri(settings.getValue('import_dir')) + + def response(dialog, response): + if response == gtk.RESPONSE_ACCEPT: + if settings.getValue('import_dir') != \ + dialog.get_current_folder_uri(): + settings.setValue('import_dir', + dialog.get_current_folder_uri()) + settings.save() + self.filename.set_text(dialog.get_filename()) + self.wizard.blockNext(False) + dialog.destroy() + + dialog.connect('response', response) + dialog.show() diff -Nru flumotion-0.6.1/flumotion/scenario/steps/Makefile.am flumotion-0.9.1/flumotion/scenario/steps/Makefile.am --- flumotion-0.6.1/flumotion/scenario/steps/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -5,12 +5,10 @@ __init__.py \ consumptionsteps.py \ conversionsteps.py \ - diskersteps.py \ - httpstreamersteps.py \ + loadflowstep.py \ licensestep.py \ ondemandstep.py \ productionsteps.py \ - shout2steps.py \ summarysteps.py component_DATA = \ diff -Nru flumotion-0.6.1/flumotion/scenario/steps/Makefile.in flumotion-0.9.1/flumotion/scenario/steps/Makefile.in --- flumotion-0.6.1/flumotion/scenario/steps/Makefile.in 2009-09-09 11:37:58.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/Makefile.in 2011-09-11 08:09:24.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -44,14 +44,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,6 +103,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -113,18 +113,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -172,6 +165,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -189,16 +183,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -206,7 +202,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -221,6 +216,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -253,7 +249,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -278,12 +273,10 @@ __init__.py \ consumptionsteps.py \ conversionsteps.py \ - diskersteps.py \ - httpstreamersteps.py \ + loadflowstep.py \ licensestep.py \ ondemandstep.py \ productionsteps.py \ - shout2steps.py \ summarysteps.py component_DATA = \ diff -Nru flumotion-0.6.1/flumotion/scenario/steps/ondemandstep.py flumotion-0.9.1/flumotion/scenario/steps/ondemandstep.py --- flumotion-0.6.1/flumotion/scenario/steps/ondemandstep.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/ondemandstep.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """A wizard step for configuring an on demand stream @@ -28,31 +24,19 @@ import gobject import gtk -from flumotion.admin.assistant.models import HTTPServer, Plug +from flumotion.admin.assistant.models import HTTPServer, Plug, Porter +from flumotion.admin.assistant.interfaces import IHTTPServerPlugin from flumotion.admin.gtk.workerstep import WorkerWizardStep from flumotion.common import messages from flumotion.common.i18n import N_, gettexter from flumotion.ui.fileselector import FileSelectorDialog +from flumotion.configure import configure -__version__ = "$Rev: 7736 $" +__version__ = "$Rev$" _ = gettext.gettext T_ = gettexter() -class LoggerPlug(Plug): - - plugType = 'requestlogger-file' - - def __init__(self, logfile): - """ - @param videoProducer: video producer - @type videoProducer: L{flumotion.admin.assistant.models.VideoProducer} - subclass or None - """ - super(LoggerPlug, self).__init__() - self.properties.logfile = logfile - - class OnDemand(HTTPServer): """I am a model representing the configuration file for a an on demand HTTP server component. @@ -61,9 +45,13 @@ def __init__(self, worker=None): super(OnDemand, self).__init__(worker, mountPoint='/') + self.properties.port = configure.defaultHTTPStreamPort + self.setPorter( + Porter(worker=None, port=self.properties.port)) + self.properties.path = '/tmp' - self.properties.port = 8800 + self.properties.allow_browsing = True self.add_logger = False self.logfile = '/tmp/access.log' @@ -75,8 +63,27 @@ if self.add_logger: self.addPlug(LoggerPlug(self.logfile)) + porter = self.getPorter() + + properties.porter_socket_path = porter.getSocketPath() + properties.porter_username = porter.getUsername() + properties.porter_password = porter.getPassword() + properties.type = 'slave' + # FIXME: Try to maintain the port empty when we are slave. Needed + # for now as the adminwindow tab shows the URL based on this property. + properties.port = (self.properties.port or + self.getPorter().getProperties().port) return properties + def setPorter(self, porter): + self._porter = porter + + def getPorter(self): + self._porter.worker = self.worker + if self.properties.port: + self._porter.properties.port = self.properties.port + return self._porter + class OnDemandStep(WorkerWizardStep): """I am a step of the configuration wizard which allows you @@ -103,8 +110,6 @@ self.path.data_type = str self.port.data_type = int self.mount_point.data_type = str - self.add_logger.data_type = bool - self.logfile.data_type = str self._proxy = self.add_proxy(self.model.properties, ['path', @@ -112,14 +117,10 @@ 'mount_point', ]) - self._plugProxy = self.add_proxy(self.model, - ['add_logger', - 'logfile', - ]) - def workerChanged(self, worker): self.model.worker = worker - self._runChecks() + d = self._runChecks() + d.addCallback(self._populatePlugins, worker) def getNext(self): return None @@ -131,14 +132,34 @@ # Private - def _runChecks(self): - self._runPathCheck(self.model.properties.path, 'path') - if self.model.add_logger: - self._runPathCheck(dirname(self.model.logfile), 'logfile') + def _addPlugLine(self, line): + self.plugarea.addLine(line) + + def _populatePlugins(self, canPopulate, worker): + if not canPopulate: + return + + self.plugarea.clean() + + def gotEntries(entries): + for entry in entries: + + def response(factory, entry): + if IHTTPServerPlugin.implementedBy(factory): + plugin = factory(self.wizard, self.model) + self._addPlugLine(plugin.getPlugWizard( + N_(entry.description))) + + d = self.wizard.getWizardPlugEntry(entry.componentType) + d.addCallback(response, entry) + + d = self.wizard.getWizardEntries(wizardTypes=['httpserver-plug', ]) + d.addCallbacks(gotEntries) + return d - def _runPathCheck(self, path, id): + def _runChecks(self): self.wizard.waitForTask('ondemand check') - self._blockNext[id] = True + self._blockNext['path'] = True def importError(failure): failure.trap(ImportError) @@ -153,48 +174,36 @@ message.id = 'module-twisted-web' self.wizard.add_msg(message) self.wizard.taskFinished(True) + return False def checkPathFinished(pathExists): if not pathExists: message = messages.Warning(T_(N_( "Directory '%s' does not exist, " "or is not readable on worker '%s'.") - % (path, self.worker))) - message.id = 'demand-'+id+'-check' + % (self.model.properties.path, self.worker))) + message.id = 'ondemand-path-check' self.wizard.add_msg(message) + self.wizard.taskFinished(True) + return False else: - self.wizard.clear_msg('demand-'+id+'-check') - self._blockNext[id] = False + self.wizard.clear_msg('ondemand-path-check') + self._blockNext['path'] = False + self.wizard.taskFinished(False) + return True self.wizard.taskFinished() - self._verify() def checkPath(unused): d = self.runInWorker('flumotion.worker.checks.check', - 'checkDirectory', path) + 'checkDirectory', self.model.properties.path) d.addCallback(checkPathFinished) + return d d = self.wizard.checkImport(self.worker, 'twisted.web') d.addCallback(checkPath) d.addErrback(importError) - - def _abortScheduledCheck(self): - if self._idleId != -1: - gobject.source_remove(self._idleId) - self._idleId = -1 - - def _scheduleCheck(self, checkToRun, data, id): - self._abortScheduledCheck() - self._idleId = gobject.timeout_add(300, checkToRun, data, id) - - def _clearMessage(self, id): - self.wizard.clear_msg('demand-'+id+'-check') - self._blockNext[id] = False - - def _verify(self): - self.wizard.blockNext(reduce(lambda x, y: x or y, - self._blockNext.values(), - False)) + return d def _showFileSelector(self, response_cb, path, directoryOnly=False): @@ -217,8 +226,7 @@ # See #1186 def on_mount_point__changed(self, entry): - self._blockNext['mount-point'] = not entry.get_text() - self._verify() + self.wizard.blockNext(not entry.get_text()) def on_select_directory__clicked(self, button): @@ -227,9 +235,7 @@ if response == gtk.RESPONSE_OK: self.model.properties.path = fs.getFilename() self._proxy.update('path') - - self._clearMessage('path') - self._verify() + self.wizard.clear_msg('ondemand-path-check') directory = self.model.properties.path @@ -237,44 +243,5 @@ path=directory, directoryOnly=True) - def on_select_logfile__activate(self, button): - - def response(fs, response): - fs.hide() - if response == gtk.RESPONSE_OK: - directory = fs.getFilename() - if directory == '/': - directory = '' - filename = basename(self.model.logfile) - - self.model.logfile = "%s/%s" % (directory, filename) - self._plugProxy.update('logfile') - - self._clearMessage('logfile') - self._verify() - - self._showFileSelector(response, - path=self.model.logfile, - directoryOnly=True) - - def on_add_logger__toggled(self, cb): - self.logfile.set_sensitive(cb.get_active()) - self.select_logfile.set_sensitive(cb.get_active()) - - if cb.get_active(): - self._scheduleCheck(self._runPathCheck, - dirname(self.model.logfile), - 'logfile') - else: - self._clearMessage('logfile') - self._verify() - - def on_logfile__changed(self, entry): - self._scheduleCheck(self._runPathCheck, - dirname(entry.get_text()), - 'logfile') - def on_path__changed(self, entry): - self._scheduleCheck(self._runPathCheck, - entry.get_text(), - 'path') + self._runChecks() diff -Nru flumotion-0.6.1/flumotion/scenario/steps/productionsteps.py flumotion-0.9.1/flumotion/scenario/steps/productionsteps.py --- flumotion-0.6.1/flumotion/scenario/steps/productionsteps.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/productionsteps.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -30,7 +26,7 @@ # Register components from flumotion.common import componentui -__version__ = "$Rev: 7809 $" +__version__ = "$Rev$" # pychecker doesn't like the auto-generated widget attrs # or the extra args we name in callbacks __pychecker__ = 'no-classattr no-argsused' @@ -55,6 +51,7 @@ self._audioProducer = None self._videoProducer = None self._loadedSteps = None + self._populated = False WizardStep.__init__(self, wizard) # Public API @@ -85,6 +82,17 @@ if self.has_audio.get_active(): return self._audioProducer + def getComponentType(self, ctype): + if ctype == 'audio': + return self.audio.get_selected() + elif ctype == 'video': + return self.video.get_selected() + else: + return None + + def setAudioProducer(self, value): + self._audioProducer = value + def getVideoProducer(self): """Returns the selected video producer or None @returns: producer or None @@ -93,6 +101,9 @@ if self.has_video.get_active(): return self._videoProducer + def setVideoProducer(self, value): + self._videoProducer = value + def getVideoStep(self): """Return the video step to be shown, given the currently selected values in this step @@ -144,7 +155,9 @@ _('Select this if you want to stream audio')) def activated(self): - self._populateCombos() + if not self._populated: + self._populateCombos() + self._populated = True def getNext(self): #TODO: Share in some way this code with the conversionsteps page. diff -Nru flumotion-0.6.1/flumotion/scenario/steps/shout2steps.py flumotion-0.9.1/flumotion/scenario/steps/shout2steps.py --- flumotion-0.6.1/flumotion/scenario/steps/shout2steps.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/shout2steps.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -import gettext - -from flumotion.admin.assistant.models import Consumer -from flumotion.admin.gtk.basesteps import ConsumerStep - -__version__ = "$Rev: 7626 $" -_ = gettext.gettext - - -class Shout2Consumer(Consumer): - componentType = 'shout2-consumer' - - def __init__(self): - super(Shout2Consumer, self).__init__() - self.properties.ip = '127.0.0.1' - self.properties.mount_point = '/' - self.properties.description = '' - self.properties.short_name = '' - self.properties.url = 'http://localhost/' - self.properties.password = '' - - -class Shout2Step(ConsumerStep): - gladeFile = 'shout2-wizard.glade' - - def __init__(self, wizard): - self.model = Shout2Consumer() - ConsumerStep.__init__(self, wizard) - - # ConsumerStep - - def getConsumerModel(self): - return self.model - - # WizardStep - - def setup(self): - self.ip.data_type = str - self.port.data_type = int - self.mount_point.data_type = str - self.password.data_type = str - self.short_name.data_type = str - self.description.data_type = str - self.url.data_type = str - - self.add_proxy(self.model.properties, - ['ip', - 'port', - 'mount_point', - 'short_name', - 'password', - 'description', - 'url']) - - def workerChanged(self, worker): - self.model.worker = worker - self.wizard.checkElements(worker, 'shout2send') - - -class Shout2BothStep(Shout2Step): - name = 'Icecast streamer (audio & video)' - title = _('Icecast Streamer (Audio and Video)') - sidebarName = _('Icecast audio/video') - docSection = 'help-configuration-assistant-icecast-streaming-both' - docAnchor = '' - docVersion = 'local' - - # ConsumerStep - - def getConsumerType(self): - return 'audio-video' - - -class Shout2AudioStep(Shout2Step): - name = 'Icecast streamer (audio only)' - title = _('Icecast Streamer (Audio Only)') - sidebarName = _('Icecast Audio') - docSection = 'help-configuration-assistant-icecast-streaming-audio-only' - docAnchor = '' - docVersion = 'local' - - # ConsumerStep - - def getConsumerType(self): - return 'audio' - - -class Shout2VideoStep(Shout2Step): - name = 'Icecast streamer (video only)' - title = _('Icecast Streamer (Video Only)') - sidebarName = _('Icecast Video') - docSection = 'help-configuration-assistant-icecast-streaming-video-only' - docAnchor = '' - docVersion = 'local' - - # ConsumerStep - - def getConsumerType(self): - return 'video' diff -Nru flumotion-0.6.1/flumotion/scenario/steps/steps.xml flumotion-0.9.1/flumotion/scenario/steps/steps.xml --- flumotion-0.6.1/flumotion/scenario/steps/steps.xml 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/steps.xml 2011-09-11 08:09:04.000000000 +0000 @@ -8,12 +8,10 @@ - - + - diff -Nru flumotion-0.6.1/flumotion/scenario/steps/summarysteps.py flumotion-0.9.1/flumotion/scenario/steps/summarysteps.py --- flumotion-0.6.1/flumotion/scenario/steps/summarysteps.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/scenario/steps/summarysteps.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """Summary steps for the ConfigurationAssistant diff -Nru flumotion-0.6.1/flumotion/service/__init__.py flumotion-0.9.1/flumotion/service/__init__.py --- flumotion-0.6.1/flumotion/service/__init__.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/service/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/service/main.py flumotion-0.9.1/flumotion/service/main.py --- flumotion-0.6.1/flumotion/service/main.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/service/main.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,18 +1,19 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# See "LICENSE.GPL" in the source distribution for more information. - -# This program is also licensed under the Flumotion license. -# See "LICENSE.Flumotion" in the source distribution for more information. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. import os import sys @@ -70,7 +71,8 @@ command = args[1] except IndexError: print "Usage: flumotion " \ - "{list|start|stop|restart|condrestart|status|clean} [which]" + "{list|start|stop|restart|condrestart|status|clean|" \ + "enable|disable} [which]" sys.exit(0) if command == "list": @@ -89,6 +91,10 @@ return servicer.create(args[2:]) elif command == "clean": return servicer.clean(args[2:]) + elif command == "enable": + return servicer.enable(args[2:]) + elif command == "disable": + return servicer.disable(args[2:]) sys.stderr.write("No such command '%s'\n" % command) return 1 diff -Nru flumotion-0.6.1/flumotion/service/Makefile.in flumotion-0.9.1/flumotion/service/Makefile.in --- flumotion-0.6.1/flumotion/service/Makefile.in 2009-09-09 11:37:58.000000000 +0000 +++ flumotion-0.9.1/flumotion/service/Makefile.in 2011-09-11 08:09:24.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -101,6 +100,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -110,18 +110,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -169,6 +162,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -186,16 +180,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -203,7 +199,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -218,6 +213,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -250,7 +246,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/service/service.py flumotion-0.9.1/flumotion/service/service.py --- flumotion-0.6.1/flumotion/service/service.py 2009-09-09 11:37:23.000000000 +0000 +++ flumotion-0.9.1/flumotion/service/service.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,18 +1,19 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# See "LICENSE.GPL" in the source distribution for more information. - -# This program is also licensed under the Flumotion license. -# See "LICENSE.Flumotion" in the source distribution for more information. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. """ Servicer object used in service scripts @@ -28,7 +29,7 @@ from flumotion.common.process import checkPidRunning, deletePidFile, getPid, \ killPid, termPid, waitPidFile -__version__ = "$Rev: 7917 $" +__version__ = "$Rev$" class Servicer(log.Loggable): @@ -138,6 +139,7 @@ for workerFile in glob.glob(os.path.join(self.workersDir, '*.xml')): filename = os.path.split(workerFile)[1] name = filename.split(".xml")[0] + name = name.split("-disabled")[0] workers.append(name) workers.sort() return workers @@ -202,7 +204,10 @@ for name in names: pid = getPid(kind, name) if not pid: - print "%s %s not running" % (kind, name) + if self.checkDisabled(kind, name): + print "%s %s is disabled" % (kind, name) + else: + print "%s %s not running" % (kind, name) continue if checkPidRunning(pid): print "%s %s is running with pid %d" % (kind, name, pid) @@ -402,6 +407,11 @@ @returns: whether or not the manager daemon started """ self.info("Starting manager %s" % name) + + if self.checkDisabled('manager', name): + print "manager %s is disabled, cannot start" % name + return + self.debug("Starting manager with flows %r" % flowNames) managerDir = os.path.join(self.managersDir, name) planetFile = os.path.join(managerDir, 'planet.xml') @@ -426,8 +436,11 @@ raise errors.FatalError, \ "Manager %s is already running (with pid %d)" % (name, pid) else: - raise errors.FatalError, \ - "Manager %s is dead (stale pid %d)" % (name, pid) + # there is a stale PID file, warn about it, remove it and + # continue + self.warning("Removing stale pid file %d for manager %s", + pid, name) + deletePidFile('manager', name) dirOptions = self._getDirOptions() command = "flumotion-manager %s -D --daemonize-to %s " \ @@ -459,6 +472,11 @@ @returns: whether or not the worker daemon started """ self.info("Starting worker %s" % name) + + if self.checkDisabled('worker', name): + print "worker %s is disabled, cannot start" % name + return + workerFile = os.path.join(self.workersDir, "%s.xml" % name) if not os.path.exists(workerFile): raise errors.FatalError, \ @@ -470,8 +488,11 @@ raise errors.FatalError, \ "Worker %s is already running (with pid %d)" % (name, pid) else: - raise errors.FatalError, \ - "Worker %s is dead (stale pid %d)" % (name, pid) + # there is a stale PID file, warn about it, remove it and + # continue + self.warning("Removing stale pid file %d for worker %s", + pid, name) + deletePidFile('worker', name) # we are sure the worker is not running and there's no pid file self.info("Loading worker %s" % workerFile) @@ -521,15 +542,22 @@ # FIXME: ensure a correct process is running this pid if not checkPidRunning(pid): - self.info("Manager %s is dead (stale pid %d)" % (name, pid)) + self.info("Manager %s is dead (stale pid %d), " + "cleaning up" % (name, pid)) + deletePidFile('manager', name) return False self.debug('Stopping manager %s with pid %d' % (name, pid)) - if not self.stopProcess(pid): - return False - self.info('Stopped manager %s with pid %d' % (name, pid)) - return True + ret = self.stopProcess(pid) + + # we may need to remove the pid file ourselves, in case the process + # failed to do it + deletePidFile('manager', name, force=True) + + if ret: + self.info('Stopped manager %s with pid %d' % (name, pid)) + return ret def stopWorker(self, name): """ @@ -543,15 +571,22 @@ # FIXME: ensure a correct process is running this pid if not checkPidRunning(pid): - self.info("Worker %s is dead (stale pid %d)" % (name, pid)) + self.info("Worker %s is dead (stale pid %d), " + "cleaning up" % (name, pid)) + deletePidFile('worker', name) return False self.debug('Stopping worker %s with pid %d' % (name, pid)) - if not self.stopProcess(pid): - return False - self.info('Stopped worker %s with pid %d' % (name, pid)) - return True + ret = self.stopProcess(pid) + + # we may need to remove the pid file ourselves, in case the process + # failed to do it + deletePidFile('worker', name, force=True) + + if ret: + self.info('Stopped worker %s with pid %d' % (name, pid)) + return ret def stopProcess(self, pid): """ @@ -587,6 +622,141 @@ return True + def enable(self, args): + if len(args) < 1: + raise errors.FatalError, 'Please specify what to enable' + + which = args[0] + if which not in ['manager', 'worker']: + raise errors.FatalError, 'Please specify either manager or worker' + + if len(args) < 2: + raise errors.FatalError, 'Please specify which %s to %s' % ( + which, 'enable') + + name = args[1] + if which == 'manager': + managers = self.getManagers() + if not name in managers: + raise errors.FatalError, 'No manager "%s"' % name + self.enableManager(name) + elif which == 'worker': + workers = self.getWorkers() + if not name in workers: + raise errors.FatalError, 'No worker with name %s' % name + self.enableWorker(name) + return + + def disable(self, args): + if len(args) < 1: + raise errors.FatalError, 'Please specify what to disable' + + which = args[0] + if which not in ['manager', 'worker']: + raise errors.FatalError, 'Please specify either manager or worker' + + if len(args) < 2: + raise errors.FatalError, 'Please specify which %s to %s' % ( + which, 'enable') + + name = args[1] + if which == 'manager': + managers = self.getManagers() + if not name in managers: + raise errors.FatalError, 'No manager "%s"' % name + pid = getPid('manager', name) + if pid: + if checkPidRunning(pid): + raise errors.FatalError, "Manager %s is running" % name + self.disableManager(name) + elif which == 'worker': + workers = self.getWorkers() + if not name in workers: + raise errors.FatalError, 'No worker with name %s' % name + pid = getPid('worker', name) + if pid: + if checkPidRunning(pid): + raise errors.FatalError, "Worker %s is running" % name + self.disableWorker(name) + return + + def enableManager(self, name): + self.debug("Enabling manager %s" % name) + managerDir = os.path.join(self.managersDir, name) + planetDisabledFile = os.path.join(managerDir, 'planet-disabled.xml') + planetFile = os.path.join(managerDir, 'planet.xml') + if not os.path.exists(planetDisabledFile): + if not os.path.exists(planetFile): + raise errors.FatalError, \ + "Planet file %s does not exist" % planetFile + else: + print "manager %s already enabled" % name + return + else: + os.rename(planetDisabledFile, planetFile) + print "manager %s enabled" %name + + def enableWorker(self, name): + self.debug("Enabling worker %s" % name) + workerFile = os.path.join(self.workersDir, "%s.xml" % name) + workerDisFile = os.path.join(self.workersDir, "%s-disabled.xml" % name) + if not os.path.exists(workerDisFile): + if not os.path.exists(workerFile): + raise errors.FatalError, \ + "Worker file %s does not exist" % workerFile + else: + print "worker %s already enabled" % name + else: + os.rename(workerDisFile, workerFile) + print "worker %s enabled" % name + + def disableManager(self, name): + self.debug("Disabling manager %s" % name) + managerDir = os.path.join(self.managersDir, name) + planetDisabledFile = os.path.join(managerDir, 'planet-disabled.xml') + planetFile = os.path.join(managerDir, 'planet.xml') + if not os.path.exists(planetFile): + if not os.path.exists(planetDisabledFile): + raise errors.FatalError, \ + "Planet file %s does not exist" % planetFile + else: + print "manager %s already disabled" % name + return + else: + os.rename(planetFile, planetDisabledFile) + print "manager %s disabled" %name + + def disableWorker(self, name): + self.debug("Disabling worker %s" % name) + workerFile = os.path.join(self.workersDir, "%s.xml" % name) + workerDisFile = os.path.join(self.workersDir, "%s-disabled.xml" % name) + if not os.path.exists(workerFile): + if not os.path.exists(workerDisFile): + raise errors.FatalError, \ + "Worker file %s does not exist" % workerFile + else: + print "worker %s already disabled" % name + else: + os.rename(workerFile, workerDisFile) + print "worker %s disabled" % name + + def checkDisabled(self, type, name): + if type == 'manager': + managerDir = os.path.join(self.managersDir, name) + planetDisFile = os.path.join(managerDir, 'planet-disabled.xml') + planetFile = os.path.join(managerDir, 'planet.xml') + if not os.path.exists(planetFile): + if os.path.exists(planetDisFile): + return True + return False + elif type == 'worker': + workerFile = os.path.join(self.workersDir, "%s.xml" % name) + wkDisFile = os.path.join(self.workersDir, "%s-disabled.xml" % name) + if not os.path.exists(workerFile): + if os.path.exists(wkDisFile): + return True + return False + def list(self): """ List all service parts managed. diff -Nru flumotion-0.6.1/flumotion/test/bouncertest.py flumotion-0.9.1/flumotion/test/bouncertest.py --- flumotion-0.6.1/flumotion/test/bouncertest.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/bouncertest.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import testsuite @@ -26,17 +22,6 @@ from flumotion.common import keycards -class FakeMedium: - calls = [] - - def callRemote(self, method, *args, **kwargs): - if not self.calls: - # avoid modifying the class attribute - self.calls = [] - self.calls.append((method, args, kwargs)) - return defer.succeed(None) - - class BouncerTestHelper(testsuite.TestCase): bouncerClass = None @@ -70,120 +55,3 @@ d = defer.maybeDeferred(bouncer.authenticate, keycard) d.addCallback(check_result) return d - - -class TrivialBouncerTest(testsuite.TestCase): - obj = None - medium = None - - def setUp(self): - assert self.obj, "subclass must set self.obj" - assert self.medium, "subclass must set self.medium" - - def testHarness(self): - pass - - def assertAttr(self, keycard, attr, val): - self.assertEquals(getattr(keycard, attr), val) - return keycard - - def testAuthentication(self): - k = keycards.KeycardGeneric() - self.assertEquals(k.state, keycards.REQUESTING) - - d = self.obj.authenticate(k) - d.addCallback(self.assertAttr, 'state', keycards.AUTHENTICATED) - return d - - def setKeycardExpireInterval(self, interval): - # can be overridden - self.obj._expirer.timeout = interval - - def testTimeoutAlgorithm(self): - # the plan: make a keycard that expires in 0.75 seconds, and - # set up the component such that it checks for expired keycards - # every half second. this test will check the keycard's - # ttl value at 0.25 seconds and 0.75 seconds, and will - # make sure that at 1.25 seconds that the keycard is out of the - # bouncer. - - # check for expired keycards every half a second - self.setKeycardExpireInterval(0.5) - - def checkTimeout(k): - - def check(expected, inBouncer, furtherChecks): - if k.ttl != expected: - d.errback(AssertionError('ttl %r != expected %r' - % (k.ttl, expected))) - return - if inBouncer: - if not self.obj.hasKeycard(k): - d.errback(AssertionError('comp missing keycard')) - return - else: - if self.obj.hasKeycard(k): - d.errback(AssertionError( - 'comp unexpectedly has keycard')) - return - - if furtherChecks: - args = furtherChecks.pop(0) - args += (furtherChecks, ) - reactor.callLater(*args) - else: - d.callback('success') - reactor.callLater(0.25, check, 0.75, True, - [(0.5, check, 0.25, True), - (0.5, check, -0.25, False)]) - d = defer.Deferred() - return d - - def checkCalls(res): - self.assertEquals(self.medium.calls, - [('expireKeycard', (k.requesterId, k.id), {})]) - return res - - k = keycards.KeycardGeneric() - k.ttl = 0.75 - self.assertEquals(k.state, keycards.REQUESTING) - d = self.obj.authenticate(k) - d.addCallback(self.assertAttr, 'state', keycards.AUTHENTICATED) - d.addCallback(self.assertAttr, 'ttl', 0.75) - d.addCallback(checkTimeout) - d.addCallback(checkCalls) - return d - - def testKeepAlive(self): - - def adjustTTL(_): - self.assertEquals(k.ttl, 0.75) - self.obj.keepAlive('bar', 10) - self.assertEquals(k.ttl, 0.75) - self.obj.keepAlive('foo', 10) - self.assertEquals(k.ttl, 10) - - k = keycards.KeycardGeneric() - k.ttl = 0.75 - k.issuerName = 'foo' - self.assertEquals(k.state, keycards.REQUESTING) - d = self.obj.authenticate(k) - d.addCallback(self.assertAttr, 'state', keycards.AUTHENTICATED) - d.addCallback(self.assertAttr, 'ttl', 0.75) - d.addCallback(adjustTTL) - return d - - def testAutoExpire(self): - - def authenticated(_): - self.assertAttr(k, 'state', keycards.REFUSED) - self.assertAttr(k, 'ttl', 0) - self.failIf(self.obj.hasKeycard(k)) - self.assertEquals(self.medium.calls, []) - - k = keycards.KeycardGeneric() - k.ttl = 0 - self.assertEquals(k.state, keycards.REQUESTING) - d = self.obj.authenticate(k) - d.addCallback(authenticated) - return d diff -Nru flumotion-0.6.1/flumotion/test/common.py flumotion-0.9.1/flumotion/test/common.py --- flumotion-0.6.1/flumotion/test/common.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/common.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. diff -Nru flumotion-0.6.1/flumotion/test/comptest.py flumotion-0.9.1/flumotion/test/comptest.py --- flumotion-0.6.1/flumotion/test/comptest.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/comptest.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import new diff -Nru flumotion-0.6.1/flumotion/test/gtkunit.py flumotion-0.9.1/flumotion/test/gtkunit.py --- flumotion-0.6.1/flumotion/test/gtkunit.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/gtkunit.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_greeter -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os diff -Nru flumotion-0.6.1/flumotion/test/__init__.py flumotion-0.9.1/flumotion/test/__init__.py --- flumotion-0.6.1/flumotion/test/__init__.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os diff -Nru flumotion-0.6.1/flumotion/test/Makefile.am flumotion-0.9.1/flumotion/test/Makefile.am --- flumotion-0.6.1/flumotion/test/Makefile.am 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -20,6 +20,7 @@ test_admin_connections.py \ test_admin_multi.py \ test_checkers.py \ + test_cache_manager.py \ test_common.py \ test_common_avltree.py \ test_common_bundle.py \ @@ -28,6 +29,7 @@ test_common_eventcalendar.py \ test_common_format.py \ test_common_gstreamer.py \ + test_common_managerspawner.py \ test_common_messages.py \ test_common_netutils.py \ test_common_package.py \ @@ -36,10 +38,10 @@ test_common_pygobject.py \ test_common_signals.py \ test_common_vfs.py \ + test_common_xdg.py \ test_common_xmlwriter.py \ test_component_base_scheduler.py \ test_component_base_watcher.py \ - test_component_bouncers_bouncer.py \ test_component_bouncers_bouncer_authsession.py \ test_component_bouncers_component.py \ test_component_bouncers_plug.py \ @@ -47,10 +49,13 @@ test_component_feed.py \ test_component_feedcomponent.py \ test_component_httpserver.py \ + test_component_httpserver_httpcached_httputils.py \ + test_component_httpserver_httpcached_stats.py \ test_component_httpstreamer.py \ test_component_init.py \ test_component_padmonitor.py \ test_component_playlist.py \ + test_component_video_converter.py \ test_component.py \ test_comptest.py \ test_config.py \ @@ -67,6 +72,7 @@ test_i18n.py \ test_import.py \ test_keycards.py \ + test_launch_parse.py \ test_logfilter.py \ test_manager_admin.py \ test_manager_config.py \ @@ -81,6 +87,7 @@ test_reflect.py \ test_registry.py \ test_saltsha256.py \ + test_server_selector.py \ test_testclasses.py \ test_twisted_integration.py \ test_ui_fgtk.py \ diff -Nru flumotion-0.6.1/flumotion/test/Makefile.in flumotion-0.9.1/flumotion/test/Makefile.in --- flumotion-0.6.1/flumotion/test/Makefile.in 2009-09-09 11:37:58.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/Makefile.in 2011-09-11 08:09:24.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -52,14 +52,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -110,6 +109,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -119,18 +119,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -178,6 +171,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -195,16 +189,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -212,7 +208,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -227,6 +222,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -259,7 +255,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -279,6 +274,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +TRIAL_FLAGS = --reporter=timing TRIAL_ENV = $(top_builddir)/env flumotiondir = $(libdir)/flumotion/python/flumotion/test flumotion_PYTHON = \ @@ -297,6 +293,7 @@ test_admin_connections.py \ test_admin_multi.py \ test_checkers.py \ + test_cache_manager.py \ test_common.py \ test_common_avltree.py \ test_common_bundle.py \ @@ -305,6 +302,7 @@ test_common_eventcalendar.py \ test_common_format.py \ test_common_gstreamer.py \ + test_common_managerspawner.py \ test_common_messages.py \ test_common_netutils.py \ test_common_package.py \ @@ -313,10 +311,10 @@ test_common_pygobject.py \ test_common_signals.py \ test_common_vfs.py \ + test_common_xdg.py \ test_common_xmlwriter.py \ test_component_base_scheduler.py \ test_component_base_watcher.py \ - test_component_bouncers_bouncer.py \ test_component_bouncers_bouncer_authsession.py \ test_component_bouncers_component.py \ test_component_bouncers_plug.py \ @@ -324,10 +322,13 @@ test_component_feed.py \ test_component_feedcomponent.py \ test_component_httpserver.py \ + test_component_httpserver_httpcached_httputils.py \ + test_component_httpserver_httpcached_stats.py \ test_component_httpstreamer.py \ test_component_init.py \ test_component_padmonitor.py \ test_component_playlist.py \ + test_component_video_converter.py \ test_component.py \ test_comptest.py \ test_config.py \ @@ -344,6 +345,7 @@ test_i18n.py \ test_import.py \ test_keycards.py \ + test_launch_parse.py \ test_logfilter.py \ test_manager_admin.py \ test_manager_config.py \ @@ -358,6 +360,7 @@ test_reflect.py \ test_registry.py \ test_saltsha256.py \ + test_server_selector.py \ test_testclasses.py \ test_twisted_integration.py \ test_ui_fgtk.py \ @@ -616,8 +619,8 @@ @if test -z "$(TRIAL_ENV)"; then \ echo "Please set the TRIAL_ENV Makefile variable."; \ exit 1; fi - $(TRIAL_ENV) $(top_srcdir)/common/flumotion-trial -r default \ - flumotion.test 2>&1 \ + $(TRIAL_ENV) $(top_srcdir)/common/flumotion-trial -r default \ + $(TRIAL_FLAGS) flumotion.test 2>&1 \ | tee trial.test.log; \ if ! test $${PIPESTATUS[0]} -eq 0; \ then \ @@ -625,7 +628,7 @@ exit 1; \ fi; \ $(TRIAL_ENV) $(top_srcdir)/common/flumotion-trial -r gtk2 \ - flumotion.test 2>&1 \ + $(TRIAL_FLAGS) flumotion.test 2>&1 \ | tee -a trial.test.log; \ if test $${PIPESTATUS[0]} -eq 0; \ then \ diff -Nru flumotion-0.6.1/flumotion/test/realm.py flumotion-0.9.1/flumotion/test/realm.py --- flumotion-0.6.1/flumotion/test/realm.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/realm.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_worker_worker -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.cred import portal diff -Nru flumotion-0.6.1/flumotion/test/test_admin_admin.py flumotion-0.9.1/flumotion/test/test_admin_admin.py --- flumotion-0.6.1/flumotion/test/test_admin_admin.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_admin_admin.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_admin_admin -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.internet import defer @@ -26,12 +22,15 @@ from flumotion.common import testsuite from flumotion.twisted import pb +attr = testsuite.attr + class AdminTest(testsuite.TestCaseWithManager): def testConstructor(self): model = admin.AdminModel() + @attr('slow') def testConnectSuccess(self): def connected(_): @@ -46,6 +45,7 @@ d.addCallback(connected) return d + @attr('slow') def testReconnect(self): disconnectDeferred = defer.Deferred() reconnectDeferred = defer.Deferred() diff -Nru flumotion-0.6.1/flumotion/test/test_admin_config.py flumotion-0.9.1/flumotion/test/test_admin_config.py --- flumotion-0.6.1/flumotion/test/test_admin_config.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_admin_config.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from StringIO import StringIO @@ -64,7 +60,7 @@ def testUnknownPlug(self): doc = ('' '' - '' + '' '' '' '') @@ -74,7 +70,7 @@ def testUnknownSocket(self): doc = ('' '' - '' + '' '' '' '') diff -Nru flumotion-0.6.1/flumotion/test/test_admin_connections.py flumotion-0.9.1/flumotion/test/test_admin_connections.py --- flumotion-0.6.1/flumotion/test/test_admin_connections.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_admin_connections.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,34 +1,162 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_admin_multi -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import testsuite -from flumotion.admin.connections import getRecentConnections, \ - RecentConnection +import os +import shutil +from flumotion.configure import configure +from flumotion.common import connection, errors, xdg +from flumotion.admin.connections import getRecentConnections +from flumotion.admin.connections import parsePBConnectionInfoRecent + + +def _create_connection(f, port, host, manager, use_insecure, user, passwd): + f.write(''' + %s + %s + %s + %s + %s + %s + ''' % (port, host, manager, use_insecure, + user, passwd)) class AdminConnectiontionsTest(testsuite.TestCase): + def setUp(self): + # create a fake list of recent connection files + self.old_registrydir = configure.registrydir + self.new_registrydir = self.mktemp() + os.mkdir(self.new_registrydir) + configure.registrydir = self.new_registrydir + + rc1 = file(os.path.join(self.new_registrydir, 'fake.connection'), 'w') + _create_connection(rc1, 1234, 'test.host.com', 'fake-manager', + '1', 'testuser', 'testpasswd') + rc1.close() + rc2 = file(os.path.join(self.new_registrydir, 'fake2.connection'), 'w') + _create_connection(rc2, 1235, 'test2.host.com', 'fake-manager', + '0', 'test2user', 'test2passwd') + rc2.close() + + # this should not be picked up as a recent connection file + nrc = file(os.path.join(self.new_registrydir, 'fake3'), 'w') + _create_connection(nrc, 1236, 'testx.host.com', 'fake-manager', + '1', 'testxuser', 'testxpasswd') + nrc.close() + + # create a fake default connections file + self.old_xdg_config_home = os.environ.get('XDG_CONFIG_HOME') + self.new_xdg_config_home = self.mktemp() + os.mkdir(self.new_xdg_config_home) + os.environ['XDG_CONFIG_HOME'] = self.new_xdg_config_home + + def1 = xdg.config_write_path('connections', 'w') + def1.write('') + _create_connection(def1, '2*', 'test3.host.com', 'fake-manager', + '1', 'testdefuser', 'testdefpasswd') + _create_connection(def1, '*', '*.host', 'fake-manager', + '*', 'x', 'testxpasswd') + def1.write('') + def1.close() + + def tearDown(self): + shutil.rmtree(self.new_registrydir) + configure.registrydir = self.old_registrydir + + shutil.rmtree(self.new_xdg_config_home) + if self.old_xdg_config_home is not None: + os.environ['XDG_CONFIG_HOME'] = self.old_xdg_config_home + else: + del os.environ['XDG_CONFIG_HOME'] + def testGetRecentConnections(self): - recent = getRecentConnections() - if not recent: - return - assert isinstance(recent[0], RecentConnection) + r = getRecentConnections() + self.assertEquals(len(r), 2) + + # the recent connections are read in reverse lexicographical order + ci2, ci1 = r[0].info, r[1].info + self.assertEquals(ci1.port, 1234) + self.assertEquals(ci1.host, 'test.host.com') + self.assertEquals(ci1.use_ssl, False) + self.assertEquals(ci1.authenticator.username, 'testuser') + self.assertEquals(ci1.authenticator.password, 'testpasswd') + self.assertEquals(ci2.port, 1235) + self.assertEquals(ci2.host, 'test2.host.com') + self.assertEquals(ci2.use_ssl, True) + self.assertEquals(ci2.authenticator.username, 'test2user') + self.assertEquals(ci2.authenticator.password, 'test2passwd') + + def testParsePBConnectionRecent(self): + pPBCIR = parsePBConnectionInfoRecent + + info = pPBCIR('') + # with an empty manager string we should get the last recent connection + self.assertEquals(info.port, 1235) + self.assertEquals(info.host, 'test2.host.com') + self.assertEquals(info.use_ssl, True) + self.assertEquals(info.authenticator.username, 'test2user') + self.assertEquals(info.authenticator.password, 'test2passwd') + + info = pPBCIR('test2.host.com:1235') + # there is a recent connection for this manager + self.assertEquals(info.port, 1235) + self.assertEquals(info.host, 'test2.host.com') + self.assertEquals(info.use_ssl, True) + self.assertEquals(info.authenticator.username, 'test2user') + self.assertEquals(info.authenticator.password, 'test2passwd') + + info = pPBCIR('test.host.com:1234', use_ssl=False) + self.assertEquals(info.port, 1234) + self.assertEquals(info.host, 'test.host.com') + self.assertEquals(info.use_ssl, False) + self.assertEquals(info.authenticator.username, 'testuser') + self.assertEquals(info.authenticator.password, 'testpasswd') + + info = pPBCIR('testuser@test.host.com:1234', use_ssl=False) + self.assertEquals(info.port, 1234) + self.assertEquals(info.host, 'test.host.com') + self.assertEquals(info.use_ssl, False) + self.assertEquals(info.authenticator.username, 'testuser') + self.assertEquals(info.authenticator.password, 'testpasswd') + + # default connections + info = pPBCIR('test3.host.com:2234', use_ssl=False) + self.assertEquals(info.port, 2234) + self.assertEquals(info.host, 'test3.host.com') + self.assertEquals(info.use_ssl, False) + self.assertEquals(info.authenticator.username, 'testdefuser') + self.assertEquals(info.authenticator.password, 'testdefpasswd') + + info = pPBCIR('x@random.host:1234') + self.assertEquals(info.port, 1234) + self.assertEquals(info.host, 'random.host') + self.assertEquals(info.use_ssl, True) + self.assertEquals(info.authenticator.username, 'x') + self.assertEquals(info.authenticator.password, 'testxpasswd') + + # incompatible port + self.assertRaises(errors.OptionError, pPBCIR, 'test2.host.com:1234') + self.assertRaises(errors.OptionError, pPBCIR, 'test3.host.com:1234') + # incompatible SSL settings + self.assertRaises(errors.OptionError, pPBCIR, 'test.host.com:1234') + self.assertRaises(errors.OptionError, pPBCIR, 'test3.host.com:2234', + use_ssl=True) + # incompatible user + self.assertRaises(errors.OptionError, pPBCIR, 'y@test3.host.com:1234') diff -Nru flumotion-0.6.1/flumotion/test/test_admin_multi.py flumotion-0.9.1/flumotion/test/test_admin_multi.py --- flumotion-0.6.1/flumotion/test/test_admin_multi.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_admin_multi.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_admin_multi -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import testsuite @@ -27,6 +23,8 @@ from flumotion.common import connection from flumotion.twisted import pb +attr = testsuite.attr + class MultiAdminTest(testsuite.TestCaseWithManager): @@ -66,6 +64,7 @@ d.addCallbacks(connected, failure) return d + @attr('slow') def testReconnect(self): class Listener: diff -Nru flumotion-0.6.1/flumotion/test/test_cache_manager.py flumotion-0.9.1/flumotion/test/test_cache_manager.py --- flumotion-0.6.1/flumotion/test/test_cache_manager.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_cache_manager.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,429 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_http -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import os +import random +import shutil +import stat +import tempfile +import time + +from twisted.internet import defer, threads, reactor +from twisted.trial import unittest + +import twisted.copyright +if twisted.copyright.version == 'SVN-Trunk': + SKIP_MSG = "Twisted 2.0.1 thread pool is broken for tests" +else: + SKIP_MSG = None + +from flumotion.common import testsuite, errors +from flumotion.component.misc.httpserver import cachemanager, fileprovider + +attr = testsuite.attr + +CACHE_SIZE = 1 * 1024 * 1024 +MAX_CLEANUPS = 64 +MAX_PAGE_SIZE = 32 * 1024 + + +class DummyStats: + + def __init__(self): + self.oncleanup = 0 + self.onestimate = 0 + + def info(): + pass + + def onEstimateCacheUsage(self, usage, size): + self.onestimate += 1 + self.usage = usage + self.size = size + + def onCleanup(self): + self.oncleanup += 1 + + +class TestCacheManager(testsuite.TestCase): + + skip = SKIP_MSG + + def setUp(self): + from twisted.python import threadpool + reactor.threadpool = threadpool.ThreadPool(0, 10) + reactor.threadpool.start() + + self.path = tempfile.mkdtemp(suffix=".flumotion.test") + self.stats = DummyStats() + self._file = None + + def tearDown(self): + shutil.rmtree(self.path, ignore_errors=True) + + reactor.threadpool.stop() + reactor.threadpool = None + + def completeAndClose(self, t, m): + try: + t.complete() + except: + # we don't care whatever this might raises, we just want + # to close the temp file. There are other tests to check + # if complete() raises something unexpected. + pass + + try: + t.close() + except: + print "Got a close exception" + raise + + def checkUsage(self, usage, m, size): + self.failIf(abs(m._cacheUsage - size) > MAX_PAGE_SIZE) + + def _releaseCacheSpace(self, tag, m): + self.checkUsage(None, m, 100 * 1024) + m.releaseCacheSpace(tag) + self.checkUsage(None, m, 0) + + def testLowLevel(self): + + def _makeTemp(tag, size, m, name): + t = cachemanager.TempFile(m, name, tag, size) + return t + + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE, True, 0.5, 0.3) + + # getIdentifier/Path + self.assertEquals(type(m.getIdentifier("path")), type("")) + self.assertEquals(m.getIdentifier("path"), m.getIdentifier("path")) + self.failIfEquals(m.getIdentifier("path"), m.getIdentifier("path2")) + + self.assertEquals(type(m.getCachePath("path")), type("")) + self.assertEquals(type(m.getTempPath("path")), type("")) + + # updateCacheUsage ~= 0 + d = m.updateCacheUsage() + d.addCallback(self.checkUsage, m, 0) + + # allocate&release + d.addCallback(lambda _: m.allocateCacheSpace(100 * 1024)) + d.addCallback(self._releaseCacheSpace, m) + + # updateCacheUsage ~= 0 + d.addCallback(lambda _: m.updateCacheUsage()) + d.addCallback(self.checkUsage, m, 0) + + # allocate > CACHE_SIZE + d.addCallback(lambda _: m.allocateCacheSpace(CACHE_SIZE * 2)) + d.addCallback(lambda c: self.failUnless(c is None)) + d.addErrback(self.fail) + + # updateCacheUsage ~= 0 + d.addCallback(lambda _: m.updateCacheUsage()) + d.addCallback(self.checkUsage, m, 0) + + # close incomplete TempFile + d.addCallback(lambda _: m.allocateCacheSpace(100 * 1024)) + d.addCallback(_makeTemp, 100 * 1024, m, "test") + d.addCallback(lambda t: t.close()) + + # updateCacheUsage ~= 0 + d.addCallback(lambda _: m.updateCacheUsage()) + d.addCallback(self.checkUsage, m, 0) + + # close complete TempFile + d.addCallback(lambda _: m.allocateCacheSpace(100 * 1024)) + d.addCallback(_makeTemp, 100 * 1024, m, "test1") + d.addCallback(self.completeAndClose, m) + + # updateCacheUsage ~= 100k + d.addCallback(lambda _: m.updateCacheUsage()) + d.addCallback(self.checkUsage, m, 100 * 1024) + + return d + + def checkCacheHit(self, m, name): + d = m.openCacheFile(name) + d.addCallback(lambda f: f.close()) + d.addErrback(self.fail) + return d + + def checkCacheMiss(self, m, name): + d = m.openCacheFile(name) + d.addCallback(lambda c: self.failUnless(c is None)) + return d + + @attr('slow') + def testHitMiss(self): + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE, True, 0.5, 0.2) + + # updateCacheUsage ~= 0 + d = m.updateCacheUsage() + d.addCallback(self.checkUsage, m, 0) + + d.addCallback(lambda _: self.checkCacheMiss(m, "test3")) + d.addCallback(lambda _: self.checkCacheMiss(m, "test4")) + + d.addCallback(lambda _: m.newTempFile("test3", + CACHE_SIZE - MAX_PAGE_SIZE)) + + d.addCallback(lambda f: setattr(self, "_file", f)) + d.addCallback(lambda _: self.checkCacheMiss(m, "test3")) + + d.addCallback(lambda _: self._file) + d.addCallback(self.completeAndClose, m) + d.addErrback(self.fail) + + d.addCallback(lambda _: self.checkCacheHit(m, "test3")) + d.addCallback(lambda _: self.checkCacheMiss(m, "test4")) + + d.addCallback(lambda _: m.newTempFile("test4", + CACHE_SIZE - MAX_PAGE_SIZE)) + d.addCallback(self.completeAndClose, m) + + # The cache cleaning is done in a seperate thread... + d.addCallback(lambda _: time.sleep(1)) + d.addCallback(lambda _: self.checkCacheMiss(m, "test3")) + + return d + + def fillTestCache(self, manager, size): + d = defer.Deferred() + i = 0 + + def requestNewTempFile(_, i, s): + return manager.newTempFile(str(i), s) + + while (size > 0): + i += 1 + filesize = random.randint(MAX_PAGE_SIZE, MAX_PAGE_SIZE * 3) + size -= filesize + d.addCallback(requestNewTempFile, i, filesize) + d.addCallback(self.completeAndClose, manager) + d.callback(None) + return d + + @attr('slow') + def testCacheCleanUp(self): + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE, True, 0.4, 0.2) + + self.failIf(m.stats.oncleanup != 0) + + d = self.fillTestCache(m, CACHE_SIZE * 4) + + # The cache cleaning is done in a seperate thread... + d.addCallback(lambda _: time.sleep(1)) + d.addCallback(lambda _: m.updateCacheUsage()) + d.addCallback(lambda u: self.failIf(u > CACHE_SIZE / 2)) + d.addCallback(lambda _: self.failIf(m.stats.oncleanup < 5)) + + return d + + def testConflict(self): + + def writeContent(f): + f.write("content\n") + return f + + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE, True, 0.4, 0.2) + # create a cache for "file' with some content + d = m.newTempFile("file", 1024) + d.addCallback(writeContent) + d.addCallback(lambda f: setattr(self, "_file", f)) + + # create a second cache for "file' + d.addCallback(lambda _: m.newTempFile("file", 1024)) + d.addCallback(writeContent) + # and complete it now + d.addCallback(self.completeAndClose, m) + + # then, complete first cache (conflict) + d.addCallback(lambda _: self._file) + d.addCallback(self.completeAndClose, m) + d.addCallback(lambda f: setattr(self, "_file", None)) + + # check that we get back our content after conflict + d.addCallback(lambda _: m.openCacheFile("file")) + d.addCallback(lambda f: setattr(self, "_file", f)) + d.addCallback(lambda _: self._file.readline()) + d.addCallback(lambda s: self.assertEqual(s, "content\n")) + d.addCallback(lambda _: self._file.close()) + + return d + + def testMTime(self): + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE, True, 0.4, 0.2) + d = m.newTempFile("test_mtime", 1024, 1256040206) + d.addCallback(self.completeAndClose, m) + + d.addCallback(lambda _: m.openCacheFile("test_mtime")) + d.addCallback(lambda f: f.stat[stat.ST_MTIME]) + d.addCallback(lambda t: self.assertEqual(t, 1256040206)) + return d + + def testConflictMTime(self): + + def writeContent(f, content): + f.write(content) + return f + + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE, True, 0.4, 0.2) + # create a cache for "file' with some old content + d = m.newTempFile("file", 1024, 1256040206) + d.addCallback(writeContent, "old\n") + d.addCallback(lambda f: setattr(self, "_file", f)) + + # create a second cache for "file' with newer content + d.addCallback(lambda _: m.newTempFile("file", 1024, 1256040207)) + d.addCallback(writeContent, "new\n") + # and complete it now + d.addCallback(self.completeAndClose, m) + + # then, complete first cache (conflict) + d.addCallback(lambda _: self._file) + d.addCallback(self.completeAndClose, m) + d.addCallback(lambda f: setattr(self, "_file", None)) + + # check that we get back our "new" content after conflict + d.addCallback(lambda _: m.openCacheFile("file")) + d.addCallback(lambda f: setattr(self, "_file", f)) + d.addCallback(lambda _: self._file.readline()) + d.addCallback(lambda s: self.assertEqual(s, "new\n")) + d.addCallback(lambda _: self._file.close()) + + return d + + def testFileSizeLimit(self): + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE, True, 0.4, 0.2) + + d = m.newTempFile("test_limit", 5) + d.addCallback(lambda f: f.write("123456")) + d.addCallback(self.fail) + d.addErrback(lambda f: f.trap(IOError)) + d.addCallback(lambda _: None) + + return d + + def checkCompleted(self, f): + f.write("12345") + f.complete(True) + f.close() + + def checkIncomplete(self, f): + self.failUnlessRaises(IOError, f.complete, True) + f.close() + + def testCheckCompleted(self): + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE, True, 0.4, 0.2) + + d = m.newTempFile("test_completed", 5) + d.addCallback(self.checkCompleted) + + d.addCallback(lambda _: m.newTempFile("test_incomplete", 5)) + d.addCallback(self.checkIncomplete) + + return d + + def fillTestCache2(self, manager): + i = 0 + while (manager.stats.oncleanup < MAX_CLEANUPS): + i += 1 + filesize = 4096 * random.randint(1, 30) + d = manager.newTempFile(str(i), filesize) + d.addCallback(self.completeAndClose, manager) + d.addErrback(lambda f: f.trap(fileprovider.FileError)) + + def testNoCleanUp(self): + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE * 1.1, False, 1.0, 0.2) + + d = m.newTempFile("FAT FILE", CACHE_SIZE / 2) + d.addCallback(self.completeAndClose, m) + + d.addCallback(lambda _: m.newTempFile("FAT FILE TWIN", CACHE_SIZE / 2)) + d.addCallback(self.completeAndClose, m) + + d.addCallback(lambda _: m.newTempFile("FAT FILE BRO'", CACHE_SIZE / 2)) + d.addCallback(lambda t: self.failUnless(t is None)) + + d.addCallback(lambda _: self.failIf(m.stats.oncleanup != 0)) + + return d + + def testUnlink(self): + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE, False, 0.5, 0.2) + + name = "unlink-me" + path = m.getCachePath(name) + + d = m.newTempFile(name, 1024, 1256040206) + # TODO: d.addCallback(lambda f: f.complete) is not enough to + # pass the test, weirdo... + d.addCallback(self.completeAndClose, m) + + # check that unlink actually works + d.addCallback(lambda _: m.openCacheFile(name)) + d.addErrback(lambda _: self.fail) + d.addCallback(lambda c: c.unlink()) + + d.addCallback(lambda _: os.stat(path)) + d.addCallback(self.fail) + d.addErrback(lambda f: f.trap(OSError)) + + # now check that we keep more recent version + d.addCallback(lambda _: m.newTempFile(name, 1024, 1256040206)) + d.addCallback(self.completeAndClose, m) + + d.addCallback(lambda _: m.openCacheFile(name)) + d.addCallback(lambda f: setattr(self, "_file", f)) + # cache a more recent version + d.addCallback(lambda _: m.newTempFile(name, 1024, 1256040208)) + d.addCallback(self.completeAndClose, m) + # try remove an outdated CachedFile + d.addCallback(lambda _: self._file.unlink()) + + # check file is still there + d.addCallback(lambda _: os.stat(path)) + + return d + + def testMultiThread(self): + # FIXME: this test can deadlock.... + return + + m = cachemanager.CacheManager(self.stats, self.path, + CACHE_SIZE, True, 0.4, 0.2) + dl = [] + d = threads.deferToThread(self.fillTestCache2, m) + dl.append(d) + threads.deferToThread(self.fillTestCache2, m) + dl.append(d) + threads.deferToThread(self.fillTestCache2, m) + dl.append(d) + + return defer.DeferredList(dl) diff -Nru flumotion-0.6.1/flumotion/test/test_checkers.py flumotion-0.9.1/flumotion/test/test_checkers.py --- flumotion-0.6.1/flumotion/test/test_checkers.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_checkers.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_checkers -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import testsuite diff -Nru flumotion-0.6.1/flumotion/test/test_common_avltree.py flumotion-0.9.1/flumotion/test/test_common_avltree.py --- flumotion-0.6.1/flumotion/test/test_common_avltree.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_avltree.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import random @@ -24,6 +20,8 @@ from flumotion.common import avltree from flumotion.common import testsuite +attr = testsuite.attr + class TestAVLTree(testsuite.TestCase): @@ -111,6 +109,7 @@ self.assertOrdered(tree.tree, i, 40-i-1) self.assertBalanced(tree.tree) + @attr('slow') def testInsertRandomRemoveRandom(self): tree = avltree.AVLTree() diff -Nru flumotion-0.6.1/flumotion/test/test_common_bundle.py flumotion-0.9.1/flumotion/test/test_common_bundle.py --- flumotion-0.6.1/flumotion/test/test_common_bundle.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_bundle.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_bundle -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.trial import unittest @@ -31,6 +27,8 @@ import zipfile import time +attr = testsuite.attr + class TestBundler(testsuite.TestCase): # everything we need to set up the test environment @@ -93,6 +91,7 @@ # create a bundle of two files then update one of them and check # the md5sum changes + @attr('slow') def testBundlerTwoFiles(self): data = open(self.filename, "r").read() diff -Nru flumotion-0.6.1/flumotion/test/test_common_componentui.py flumotion-0.9.1/flumotion/test/test_common_componentui.py --- flumotion-0.6.1/flumotion/test/test_common_componentui.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_componentui.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,26 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_componentui -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import componentui from flumotion.common import testsuite from flumotion.twisted.defer import defer_generator_method +attr = testsuite.attr + class FakeObject: pass @@ -174,6 +172,7 @@ d.addCallback(workerBearChildCallback) return d + @attr('slow') def testStateListener(self): def getStateCallback(state): @@ -225,6 +224,7 @@ # verify if we have the right number of items proxied, # ie the manager reference doesn't do something weird + @attr('slow') def testStateListenerIntermediate(self): def workerGetStateCallback(state): @@ -285,6 +285,7 @@ d.addCallback(workerHaveAdoptedCallback) return d + @attr('slow') def testStateSaveReference(self): # show that we need to keep the state reference around for listener # to work diff -Nru flumotion-0.6.1/flumotion/test/test_common_connection.py flumotion-0.9.1/flumotion/test/test_common_connection.py --- flumotion-0.6.1/flumotion/test/test_common_connection.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_connection.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import connection diff -Nru flumotion-0.6.1/flumotion/test/test_common_eventcalendar.py flumotion-0.9.1/flumotion/test/test_common_eventcalendar.py --- flumotion-0.6.1/flumotion/test/test_common_eventcalendar.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_eventcalendar.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,43 +1,40 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_common_eventcalendar -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os -import datetime +from datetime import datetime, timedelta, date import time import calendar import icalendar -from dateutil import parser, rrule, tz +from dateutil import parser, rrule from flumotion.common import testsuite from flumotion.common import eventcalendar +from flumotion.common.eventcalendar import Event, Calendar +from flumotion.common import tz +from flumotion.common.tz import LOCAL, UTC, DSTTimezone -LOCAL = eventcalendar.LOCAL -LOCAL = icalendar.LocalTimezone() -UTC = eventcalendar.UTC +attr = testsuite.attr def _now(tz=UTC): - return datetime.datetime.now(tz) + return datetime.now(tz) _dayOfTheWeek = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] @@ -56,24 +53,22 @@ def testAddEventsWithSameUID(self): # test that internally they end up in the same event set - calendar = eventcalendar.Calendar() + calendar = Calendar() - start1 = datetime.datetime.now(eventcalendar.UTC) - end1 = start1 + datetime.timedelta(hours=1) + start1 = datetime.now(UTC) + end1 = start1 + timedelta(hours=1) content1 = "content1" - now1 = start1 - exdates1 = [start1 + datetime.timedelta(hours=2)] + exdates1 = [start1 + timedelta(hours=2)] start2 = start1 - end2 = start2 + datetime.timedelta(hours=1) + end2 = start2 + timedelta(hours=1) content2 = "content2" - now2 = start2 - exdates2 = [start2 + datetime.timedelta(hours=2)] + exdates2 = [start2 + timedelta(hours=2)] - e1 = eventcalendar.Event('uid', start1, end1, content1, rrules=None, - exdates=exdates1) - e2 = eventcalendar.Event('uid', start2, end2, content2, rrules=None, - exdates=exdates2) + e1 = Event('uid', start1, end1, content1, rrules=None, + exdates=exdates1) + e2 = Event('uid', start2, end2, content2, rrules=None, + exdates=exdates2) calendar.addEvent(e1) calendar.addEvent(e2) @@ -89,20 +84,18 @@ def testAddEventsWithDifferentUID(self): # test that internally they end up in different event sets - calendar = eventcalendar.Calendar() + calendar = Calendar() - start1 = datetime.datetime.now(eventcalendar.UTC) - end1 = start1 + datetime.timedelta(hours=1) - exdates1 = [start1 + datetime.timedelta(hours=2)] + start1 = datetime.now(UTC) + end1 = start1 + timedelta(hours=1) + exdates1 = [start1 + timedelta(hours=2)] start2 = start1 - end2 = start2 + datetime.timedelta(hours=1) - exdates2 = [start2 + datetime.timedelta(hours=2)] + end2 = start2 + timedelta(hours=1) + exdates2 = [start2 + timedelta(hours=2)] - e1 = eventcalendar.Event('uid1', start1, end1, 'content1', - exdates=exdates1) - e2 = eventcalendar.Event('uid2', start2, end2, 'content2', - exdates=exdates2) + e1 = Event('uid1', start1, end1, 'content1', exdates=exdates1) + e2 = Event('uid2', start2, end2, 'content2', exdates=exdates2) calendar.addEvent(e1) calendar.addEvent(e2) @@ -118,11 +111,11 @@ def testAddEvent(self): now = _now() start = now - end = start + datetime.timedelta(hours=1) - exdates = [start + datetime.timedelta(hours=2)] + end = start + timedelta(hours=1) + exdates = [start + timedelta(hours=2)] - calendar = eventcalendar.Calendar() - calendar.addEvent(eventcalendar.Event('uid', start, end, 'foo', + calendar = Calendar() + calendar.addEvent(Event('uid', start, end, 'foo', exdates=exdates)) event = calendar._eventSets['uid']._events[0] @@ -131,11 +124,11 @@ def testGetActiveSimple(self): now = _now() - start = now - datetime.timedelta(hours=1) - end = now + datetime.timedelta(minutes=1) + start = now - timedelta(hours=1) + end = now + timedelta(minutes=1) - calendar = eventcalendar.Calendar() - calendar.addEvent(eventcalendar.Event('uid', start, end, 'foo')) + calendar = Calendar() + calendar.addEvent(Event('uid', start, end, 'foo')) ei = calendar.getActiveEventInstances()[0] self.assertEventAttribsEqual(ei.event, start, end, 'foo', @@ -146,15 +139,15 @@ # and lasting two hours now = _now() now = now.replace(microsecond=0) - start = now - datetime.timedelta(hours=1) - end = now + datetime.timedelta(hours=1) + start = now - timedelta(hours=1) + end = now + timedelta(hours=1) rrules = ["FREQ=DAILY;WKST=MO", ] self.debug('now is %s', str(now)) self.debug('rrule starts at %s', str(start)) - cal = eventcalendar.Calendar() - cal.addEvent(eventcalendar.Event('uid', start, end, "event1", + cal = Calendar() + cal.addEvent(Event('uid', start, end, "event1", rrules=rrules)) # check active instances now @@ -163,31 +156,31 @@ self.assertEventAttribsEqual(eis[0].event, start, end, "event1", rrules, None) - self.assertEquals(eis[0].start, now - datetime.timedelta(hours=1)) - self.assertEquals(eis[0].end, now + datetime.timedelta(hours=1)) + self.assertEquals(eis[0].start, now - timedelta(hours=1)) + self.assertEquals(eis[0].end, now + timedelta(hours=1)) # check active instances 1 day later - eis = cal.getActiveEventInstances(now + datetime.timedelta(days=1)) + eis = cal.getActiveEventInstances(now + timedelta(days=1)) self.assertEquals(len(eis), 1) self.assertEventAttribsEqual(eis[0].event, start, end, "event1", rrules, None) - self.assertEquals(eis[0].start, now + datetime.timedelta(hours=23)) - self.assertEquals(eis[0].end, now + datetime.timedelta(hours=25)) + self.assertEquals(eis[0].start, now + timedelta(hours=23)) + self.assertEquals(eis[0].end, now + timedelta(hours=25)) def testRecurrenceEventsHourly(self): # create an hourly recurring event, starting 1 hour and 58 minutes ago, # and lasting an hour now = _now() now = now.replace(microsecond=0) - start = now - datetime.timedelta(minutes=118) - end = now - datetime.timedelta(minutes=58) + start = now - timedelta(minutes=118) + end = now - timedelta(minutes=58) rrules = ["FREQ=HOURLY;WKST=MO", ] self.debug('now is %s', str(now)) self.debug('rrule starts at %s', str(start)) - cal = eventcalendar.Calendar() - cal.addEvent(eventcalendar.Event('uid', start, end, "event1", + cal = Calendar() + cal.addEvent(Event('uid', start, end, "event1", rrules=rrules)) # check active instances now @@ -196,19 +189,19 @@ self.assertEventAttribsEqual(eis[0].event, start, end, "event1", rrules, None) - self.assertEquals(eis[0].start, now - datetime.timedelta(hours=1) + - datetime.timedelta(minutes=2)) - self.assertEquals(eis[0].end, now + datetime.timedelta(minutes=2)) + self.assertEquals(eis[0].start, now - timedelta(hours=1) + + timedelta(minutes=2)) + self.assertEquals(eis[0].end, now + timedelta(minutes=2)) # check active instances 1 hour later - eis = cal.getActiveEventInstances(now + datetime.timedelta(hours=1)) + eis = cal.getActiveEventInstances(now + timedelta(hours=1)) self.assertEquals(len(eis), 1) self.assertEventAttribsEqual(eis[0].event, start, end, "event1", rrules, None) - self.assertEquals(eis[0].start, now + datetime.timedelta(minutes=2)) - self.assertEquals(eis[0].end, now + datetime.timedelta(minutes=2) + - datetime.timedelta(hours=1)) + self.assertEquals(eis[0].start, now + timedelta(minutes=2)) + self.assertEquals(eis[0].end, now + timedelta(minutes=2) + + timedelta(hours=1)) def testRecurrenceEventsWhereExDateIsStartDate(self): """ @@ -216,13 +209,13 @@ """ now = _now() now = now.replace(microsecond=0) # recurring adjustments lose precision - start = now - datetime.timedelta(minutes=61) - end = now - datetime.timedelta(minutes=1) + start = now - timedelta(minutes=61) + end = now - timedelta(minutes=1) exdates = [start] rrules = ["FREQ=HOURLY;INTERVAL=1;COUNT=5", ] - calendar = eventcalendar.Calendar() - calendar.addEvent(eventcalendar.Event('uid', start, end, 'foo', + calendar = Calendar() + calendar.addEvent(Event('uid', start, end, 'foo', rrules=rrules, exdates=exdates)) eis = calendar.getActiveEventInstances(start) @@ -237,13 +230,13 @@ # but with an exception for the first instances now = _now() now = now.replace(microsecond=0) # recurring adjustments lose precision - start = now - datetime.timedelta(minutes=61) - end = now - datetime.timedelta(minutes=1) + start = now - timedelta(minutes=61) + end = now - timedelta(minutes=1) exdates = [start] rrules = ["FREQ=HOURLY;INTERVAL=1;COUNT=5", ] - calendar = eventcalendar.Calendar() - calendar.addEvent(eventcalendar.Event('uid', start, end, 'foo', + calendar = Calendar() + calendar.addEvent(Event('uid', start, end, 'foo', rrules=rrules, exdates=exdates)) eis = calendar.getActiveEventInstances() @@ -258,13 +251,13 @@ """ now = _now() now = now.replace(microsecond=0) # recurring adjustments lose precision - start = now - datetime.timedelta(minutes=61) - end = now - datetime.timedelta(minutes=1) - exdates = [start + datetime.timedelta(hours=1)] + start = now - timedelta(minutes=61) + end = now - timedelta(minutes=1) + exdates = [start + timedelta(hours=1)] rrules = ["FREQ=HOURLY;INTERVAL=1;COUNT=5", ] - cal = eventcalendar.Calendar() - cal.addEvent(eventcalendar.Event( + cal = Calendar() + cal.addEvent(Event( 'uid', start, end, 'content', rrules=rrules, exdates=exdates)) self.failIf(cal.getActiveEventInstances()) @@ -276,20 +269,19 @@ """ def yesterdayDayOfTheWeek(now): - yesterday = now - datetime.timedelta(days=1) + yesterday = now - timedelta(days=1) day = calendar.weekday(yesterday.year, yesterday.month, yesterday.day) return _dayOfTheWeek[day] now = _now().replace(microsecond=0) - start = now - datetime.timedelta(days=1) - datetime.timedelta(weeks=1) - end = now + datetime.timedelta(hours=1) - datetime.timedelta(weeks=1) + start = now - timedelta(days=1) - timedelta(weeks=1) + end = now + timedelta(hours=1) - timedelta(weeks=1) rrules = [ "FREQ=WEEKLY;BYDAY=" + yesterdayDayOfTheWeek(now) + ";WKST=MO", ] - cal = eventcalendar.Calendar() - cal.addEvent(eventcalendar.Event( - 'uid', start, end, 'content', rrules=rrules)) + cal = Calendar() + cal.addEvent(Event('uid', start, end, 'content', rrules=rrules)) eis = cal.getActiveEventInstances() self.assertEquals(len(eis), 1) @@ -298,10 +290,10 @@ def testOverMidnight(self): now = _now() - start = now - datetime.timedelta(days=1) - end = now + datetime.timedelta(hours=1) - cal = eventcalendar.Calendar() - cal.addEvent(eventcalendar.Event('uid', start, end, 'content')) + start = now - timedelta(days=1) + end = now + timedelta(hours=1) + cal = Calendar() + cal.addEvent(Event('uid', start, end, 'content')) eis = cal.getActiveEventInstances() self.assertEquals(len(eis), 1) @@ -310,21 +302,21 @@ def testCurrentEventsDoNotEndBeforeNow(self): now = _now() - start = now - datetime.timedelta(hours=2) - end = now - datetime.timedelta(hours=1) + start = now - timedelta(hours=2) + end = now - timedelta(hours=1) - cal = eventcalendar.Calendar() - cal.addEvent(eventcalendar.Event('uid', start, end, 'content')) + cal = Calendar() + cal.addEvent(Event('uid', start, end, 'content')) self.failIf(cal.getActiveEventInstances()) def testCurrentEventsDoNotStartLaterThanTomorrow(self): now = _now() - start = now + datetime.timedelta(days=2) - end = now + datetime.timedelta(days=3) + start = now + timedelta(days=2) + end = now + timedelta(days=3) - cal = eventcalendar.Calendar() - cal.addEvent(eventcalendar.Event('uid', start, end, 'content')) + cal = Calendar() + cal.addEvent(Event('uid', start, end, 'content')) self.failIf(cal.getActiveEventInstances()) @@ -352,31 +344,31 @@ ''' ical = icalendar.Calendar.from_string(data) - start = datetime.datetime(2015, 4, 4, 6, 0, 0, tzinfo=UTC) + start = datetime(2015, 4, 4, 6, 0, 0, tzinfo=UTC) cal = eventcalendar.fromICalendar(ical) # check that the first one is here instances = cal.getActiveEventInstances( - start + datetime.timedelta(seconds=1)) + start + timedelta(seconds=1)) self.assertEquals(len(instances), 1) self.assertEquals(instances[0].start, start) - second = datetime.timedelta(seconds=1) + second = timedelta(seconds=1) # check that the second one is not there exactly a week later, # because it also moved an hour - delta = datetime.timedelta(days=7) + delta = timedelta(days=7) instances = cal.getActiveEventInstances(start + delta + second) self.assertEquals(len(instances), 0) # check that the second one is there where it should be, an hour later - delta = datetime.timedelta(days=7, hours=1) + delta = timedelta(days=7, hours=1) instances = cal.getActiveEventInstances(start + delta + second) self.assertEquals(len(instances), 1) self.assertEquals(instances[0].start, start + delta) # check that the third one is back on the hour again - delta = datetime.timedelta(days=14) + delta = timedelta(days=14) instances = cal.getActiveEventInstances(start + delta + second) self.assertEquals(len(instances), 1) self.assertEquals(instances[0].start, start + delta) @@ -384,6 +376,8 @@ class ICalSchedulerURGentTest(testsuite.TestCase): + slow = True + def setUp(self): __thisdir = os.path.dirname(os.path.abspath(__file__)) self._file = open(os.path.join(__thisdir, 'urgent.ics')) @@ -396,29 +390,30 @@ # on January 20, 2008, Farkli Bir Gece starts # at 11:00 AM CEST or 10:00 UTC # check 1 hour before - dateTime = datetime.datetime(2008, 1, 20, 9, 0, 0, tzinfo=UTC) + dateTime = datetime(2008, 1, 20, 9, 0, 0, tzinfo=UTC) points = self._calendar.getPoints(dateTime, - datetime.timedelta(seconds=5400)) + timedelta(seconds=5400)) self.assertEquals(len(points), 1) point = points[0] # verify that it is in a Brussels timezone s = str(point.dt.tzinfo) event = point.eventInstance.event - self.failUnless('tzfile' in s) self.failUnless('Brussels' in s) + self.failUnless(point.dt.utcoffset() == timedelta(hours=1)) + self.failUnless(point.dt.dst() == timedelta(hours=0)) self.failUnless(event.content.startswith('Farkli Bir Gece'), 'next change is not to Farkli Bir Gece but to %s' % event.content) self.assertEquals(point.which, 'start') self.assertEquals(point.dt, - dateTime + datetime.timedelta(seconds=3600)) + dateTime + timedelta(seconds=3600)) # 3 hours later, at 14:00 AM CEST, # it stops, and Supercalifragilistic starts # check 1 minute before - dateTime = datetime.datetime(2008, 1, 20, 12, 59, 0, tzinfo=UTC) + dateTime = datetime(2008, 1, 20, 12, 59, 0, tzinfo=UTC) points = self._calendar.getPoints(dateTime, - datetime.timedelta(seconds=120)) + timedelta(seconds=120)) self.assertEquals(len(points), 2) point = points[0] @@ -427,7 +422,7 @@ 'next change is not to Farkli Bir Gece but to %s' % event.content) self.assertEquals(point.which, 'end') self.assertEquals(point.dt, - dateTime + datetime.timedelta(seconds=60)) + dateTime + timedelta(seconds=60)) point = points[1] event = point.eventInstance.event @@ -435,19 +430,19 @@ 'next change is not to Supercali but to %s' % event.content) self.assertEquals(point.which, 'start') self.assertEquals(point.dt, - dateTime + datetime.timedelta(seconds=60)) + dateTime + timedelta(seconds=60)) def test_getActiveEventInstances(self): # on January 20, 2008, Farkli Bir Gece starts # at 11:00 AM CEST or 10:00 UTC # check nothing is active before - dateTime = datetime.datetime(2008, 1, 20, 9, 0, 0, tzinfo=UTC) + dateTime = datetime(2008, 1, 20, 9, 0, 0, tzinfo=UTC) instances = self._calendar.getActiveEventInstances(dateTime) self.failIf(instances) # check one event is active right after - dateTime = datetime.datetime(2008, 1, 20, 11, 0, 0, tzinfo=UTC) + dateTime = datetime(2008, 1, 20, 11, 0, 0, tzinfo=UTC) instances = self._calendar.getActiveEventInstances(dateTime) self.failUnless(instances) self.assertEquals(len(instances), 1) @@ -458,7 +453,7 @@ # 3 hours later, at 14:00 AM CEST or 13:00 UTC, # it stops, and Supercalifragilistic starts # check one event is active during second show - dateTime = datetime.datetime(2008, 1, 20, 13, 1, 0, tzinfo=UTC) + dateTime = datetime(2008, 1, 20, 13, 1, 0, tzinfo=UTC) instances = self._calendar.getActiveEventInstances(dateTime) self.failUnless(instances) self.assertEquals(len(instances), 1) @@ -467,6 +462,55 @@ 'next change is not to Supercali but to %s' % event.content) +class DaylightSavingTimezoneTest(testsuite.TestCase): + + def makeTimezone(self, dststart, dstend, stdrrule, dstrrule): + return DSTTimezone('Test', 'STANDARD', 'DAYLIGHT', + timedelta(hours=1), timedelta(hours=2), + timedelta(hours=2), timedelta(hours=1), + dststart, dstend, stdrrule, dstrrule) + + def testEuropeanStandardToDaylightChange(self): + dststart = datetime(1970, 03, 29, 2) + stdstart = datetime(1970, 10, 25, 3) + stdrrule = rrule.rrulestr('FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU', + dtstart=stdstart) + dstrrule = rrule.rrulestr('FREQ=YEARLY;BYMONTH=03;BYDAY=-1SU', + dtstart=dststart) + tzinfo = self.makeTimezone(stdstart, dststart, stdrrule, dstrrule) + self.assertEquals(datetime(2011, 3, 26, 1, tzinfo=tzinfo).tzname(), + 'STANDARD') + self.assertEquals(datetime(2011, 3, 28, 1, tzinfo=tzinfo).tzname(), + 'DAYLIGHT') + self.assertEquals(datetime(2011, 3, 27, 1, tzinfo=tzinfo).tzname(), + 'STANDARD') + self.assertEquals(datetime(2011, 3, 27, 2, tzinfo=tzinfo).tzname(), + 'DAYLIGHT') + delta= datetime(2011, 3, 27, 3, tzinfo=tzinfo) - \ + datetime(2011, 3, 27, 1, tzinfo=tzinfo.copy()) + self.assertEquals(delta, timedelta(hours=1)) + + def testEuropeanDaylightToStandardChange(self): + dststart = datetime(1970, 03, 29, 2) + stdstart = datetime(1970, 10, 25, 3) + stdrrule = rrule.rrulestr('FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU', + dtstart=stdstart) + dstrrule = rrule.rrulestr('FREQ=YEARLY;BYMONTH=03;BYDAY=-1SU', + dtstart=dststart) + tzinfo = self.makeTimezone(stdstart, dststart, stdrrule, dstrrule) + self.assertEquals(datetime(2011, 10, 29, 1, tzinfo=tzinfo).tzname(), + 'DAYLIGHT') + self.assertEquals(datetime(2011, 10, 31, 1, tzinfo=tzinfo).tzname(), + 'STANDARD') + self.assertEquals(datetime(2011, 10, 30, 1, tzinfo=tzinfo).tzname(), + 'DAYLIGHT') + self.assertEquals(datetime(2011, 10, 30, 3, tzinfo=tzinfo).tzname(), + 'STANDARD') + delta = datetime(2011, 10, 30, 4, tzinfo=tzinfo) - \ + datetime(2011, 10, 30, 1, tzinfo=tzinfo.copy()) + self.assertEquals(delta, timedelta(hours=4)) + + class ICalendarTest(testsuite.TestCase): def setUp(self): @@ -487,12 +531,12 @@ def testParseCalendarWithDates(self): event = icalendar.Event() - startExpected = datetime.datetime(2015, 4, 4, 0, 0, 0, tzinfo=UTC) - endExpected = datetime.datetime(2015, 4, 5, 0, 0, 0, tzinfo=UTC) + startExpected = datetime(2015, 4, 4, 0, 0, 0, tzinfo=UTC) + endExpected = datetime(2015, 4, 5, 0, 0, 0, tzinfo=UTC) event['summary'] = 'Test calendar' event['uid'] = '42' - event.set('dtstart', datetime.date(2015, 4, 4)) - event.set('dtend', datetime.date(2015, 4, 5)) + event.set('dtstart', date(2015, 4, 4)) + event.set('dtend', date(2015, 4, 5)) self._icalendar.add_component(event) @@ -502,14 +546,14 @@ def testParseCalendarWithDateTimes(self): event = icalendar.Event() - startExpected = datetime.datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL) - endExpected = datetime.datetime(2015, 4, 5, 8, 0, 0, tzinfo=LOCAL) + startExpected = datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL) + endExpected = datetime(2015, 4, 5, 8, 0, 0, tzinfo=LOCAL) event['summary'] = 'Test calendar' event['uid'] = 'uid' event.set('dtstart', - datetime.datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL)) + datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL)) event.set('dtend', - datetime.datetime(2015, 4, 5, 8, 0, 0, tzinfo=LOCAL)) + datetime(2015, 4, 5, 8, 0, 0, tzinfo=LOCAL)) self._icalendar.add_component(event) @@ -519,13 +563,13 @@ def testParseCalendarWithStartDateAndEndDateTime(self): event = icalendar.Event() - startExpected = datetime.datetime(2015, 4, 4, 0, 0, 0, tzinfo=UTC) - endExpected = datetime.datetime(2015, 4, 5, 8, 0, 0, tzinfo=LOCAL) + startExpected = datetime(2015, 4, 4, 0, 0, 0, tzinfo=UTC) + endExpected = datetime(2015, 4, 5, 8, 0, 0, tzinfo=LOCAL) event['summary'] = 'Test calendar' event['uid'] = '42' - event.set('dtstart', datetime.date(2015, 4, 4)) + event.set('dtstart', date(2015, 4, 4)) event.set('dtend', - datetime.datetime(2015, 4, 5, 8, 0, 0, tzinfo=LOCAL)) + datetime(2015, 4, 5, 8, 0, 0, tzinfo=LOCAL)) self._icalendar.add_component(event) @@ -535,13 +579,31 @@ def testParseCalendarWithStartDateTimeAndEndDate(self): event = icalendar.Event() - startExpected = datetime.datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL) - endExpected = datetime.datetime(2015, 4, 5, 0, 0, 0, tzinfo=UTC) + startExpected = datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL) + endExpected = datetime(2015, 4, 5, 0, 0, 0, tzinfo=UTC) + event['summary'] = 'Test calendar' + event['uid'] = '42' + event.set('dtstart', + datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL)) + event.set('dtend', date(2015, 4, 5)) + + self._icalendar.add_component(event) + + self._calendar = eventcalendar.fromICalendar(self._icalendar) + + self.assertOneEventExpected(startExpected, endExpected) + + def testParseCalendarWithStartDateTimeAndDuration(self): + event = icalendar.Event() + startExpected = datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL) + duration = timedelta(hours=1, minutes=38, seconds=23) + endExpected = startExpected + duration event['summary'] = 'Test calendar' event['uid'] = '42' event.set('dtstart', - datetime.datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL)) - event.set('dtend', datetime.date(2015, 4, 5)) + datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL)) + event.set('duration', + timedelta(hours=1, minutes=38, seconds=23)) self._icalendar.add_component(event) @@ -551,15 +613,15 @@ def testParseCalendar(self): event = icalendar.Event() - startExpected = datetime.datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL) - endExpected = datetime.datetime(2015, 4, 5, 0, 0, 0, tzinfo=UTC) + startExpected = datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL) + endExpected = datetime(2015, 4, 5, 0, 0, 0, tzinfo=UTC) contentExpected = 'Test calendar' event['summary'] = contentExpected uidExpected = 'uid' event['uid'] = uidExpected event.set('dtstart', - datetime.datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL)) - event.set('dtend', datetime.date(2015, 4, 5)) + datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL)) + event.set('dtend', date(2015, 4, 5)) self._icalendar.add_component(event) @@ -575,8 +637,8 @@ def testParseCalendarFromFile(self): event = icalendar.Event() - startExpected = datetime.datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL) - endExpected = datetime.datetime(2015, 4, 4, 9, 0, 0, tzinfo=LOCAL) + startExpected = datetime(2015, 4, 4, 8, 0, 0, tzinfo=LOCAL) + endExpected = datetime(2015, 4, 4, 9, 0, 0, tzinfo=LOCAL) contentExpected = 'Test calendar' uidExpected = 'uid' fileName = 'example.ics' @@ -609,17 +671,66 @@ self.assertEquals(events[0].content, contentExpected) self.assertEquals(events[0].uid, uidExpected) + def testParseTimezones(self): + # Create a calendar in Europe/Brussels timezone, + # with an event starting at 1:00 on 26/10, and ending at 4:00 on 26/10 + # this event should be 4 hours long since there is a daylight + # savings time switch from 3:00 to 2:00 during the night + data = ''' +BEGIN:VCALENDAR +PRODID:-//My calendar product//mxm.dk// +VERSION:2.0 +BEGIN:VTIMEZONE +TZID:my_location +BEGIN:DAYLIGHT +TZOFFSETFROM:+0400 +TZOFFSETTO:+0500 +TZNAME:MOJITO +DTSTART:19700329T020000 +RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU +END:DAYLIGHT +BEGIN:STANDARD +TZOFFSETFROM:+0500 +TZOFFSETTO:+0400 +TZNAME:TEA +DTSTART:19701025T030000 +RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU +END:STANDARD +END:VTIMEZONE +BEGIN:VEVENT +DTSTART;TZID=my_location:20080926T010000 +DTEND;TZID=my_location:20081126T040000 +SUMMARY:4 hour event due to time zone +UID:uid +END:VEVENT +END:VCALENDAR + ''' + ical = icalendar.Calendar.from_string(data) + cal = eventcalendar.fromICalendar(ical) + dateTime = datetime(2008, 9, 25, 19, 0, 0, tzinfo=UTC) + points = cal.getPoints(dateTime, timedelta(weeks=15)) + point1 = points[0].dt + point2 = points[1].dt + self.failUnless(str(point1.tzinfo == 'my_location')) + self.failUnless(point1.utcoffset() == timedelta(hours=5)) + self.failUnless(point1.dst() == timedelta(hours=1)) + self.failUnless(point1.tzname() == 'MOJITO') + self.failUnless(str(point2.tzinfo == 'my_location')) + self.failUnless(point2.utcoffset() == timedelta(hours=4)) + self.failUnless(point2.dst() == timedelta(hours=0)) + self.failUnless(point2.tzname() == 'TEA') + class FunctionsTest(testsuite.TestCase): def testToDateTime(self): self.failIf(eventcalendar._toDateTime(None)) - dateTime = datetime.datetime(2015, 4, 4, 8, 0, 0, tzinfo=UTC) + dateTime = datetime(2015, 4, 4, 8, 0, 0, tzinfo=UTC) self.assertEquals(dateTime, eventcalendar._toDateTime(dateTime)) - d = datetime.date(2015, 4, 4) - dateTimeExpected = datetime.datetime(2015, 4, 4, 0, 0, 0, + d = date(2015, 4, 4) + dateTimeExpected = datetime(2015, 4, 4, 0, 0, 0, tzinfo=UTC) self.assertEquals(dateTimeExpected, eventcalendar._toDateTime(d)) @@ -631,10 +742,10 @@ Test that the object contains the data. Very simple test. """ now = _now() - start = now - datetime.timedelta(hours=1) - end = now + datetime.timedelta(minutes=1) + start = now - timedelta(hours=1) + end = now + timedelta(minutes=1) rrules = ["FREQ=HOURLY;INTERVAL=2;COUNT=5", ] - exdates = [now + datetime.timedelta(hours=2)] + exdates = [now + timedelta(hours=2)] uid = 'uid' e = eventcalendar.Event(uid, start, end, 'foo', rrules=rrules, exdates=exdates) @@ -649,7 +760,7 @@ Test the operators: < > == """ now = _now() - hour = datetime.timedelta(hours=1) + hour = timedelta(hours=1) self.failUnless( eventcalendar.Event('uid', now, now + hour, 'foo') < @@ -666,8 +777,8 @@ Test that when no timezone given to the init parameters, the LOCAL timezone is added to them. """ - now = datetime.datetime.now() - hour = datetime.timedelta(hours=1) + now = datetime.now() + hour = timedelta(hours=1) self.assertEquals(now.tzinfo, None) start = now end = now + hour @@ -690,14 +801,14 @@ """ def yesterdayDayOfTheWeek(now): - yesterday = now-datetime.timedelta(days=1) + yesterday = now-timedelta(days=1) day = calendar.weekday(yesterday.year, yesterday.month, yesterday.day) return _dayOfTheWeek[day] - now = datetime.datetime.now().replace(microsecond=0) - start = now - datetime.timedelta(days=1) - datetime.timedelta(weeks=1) - end = now + datetime.timedelta(hours=1) - datetime.timedelta(weeks=1) + now = datetime.now().replace(microsecond=0) + start = now - timedelta(days=1) - timedelta(weeks=1) + end = now + timedelta(hours=1) - timedelta(weeks=1) rrules = [ "FREQ=WEEKLY;BYDAY=" + yesterdayDayOfTheWeek(now) + ";WKST=MO", ] @@ -706,21 +817,21 @@ event = eventcalendar.Event(uid, start, end, content, rrules=rrules) eventSet = eventcalendar.EventSet(uid) eventSet.addEvent(event) - p = eventSet.getPoints(event.start + datetime.timedelta(weeks=1), + p = eventSet.getPoints(event.start + timedelta(weeks=1), event.end - event.start) self.assertEquals(p[0].dt, - event.start + datetime.timedelta(weeks=1)) + event.start + timedelta(weeks=1)) self.assertEquals(p[0].which, 'start') self.assertEquals(p[1].dt, - event.end + datetime.timedelta(weeks=1)) + event.end + timedelta(weeks=1)) self.assertEquals(p[1].which, 'end') def testExAsStartDateWithRecurrence(self): """ Exception to a recurrence rule. """ - start = datetime.datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) - end = datetime.datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) + start = datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) + end = datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) uid = 'uid' content = 'content' rrules = ["FREQ=DAILY;WKST=MO", ] @@ -737,12 +848,12 @@ """ Exception to a recurrence rule. """ - start = datetime.datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) - end = datetime.datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) + start = datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) + end = datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) uid = 'uid' content = 'content' rrules = ["FREQ=DAILY;WKST=MO", ] - exdate = datetime.datetime(2007, 12, 23, 9, 0, 0, 0, LOCAL) + exdate = datetime(2007, 12, 23, 9, 0, 0, 0, LOCAL) exdates = [exdate] event = eventcalendar.Event(uid, start, end, content, rrules=rrules, exdates=exdates) @@ -752,12 +863,12 @@ self.assertEquals(p[0].dt, start) self.assertEquals(p[0].which, 'start') self.assertEquals(p[1].which, 'end') - p = set.getPoints(exdate, datetime.timedelta(days=1)) + p = set.getPoints(exdate, timedelta(days=1)) self.failIf(p) def testGetPointSingle(self): - start = datetime.datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) - end = datetime.datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) + start = datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) + end = datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) uid = 'uid' content = 'content' event = eventcalendar.Event(uid, start, end, content) @@ -766,19 +877,19 @@ p = set.getPoints(start, end - start) self.assertEquals(p[0].dt, start) self.assertEquals(p[1].dt, end) - p = set.getPoints(start - datetime.timedelta(hours=1), - datetime.timedelta(hours=3)) + p = set.getPoints(start - timedelta(hours=1), + timedelta(hours=3)) self.assertEquals(p[0].dt, start) self.assertEquals(p[1].dt, end) - p = set.getPoints(start + datetime.timedelta(minutes=30), - datetime.timedelta(minutes=60)) + p = set.getPoints(start + timedelta(minutes=30), + timedelta(minutes=60)) self.assertEquals(p[0].dt, - start + datetime.timedelta(minutes=30)) - self.assertEquals(p[1].dt, end - datetime.timedelta(minutes=30)) + start + timedelta(minutes=30)) + self.assertEquals(p[1].dt, end - timedelta(minutes=30)) def testGetPointsRecur(self): - start = datetime.datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) - end = datetime.datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) + start = datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) + end = datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) uid = 'uid' content = 'content' rrules = ["FREQ=DAILY;WKST=MO", ] @@ -790,18 +901,18 @@ self.assertEquals(p[0].dt, start) self.assertEquals(p[0].which, 'start') self.assertEquals(p[1].which, 'end') - p = set.getPoints(start + datetime.timedelta(days=2), + p = set.getPoints(start + timedelta(days=2), end - start) - self.assertEquals(p[0].dt, start + datetime.timedelta(days=2)) + self.assertEquals(p[0].dt, start + timedelta(days=2)) self.assertEquals(p[0].which, 'start') self.assertEquals(p[1].which, 'end') - p = set.getPoints(end, datetime.timedelta(days=1)) + p = set.getPoints(end, timedelta(days=1)) self.assertEquals(len(p), 2) self.assertNotEquals(p[0].dt, end) def testGetPointsRecurUntil(self): - start = datetime.datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) - end = datetime.datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) + start = datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) + end = datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) event = eventcalendar.Event('uid', start, end, 'content', rrules=["FREQ=DAILY;UNTIL=20071224T073000Z;WKST=MO", ]) set = eventcalendar.EventSet('uid') @@ -810,23 +921,23 @@ self.assertEquals(p[0].dt, start) self.assertEquals(p[0].which, 'start') self.assertEquals(p[1].which, 'end') - p = set.getPoints(start, end - start + datetime.timedelta(days=4)) + p = set.getPoints(start, end - start + timedelta(days=4)) self.assertEquals(len(p), 4) self.assertEquals(p[0].dt, start) self.assertEquals(p[0].which, 'start') - self.assertEquals(p[3].dt, end + datetime.timedelta(days=1)) + self.assertEquals(p[3].dt, end + timedelta(days=1)) self.assertEquals(p[3].which, 'end') - p = set.getPoints(start + datetime.timedelta(hours=1), - end - start + datetime.timedelta(hours=22)) + p = set.getPoints(start + timedelta(hours=1), + end - start + timedelta(hours=22)) self.assertEquals(len(p), 4) - self.assertEquals(p[0].dt, start + datetime.timedelta(hours=1)) + self.assertEquals(p[0].dt, start + timedelta(hours=1)) self.assertEquals(p[0].which, 'start') - self.assertEquals(p[1].dt, start + datetime.timedelta(hours=2)) + self.assertEquals(p[1].dt, start + timedelta(hours=2)) self.assertEquals(p[1].which, 'end') self.assertEquals(p[3].dt, - end + datetime.timedelta(days=1) - datetime.timedelta(hours=1)) + end + timedelta(days=1) - timedelta(hours=1)) self.assertEquals(p[3].which, 'end') - p = set.getPoints(start + datetime.timedelta(days=3), + p = set.getPoints(start + timedelta(days=3), end - start) self.assertEquals(len(p), 0) @@ -850,7 +961,7 @@ if start.tzinfo is None: tzinfo = tz.gettz( self._events[1]['dtstart'].params['TZID']) - start = datetime.datetime(start.year, start.month, start.day, + start = datetime(start.year, start.month, start.day, start.hour, start.minute, start.second, start.microsecond, tzinfo) rrulestr = str(self._events[1].get('RRULE')) @@ -859,8 +970,8 @@ self.failUnless(riddatetime in r) def testGetPoints(self): - start = datetime.datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) - end = datetime.datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) + start = datetime(2007, 12, 22, 9, 0, 0, 0, LOCAL) + end = datetime(2007, 12, 22, 11, 0, 0, 0, LOCAL) eventSet1 = eventcalendar.EventSet('uid1') eventSet2 = eventcalendar.EventSet('uid2') event1 = eventcalendar.Event('uid1', start, end, 'content') @@ -876,7 +987,7 @@ if start.tzinfo is None: tzinfo = tz.gettz( self._events[1]['dtstart'].params['TZID']) - start = datetime.datetime(start.year, start.month, start.day, + start = datetime(start.year, start.month, start.day, start.hour, start.minute, start.second, start.microsecond, tzinfo) rrulestr = str(self._events[1].get('RRULE')) @@ -893,8 +1004,8 @@ def testExDate(self): TZMADRID = tz.gettz('Europe/Madrid') - start = datetime.datetime(2007, 11, 1, 0, 0, 0, 0, TZMADRID) - end = datetime.datetime(2008, 1, 1, 0, 0, 0, 0, TZMADRID) + start = datetime(2007, 11, 1, 0, 0, 0, 0, TZMADRID) + end = datetime(2008, 1, 1, 0, 0, 0, 0, TZMADRID) calendar = eventcalendar.fromFile(open(self._path, 'r')) sets = calendar._eventSets.values() self.assertEquals(len(sets), 1) @@ -902,7 +1013,7 @@ self.assertEquals(set.uid, 'b0s4akee4lbvdnbr1h925vl0i4@google.com') points = set.getPoints(start, end - start) self.assertEquals(len(points), 44) - exdatetime = datetime.datetime(2007, 11, 12, 20, 0, 0, 0, TZMADRID) + exdatetime = datetime(2007, 11, 12, 20, 0, 0, 0, TZMADRID) for p in points: self.assertNotEquals(p.dt, exdatetime) @@ -951,7 +1062,7 @@ def testDaylightSavingsChange(self): # Create a calendar in Europe/Brussels timezone, - # with an event starting at 1:00 on 25/10, and ending at 4:00 on 25/10 + # with an event starting at 1:00 on 26/10, and ending at 4:00 on 26/10 # this event should be 4 hours long since there is a daylight # savings time switch from 3:00 to 2:00 during the night data = ''' @@ -986,9 +1097,9 @@ ''' ical = icalendar.Calendar.from_string(data) cal = eventcalendar.fromICalendar(ical) - dateTime = datetime.datetime(2008, 10, 25, 23, 0, 0, tzinfo=UTC) + dateTime = datetime(2008, 10, 25, 23, 0, 0, tzinfo=UTC) points = cal.getPoints(dateTime, - datetime.timedelta(hours=5)) + timedelta(hours=5)) self.assertEquals(len(points), 2) delta = points[1].dt - points[0].dt - self.assertEquals(delta, datetime.timedelta(hours=4)) + self.assertEquals(delta, timedelta(hours=4)) diff -Nru flumotion-0.6.1/flumotion/test/test_common_format.py flumotion-0.9.1/flumotion/test/test_common_format.py --- flumotion-0.6.1/flumotion/test/test_common_format.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_format.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,104 +1,100 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common.testsuite import TestCase -from flumotion.common.format import formatStorage, formatTime +from flumotion.common import format as formatting class TestFormatStorage(TestCase): def testBytes(self): value = 4 - assert formatStorage(value) == "4.00 " + self.assertEquals(formatting.formatStorage(value), "4.00 ") def testKibibyte(self): value = 1024 - assert formatStorage(value) == "1.02 k" - assert formatStorage(value, 3) == "1.024 k" + self.assertEquals(formatting.formatStorage(value), "1.02 k") + self.assertEquals(formatting.formatStorage(value, 3), "1.024 k") def testMegabyte(self): value = 1000 * 1000 - assert formatStorage(value) == "1.00 M" + self.assertEquals(formatting.formatStorage(value), "1.00 M") def testMebibyte(self): value = 1024 * 1024 - assert formatStorage(value) == "1.05 M" - assert formatStorage(value, 3) == "1.049 M" - assert formatStorage(value, 4) == "1.0486 M" + self.assertEquals(formatting.formatStorage(value), "1.05 M") + self.assertEquals(formatting.formatStorage(value, 3), "1.049 M") + self.assertEquals(formatting.formatStorage(value, 4), "1.0486 M") def testGibibyte(self): value = 1024 * 1024 * 1024 - assert formatStorage(value, 4) == "1.0737 G" + self.assertEquals(formatting.formatStorage(value, 4), "1.0737 G") def testTebibyte(self): value = 1024 * 1024 * 1024 * 1024 - assert formatStorage(value, 4) == "1.0995 T" + self.assertEquals(formatting.formatStorage(value, 4), "1.0995 T") def testPebibyte(self): value = 1024 * 1024 * 1024 * 1024 * 1024 - assert formatStorage(value, 4) == "1.1259 P" + self.assertEquals(formatting.formatStorage(value, 4), "1.1259 P") def testExbibyte(self): value = 1024 * 1024 * 1024 * 1024 * 1024 * 1024 - assert formatStorage(value, 4) == "1.1529 E" + self.assertEquals(formatting.formatStorage(value, 4), "1.1529 E") class TestFormatTime(TestCase): def testFractionalSecond(self): value = 1.1 - self.assertEquals(formatTime(value, fractional=2), + self.assertEquals(formatting.formatTime(value, fractional=2), "00:00:01.10") def testSecond(self): value = 1 - assert formatTime(value) == "00:00" + self.assertEquals(formatting.formatTime(value), "00:00") def testMinuteSecond(self): value = 60 + 1 - assert formatTime(value) == "00:01" + self.assertEquals(formatting.formatTime(value), "00:01") def testHourMinuteSecond(self): value = 60 * 60 + 60 + 2 - assert formatTime(value) == "01:01" + self.assertEquals(formatting.formatTime(value), "01:01") def testDay(self): value = 60 * 60 * 24 - assert formatTime(value) == "1 day 00:00" + self.assertEquals(formatting.formatTime(value), "1 day 00:00") def testDays(self): value = 60 * 60 * 24 * 2 - assert formatTime(value) == "2 days 00:00" + self.assertEquals(formatting.formatTime(value), "2 days 00:00") def testWeek(self): value = 60 * 60 * 24 * 7 - assert formatTime(value) == "1 week 00:00" + self.assertEquals(formatting.formatTime(value), "1 week 00:00") def testWeeks(self): value = 60 * 60 * 24 * 7 * 2 - assert formatTime(value) == "2 weeks 00:00" + self.assertEquals(formatting.formatTime(value), "2 weeks 00:00") def testYear(self): value = 60 * 60 * 24 * 365 - assert formatTime(value) == "52 weeks 1 day 00:00" + self.assertEquals(formatting.formatTime(value), "52 weeks 1 day 00:00") def testReallyLong(self): minute = 60 @@ -107,4 +103,9 @@ week = day * 7 value = week * 291 + day * 5 + hour * 13 + minute * 5 - assert formatTime(value) == "291 weeks 5 days 13:05" + self.assertEquals(formatting.formatTime(value), + "291 weeks 5 days 13:05") + + def testNegative(self): + self.assertEquals(formatting.formatTime(-1.0, fractional=1), + "- 00:00:01.0") diff -Nru flumotion-0.6.1/flumotion/test/test_common_gstreamer.py flumotion-0.9.1/flumotion/test/test_common_gstreamer.py --- flumotion-0.6.1/flumotion/test/test_common_gstreamer.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_gstreamer.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_gstreamer -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst diff -Nru flumotion-0.6.1/flumotion/test/test_common_managerspawner.py flumotion-0.9.1/flumotion/test/test_common_managerspawner.py --- flumotion-0.6.1/flumotion/test/test_common_managerspawner.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_managerspawner.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,110 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_common -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import os +import shutil + +from flumotion.common.managerspawner import LocalManagerSpawner +from flumotion.common import testsuite +from flumotion.common.netutils import tryPort + + +class TestLocalManagerSpwaner(testsuite.TestCase): + + _port = tryPort() + + def checkProcessStatus(self, isRunning, runDir, logDir): + import subprocess + ps = subprocess.Popen("ps -ef | grep flumotion", + shell=True, stdout=subprocess.PIPE) + result = ps.stdout.read() + for serviceName in ['manager', 'worker']: + compStr = 'flumotion-%s --rundir=%s --logdir=%s'\ + % (serviceName, runDir, logDir) + if isRunning: + self.assertNotEqual(result.find(compStr), -1) + else: + self.assertEqual(result.find(compStr), -1) + ps.stdout.close() + ps.wait() + + def testPort(self): + spawner = LocalManagerSpawner(self._port) + self.assertEquals(self._port, spawner.getPort()) + spawner = None + testPort.skip = "Skip test" + + def testManagerStart(self): + spawner = LocalManagerSpawner(self._port) + + def done(unused): + self.assert_(os.path.exists(spawner.getRunDir())) + self.assert_(os.path.exists(spawner.getConfDir())) + self.assert_(os.path.exists(spawner.getLogDir())) + self.checkProcessStatus(True, + spawner.getRunDir(), + spawner.getLogDir()) + return spawner.stop(True) + + d = spawner.start() + d.addCallback(done) + return d + testManagerStart.skip = "Skip test" + + def testManagerStop(self): + spawner = LocalManagerSpawner(self._port) + runDir = spawner.getRunDir() + confDir = spawner.getConfDir() + logDir = spawner.getLogDir() + + def closeDone(unused): + self.assert_(os.path.exists(runDir)) + self.assert_(os.path.exists(confDir)) + self.assert_(os.path.exists(logDir)) + self.checkProcessStatus(False, runDir, logDir) + shutil.rmtree(spawner._path) + + def startDone(unused): + self.checkProcessStatus(True, runDir, logDir) + return spawner.stop(False) + + d =spawner.start() + d.addCallback(startDone) + d.addCallback(closeDone) + return d + testManagerStop.skip = "Skip test" + + def testManagerStopAndCleanUp(self): + spawner = LocalManagerSpawner(self._port) + runDir = spawner.getRunDir() + confDir = spawner.getConfDir() + logDir = spawner.getLogDir() + + def closeDone(unused): + self.assert_(not os.path.exists(runDir)) + self.assert_(not os.path.exists(confDir)) + self.assert_(not os.path.exists(logDir)) + self.checkProcessStatus(False, runDir, logDir) + + def startDone(unused): + return spawner.stop(True) + + d = spawner.start() + d.addCallback(startDone) + d.addCallback(closeDone) + return d + testManagerStopAndCleanUp.skip = "Skip test" diff -Nru flumotion-0.6.1/flumotion/test/test_common_messages.py flumotion-0.9.1/flumotion/test/test_common_messages.py --- flumotion-0.6.1/flumotion/test/test_common_messages.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_messages.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_messages -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os diff -Nru flumotion-0.6.1/flumotion/test/test_common_netutils.py flumotion-0.9.1/flumotion/test/test_common_netutils.py --- flumotion-0.6.1/flumotion/test/test_common_netutils.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_netutils.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import StringIO diff -Nru flumotion-0.6.1/flumotion/test/test_common_package.py flumotion-0.9.1/flumotion/test/test_common_package.py --- flumotion-0.6.1/flumotion/test/test_common_package.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_package.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_package -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os diff -Nru flumotion-0.6.1/flumotion/test/test_common_planet.py flumotion-0.9.1/flumotion/test/test_common_planet.py --- flumotion-0.6.1/flumotion/test/test_common_planet.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_planet.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_planet -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.trial import unittest diff -Nru flumotion-0.6.1/flumotion/test/test_common_process.py flumotion-0.9.1/flumotion/test/test_common_process.py --- flumotion-0.6.1/flumotion/test/test_common_process.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_process.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -24,7 +20,7 @@ from flumotion.common.process import checkPidRunning, deletePidFile, getPid, \ killPid, termPid, waitForTerm, waitPidFile, writePidFile -from flumotion.common.testsuite import TestCase +from flumotion.common.testsuite import attr, TestCase class TestPid(TestCase): @@ -41,6 +37,7 @@ class TestProcess(TestCase): + @attr('slow') def testTermPid(self): ret = os.fork() if ret == 0: diff -Nru flumotion-0.6.1/flumotion/test/test_common.py flumotion-0.9.1/flumotion/test/test_common.py --- flumotion-0.6.1/flumotion/test/test_common.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os diff -Nru flumotion-0.6.1/flumotion/test/test_common_pygobject.py flumotion-0.9.1/flumotion/test/test_common_pygobject.py --- flumotion-0.6.1/flumotion/test/test_common_pygobject.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_pygobject.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_pygobject -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gobject diff -Nru flumotion-0.6.1/flumotion/test/test_common_signals.py flumotion-0.9.1/flumotion/test/test_common_signals.py --- flumotion-0.6.1/flumotion/test/test_common_signals.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_signals.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import signals diff -Nru flumotion-0.6.1/flumotion/test/test_common_vfs.py flumotion-0.9.1/flumotion/test/test_common_vfs.py --- flumotion-0.6.1/flumotion/test/test_common_vfs.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_vfs.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_planet -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import errno diff -Nru flumotion-0.6.1/flumotion/test/test_common_xdg.py flumotion-0.9.1/flumotion/test/test_common_xdg.py --- flumotion-0.6.1/flumotion/test/test_common_xdg.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_xdg.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,144 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_admin_multi -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from flumotion.common import testsuite + +import os +import shutil +from flumotion.common import xdg + + +class TestXDGConfig(testsuite.TestCase): + + def setUp(self): + self.old_home = os.environ.get('HOME') + self.old_xdg_config_home = os.environ.get('XDG_CONFIG_HOME') + self.old_xdg_config_dirs = os.environ.get('XDG_CONFIG_DIRS') + + self.home = self.mktemp() + os.mkdir(self.home) + os.environ['HOME'] = self.home + + self.xdg_config_home = self.mktemp() + os.mkdir(self.xdg_config_home) + os.mkdir(os.path.join(self.xdg_config_home, xdg.APPLICATION)) + self.xdg_config_dir1 = self.mktemp() + os.mkdir(self.xdg_config_dir1) + os.mkdir(os.path.join(self.xdg_config_dir1, xdg.APPLICATION)) + self.xdg_config_dir2 = self.mktemp() + os.mkdir(self.xdg_config_dir2) + os.mkdir(os.path.join(self.xdg_config_dir2, xdg.APPLICATION)) + os.environ['XDG_CONFIG_HOME'] = self.xdg_config_home + os.environ['XDG_CONFIG_DIRS'] = ':'.join((self.xdg_config_dir1, + self.xdg_config_dir2)) + + def tearDown(self): + shutil.rmtree(self.home) + shutil.rmtree(self.xdg_config_home, True) + shutil.rmtree(self.xdg_config_dir1, True) + shutil.rmtree(self.xdg_config_dir2, True) + if self.old_home is not None: + os.environ['HOME'] = self.old_home + else: + del os.environ['HOME'] + if self.old_xdg_config_home is not None: + os.environ['XDG_CONFIG_HOME'] = self.old_xdg_config_home + else: + del os.environ['XDG_CONFIG_HOME'] + if self.old_xdg_config_dirs is not None: + os.environ['XDG_CONFIG_DIRS'] = self.old_xdg_config_dirs + else: + del os.environ['XDG_CONFIG_DIRS'] + + def testConfigReadPath(self): + app = xdg.APPLICATION + + # no such config file exists + self.assertIdentical(xdg.config_read_path('test'), None) + + # create a config file in the first XDG config dir + path = os.path.join(self.xdg_config_dir1, app, 'test') + file(path, 'w').close() + # should now be found + self.assertEquals(xdg.config_read_path('test'), path) + + # create a config file in the second XDG config dir, should not change + # the order + path2 = os.path.join(self.xdg_config_dir2, app, 'test') + file(path2, 'w').close() + self.assertEquals(xdg.config_read_path('test'), path) + + # remove the file from the first XDG config dir, the second one should + # be found + os.remove(path) + self.assertEquals(xdg.config_read_path('test'), path2) + + # create a config file in the XDG home dir, should come first + path_home = os.path.join(self.xdg_config_home, app, 'test') + file(path_home, 'w').close() + self.assertEquals(xdg.config_read_path('test'), path_home) + + # chmod that file 000, should be skipped + old_perms = os.stat(path_home).st_mode + os.chmod(path_home, 0000) + self.assertEquals(xdg.config_read_path('test'), path2) + os.chmod(path_home, old_perms) + + def testConfigWritePath(self): + app = xdg.APPLICATION + + # the file should be created + path = os.path.join(self.xdg_config_home, app, 'write') + + f = xdg.config_write_path('write', 'wb') + self.assertEquals(f.name, path) + self.assertEquals(f.mode, 'wb') + + # the subdir should be created + path = os.path.join(self.xdg_config_home, app, 'subdir', 'write') + f = xdg.config_write_path('subdir/write') + self.assertEquals(os.path.isdir(os.path.join( + self.xdg_config_home, app, 'subdir')), True) + self.assertEquals(f.name, path) + # default mode is 'w' + self.assertEquals(f.mode, 'w') + + f.write('abc') + f.close() + f = xdg.config_write_path('subdir/write', 'a') + f.write('def') + f.close() + + self.assertEquals(file(path).read(), 'abcdef') + + def testUnsetHomedir(self): + app = xdg.APPLICATION + + del os.environ['XDG_CONFIG_HOME'] + + # with unset $XDG_CONFIG_HOME, $HOME/.config should be used + f = xdg.config_write_path('unset', 'w') + self.assertEquals(f.name, os.path.join(self.home, '.config', + app, 'unset')) + os.environ['XDG_CONFIG_HOME'] = self.xdg_config_home + + def testNotWritable(self): + # errors in writing should be reported + old_perms = os.stat(self.xdg_config_home).st_mode + os.chmod(self.xdg_config_home, 0000) + self.assertRaises(OSError, xdg.config_write_path, 'error', 'w') + os.chmod(self.xdg_config_home, old_perms) diff -Nru flumotion-0.6.1/flumotion/test/test_common_xmlwriter.py flumotion-0.9.1/flumotion/test/test_common_xmlwriter.py --- flumotion-0.6.1/flumotion/test/test_common_xmlwriter.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_common_xmlwriter.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_common_componentui -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common.testsuite import TestCase @@ -25,6 +21,9 @@ class TestXMLWriter(TestCase): + def _addXMLHeader(self, xw, doc): + return xw.encoding + doc + def testIndent(self): xw = XMLWriter() xw.pushTag('tag', @@ -34,60 +33,75 @@ xw.popTag() self.assertEquals( xw.getXML(), - ('\n' - '\n')) + self._addXMLHeader(xw, + ('\n' + '\n'))) def testPush(self): xw = XMLWriter() xw.pushTag('first') - self.assertEquals(xw.getXML(), "\n") + self.assertEquals(xw.getXML(), self._addXMLHeader(xw, "\n")) xw.popTag() - self.assertEquals(xw.getXML(), "\n\n") + self.assertEquals(xw.getXML(), + self._addXMLHeader(xw, "\n\n")) xw = XMLWriter() xw.pushTag('first', [('attr1', 'a'), ('attr2', 'b')]) - self.assertEquals(xw.getXML(), '\n') + self.assertEquals(xw.getXML(), + self._addXMLHeader(xw, + '\n')) xw.popTag() def testWriteLine(self): xw = XMLWriter() xw.writeLine('foo') - self.assertEquals(xw.getXML(), 'foo\n') + self.assertEquals(xw.getXML(), self._addXMLHeader(xw, 'foo\n')) xw.pushTag('tag') - self.assertEquals(xw.getXML(), 'foo\n\n') + self.assertEquals(xw.getXML(), self._addXMLHeader(xw, 'foo\n\n')) xw.writeLine('bar') - self.assertEquals(xw.getXML(), 'foo\n\n bar\n') + self.assertEquals(xw.getXML(), + self._addXMLHeader(xw, 'foo\n\n bar\n')) + + def testWriteLineEncoding(self): + xw = XMLWriter() + line = unicode("f\xc3\xb6\xc3\xb3", 'utf8') + xw.writeLine(line) + self.assertEquals(xw.getXML(), + self._addXMLHeader(xw, line.encode('utf8') + '\n')) def testWriteTag(self): xw = XMLWriter() xw.pushTag('tag') xw.writeTag('tag2') self.assertEquals(xw.getXML(), - '\n \n') + self._addXMLHeader(xw, '\n \n')) def testWriteTagAttr(self): xw = XMLWriter() xw.pushTag('tag') xw.writeTag('tag2', [('attr', 'value')]) self.assertEquals(xw.getXML(), - '\n \n') + self._addXMLHeader(xw, + '\n \n')) def testWriteTagAttrData(self): xw = XMLWriter() xw.pushTag('tag') xw.writeTag('tag2', [('attr', 'value')], data='data') self.assertEquals(xw.getXML(), - '\n data\n') + self._addXMLHeader(xw, + '\n data\n')) def testWriteTagData(self): xw = XMLWriter() xw.pushTag('tag') xw.writeTag('tag2', data='data') self.assertEquals(xw.getXML(), - '\n data\n') + self._addXMLHeader(xw, + '\n data\n')) class TestCompareComponentTypes(TestCase): diff -Nru flumotion-0.6.1/flumotion/test/test_component_base_scheduler.py flumotion-0.9.1/flumotion/test/test_component_base_scheduler.py --- flumotion-0.6.1/flumotion/test/test_component_base_scheduler.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_base_scheduler.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- test-case-name: flumotion.test.test_component_base_scheduler -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. #TODO: use setUp @@ -32,11 +28,9 @@ from twisted.internet import defer, reactor from flumotion.common import eventcalendar, testsuite +from flumotion.common.tz import LOCAL from flumotion.component.base import scheduler -LOCAL = eventcalendar.LOCAL -UTC = eventcalendar.UTC - def _now(tz=LOCAL): return datetime.now(tz) diff -Nru flumotion-0.6.1/flumotion/test/test_component_base_watcher.py flumotion-0.9.1/flumotion/test/test_component_base_watcher.py --- flumotion-0.6.1/flumotion/test/test_component_base_watcher.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_base_watcher.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,29 +1,56 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + +from twisted.internet import reactor, defer from flumotion.common import testsuite from flumotion.component.base import watcher +import tempfile +import os +import time class WatcherTest(testsuite.TestCase): def testInstantiate(self): watcher.BaseWatcher(30) + + def testContiunePollingOnSubscriberError(self): + + def cleanUp(_): + w.stop() + + def fileDeleted(_): + d = defer.Deferred() + d.addCallback(cleanUp) + reactor.callLater(0, d.callback, _) + return d + + def fileChanged(_): + os.remove(tempFile) + raise Exception("This exception shouldn't be raisen") + + fd, tempFile = tempfile.mkstemp() + w = watcher.FilesWatcher([tempFile], 0.001) + w.subscribe(fileChanged = fileChanged) + d = defer.Deferred() + d.addCallback(fileDeleted) + w.subscribe(fileDeleted = d.callback) + w.start() + os.write(fd, "test") + os.close(fd) + return d diff -Nru flumotion-0.6.1/flumotion/test/test_component_bouncers_bouncer_authsession.py flumotion-0.9.1/flumotion/test/test_component_bouncers_bouncer_authsession.py --- flumotion-0.6.1/flumotion/test/test_component_bouncers_bouncer_authsession.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_bouncers_bouncer_authsession.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,27 +1,30 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. -# flumotion-platform - Flumotion Streaming Platform - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + from flumotion.common import testsuite -from flumotion.component.bouncers import bouncer +from flumotion.component.bouncers import component from flumotion.common import keycards from twisted.spread import pb -class DummyBouncer(bouncer.AuthSessionBouncer): +class DummyBouncer(component.AuthSessionBouncer): def do_extractKeycardInfo(self, keycard, oldData): return keycard diff -Nru flumotion-0.6.1/flumotion/test/test_component_bouncers_bouncer.py flumotion-0.9.1/flumotion/test/test_component_bouncers_bouncer.py --- flumotion-0.6.1/flumotion/test/test_component_bouncers_bouncer.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_bouncers_bouncer.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Flumotion - a streaming media server -# Copyright (C) 2007 Fluendo, S.L. (www.fluendo.com). -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - -# Headers in this file shall remain intact. - -from flumotion.component.bouncers import bouncer -from flumotion.test import bouncertest - - -class FakeBouncerMedium(bouncertest.FakeMedium, bouncer.BouncerMedium): - - def __init__(self): - pass - - -class TrivialBouncerTest(bouncertest.TrivialBouncerTest): - - def setUp(self): - self.obj = bouncer.TrivialBouncer({'name': 'fake', - 'avatarId': '/default/fake', - 'plugs': {}, - 'properties': {}}) - self.medium = FakeBouncerMedium() - self.obj.setMedium(self.medium) - d = self.obj.waitForHappy() - d.addCallback(lambda _: bouncertest.TrivialBouncerTest.setUp(self)) - return d - - def tearDown(self): - d = self.obj.stop() - d.addCallback(lambda _: bouncertest.TrivialBouncerTest.tearDown(self)) - return d diff -Nru flumotion-0.6.1/flumotion/test/test_component_bouncers_component.py flumotion-0.9.1/flumotion/test/test_component_bouncers_component.py --- flumotion-0.6.1/flumotion/test/test_component_bouncers_component.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_bouncers_component.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,62 +1,161 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. +from flumotion.common import testsuite -# Headers in this file shall remain intact. +from twisted.internet import defer, reactor -from flumotion.component.bouncers import component -from flumotion.test import bouncertest +from flumotion.common import keycards +from flumotion.component.bouncers import base, component -class FakeBouncerMedium(bouncertest.FakeMedium, component.BouncerMedium): +class FakeBouncerMedium(component.BouncerMedium): + calls = [] def __init__(self): pass + def callRemote(self, method, *args, **kwargs): + if not self.calls: + # avoid modifying the class attribute + self.calls = [] + self.calls.append((method, args, kwargs)) + return defer.succeed(None) -class TrivialBouncerTest(bouncertest.TrivialBouncerTest): + +class TrivialBouncerTest(testsuite.TestCase): + obj = None + medium = None def setUp(self): - plugs = {component.BOUNCER_SOCKET: - [{'socket': component.BOUNCER_SOCKET, - 'type': 'bouncer-trivial', - 'properties': {}, - 'entries': {'default': - {'module-name': - 'flumotion.component.bouncers.plug', - 'function-name': - 'BouncerTrivialPlug'}}}]} - self.obj = component.Bouncer({'name': 'fake', - 'avatarId': '/default/fake', - 'plugs': plugs, - 'properties': {}}) + self.obj = component.TrivialBouncer({'name': 'fake', + 'avatarId': '/default/fake', + 'plugs': {}, + 'properties': {}}) self.medium = FakeBouncerMedium() self.obj.setMedium(self.medium) d = self.obj.waitForHappy() - d.addCallback(lambda _: bouncertest.TrivialBouncerTest.setUp(self)) return d def tearDown(self): - d = self.obj.stop() - d.addCallback(lambda _: bouncertest.TrivialBouncerTest.tearDown(self)) + return self.obj.stop() + + def assertAttr(self, keycard, attr, val): + self.assertEquals(getattr(keycard, attr), val) + return keycard + + def testAuthentication(self): + k = keycards.KeycardGeneric() + self.assertEquals(k.state, keycards.REQUESTING) + + d = self.obj.authenticate(k) + d.addCallback(self.assertAttr, 'state', keycards.AUTHENTICATED) return d def setKeycardExpireInterval(self, interval): # can be overridden - self.obj.plug._expirer.timeout = interval + self.obj._expirer.timeout = interval + + def testTimeoutAlgorithm(self): + # the plan: make a keycard that expires in 0.75 seconds, and + # set up the component such that it checks for expired keycards + # every half second. this test will check the keycard's + # ttl value at 0.25 seconds and 0.75 seconds, and will + # make sure that at 1.25 seconds that the keycard is out of the + # bouncer. + + # check for expired keycards every half a second + self.setKeycardExpireInterval(0.5) + + def checkTimeout(k): + + def check(expected, inBouncer, furtherChecks): + if k.ttl != expected: + d.errback(AssertionError('ttl %r != expected %r' + % (k.ttl, expected))) + return + if inBouncer: + if not self.obj.hasKeycard(k): + d.errback(AssertionError('comp missing keycard')) + return + else: + if self.obj.hasKeycard(k): + d.errback(AssertionError( + 'comp unexpectedly has keycard')) + return + + if furtherChecks: + args = furtherChecks.pop(0) + args += (furtherChecks, ) + reactor.callLater(*args) + else: + d.callback('success') + reactor.callLater(0.25, check, 0.75, True, + [(0.5, check, 0.25, True), + (0.5, check, -0.25, False)]) + d = defer.Deferred() + return d + + def checkCalls(res): + self.assertEquals(self.medium.calls, + [('expireKeycard', (k.requesterId, k.id), {})]) + return res + + k = keycards.KeycardGeneric() + k.ttl = 0.75 + self.assertEquals(k.state, keycards.REQUESTING) + d = self.obj.authenticate(k) + d.addCallback(self.assertAttr, 'state', keycards.AUTHENTICATED) + d.addCallback(self.assertAttr, 'ttl', 0.75) + d.addCallback(checkTimeout) + d.addCallback(checkCalls) + return d + + def testKeepAlive(self): + + def adjustTTL(_): + self.assertEquals(k.ttl, 0.75) + self.obj.keepAlive('bar', 10) + self.assertEquals(k.ttl, 0.75) + self.obj.keepAlive('foo', 10) + self.assertEquals(k.ttl, 10) + + k = keycards.KeycardGeneric() + k.ttl = 0.75 + k.issuerName = 'foo' + self.assertEquals(k.state, keycards.REQUESTING) + d = self.obj.authenticate(k) + d.addCallback(self.assertAttr, 'state', keycards.AUTHENTICATED) + d.addCallback(self.assertAttr, 'ttl', 0.75) + d.addCallback(adjustTTL) + return d + + def testAutoExpire(self): + + def authenticated(_): + self.assertAttr(k, 'state', keycards.REFUSED) + self.assertAttr(k, 'ttl', 0) + self.failIf(self.obj.hasKeycard(k)) + self.assertEquals(self.medium.calls, []) + + k = keycards.KeycardGeneric() + k.ttl = 0 + self.assertEquals(k.state, keycards.REQUESTING) + d = self.obj.authenticate(k) + d.addCallback(authenticated) + return d diff -Nru flumotion-0.6.1/flumotion/test/test_component_bouncers_plug.py flumotion-0.9.1/flumotion/test/test_component_bouncers_plug.py --- flumotion-0.6.1/flumotion/test/test_component_bouncers_plug.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_bouncers_plug.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,31 +1,30 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. +from flumotion.common import testsuite + from twisted.internet import defer from flumotion.component.bouncers import plug -from flumotion.test import bouncertest -class TrivialBouncerTest(bouncertest.TrivialBouncerTest): +class TrivialBouncerTest(testsuite.TestCase): + + skip = 'Needs rewrite to use the changed bouncer plugs interface' def setUp(self): args = {'socket': 'flumotion.component.bouncers.plug.BouncerPlug', @@ -42,3 +41,6 @@ d = defer.maybeDeferred(self.obj.stop, None) d.addCallback(lambda _: bouncertest.TrivialBouncerTest.tearDown(self)) return d + + def testFake(self): + pass diff -Nru flumotion-0.6.1/flumotion/test/test_component_feedcomponent.py flumotion-0.9.1/flumotion/test/test_component_feedcomponent.py --- flumotion-0.6.1/flumotion/test/test_component_feedcomponent.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_feedcomponent.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,27 +1,30 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2009 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common.testsuite import TestCase from flumotion.component import feedcomponent -from twisted.internet import defer +from flumotion.component.eater import Eater +from twisted.internet import defer, gtk2reactor + + +class FakeMuxerComponent(feedcomponent.MuxerComponent): + + def get_muxer_string(self, properties): + return "identity name=muxer" class FakeComponent(feedcomponent.ParseLaunchComponent): @@ -44,6 +47,8 @@ class TestFeedComponentMedium(TestCase): + supportedReactors = [gtk2reactor.Gtk2Reactor] + def setUp(self): config = {} config['name'] = "FakeComponent" @@ -91,3 +96,29 @@ host, port) self.failUnlessEqual(None, rs) + + +class TestMuxer(TestCase): + + supportedReactors = [gtk2reactor.Gtk2Reactor] + + def setup(self): + self.fakecomp = None + + def tearDown(self): + if self.fakecomp: + self.fakecomp.stop() + + def testPipelineString(self): + config = {"name": "blah", "plugs": {}, "properties": {}, + "eater": {"eater1": [("blah", "eater1")]}} + self.fakecomp = FakeMuxerComponent(config) + + pipeline = self.fakecomp.get_pipeline_string({}) + self.assertEquals(pipeline, "@ eater:eater1 @ identity name=muxer ") + pipeline = self.fakecomp.parse_pipeline(pipeline) + self.assertEquals(pipeline, + "fdsrc name=eater:eater1 ! " + "queue name=eater:eater1-queue max-size-buffers=16 ! " + "gdpdepay name=eater:eater1-depay " + "identity name=muxer") diff -Nru flumotion-0.6.1/flumotion/test/test_component_feeder.py flumotion-0.9.1/flumotion/test/test_component_feeder.py --- flumotion-0.6.1/flumotion/test/test_component_feeder.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_feeder.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import time diff -Nru flumotion-0.6.1/flumotion/test/test_component_feed.py flumotion-0.9.1/flumotion/test/test_component_feed.py --- flumotion-0.6.1/flumotion/test/test_component_feed.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_feed.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_component_feed -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import errno @@ -93,6 +89,8 @@ class FeedTestCase(testsuite.TestCase, log.Loggable): + slow = True + bouncerconf = {'name': 'testbouncer', 'plugs': {}, # user:test diff -Nru flumotion-0.6.1/flumotion/test/test_component_httpserver_httpcached_httputils.py flumotion-0.9.1/flumotion/test/test_component_httpserver_httpcached_httputils.py --- flumotion-0.6.1/flumotion/test/test_component_httpserver_httpcached_httputils.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_httpserver_httpcached_httputils.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,266 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_common -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from flumotion.common.testsuite import TestCase + +from flumotion.component.misc.httpserver.httpcached.http_utils import Url + +#TODO: Add a test for multiple different query fields (reordering issues) + + +class TestURL(TestCase): + + def testQuotedSpaces(self): + + def check(_url, _loc, _path, _query, **kwargs): + obj = Url(**kwargs) + self.assertEqual(str(obj), _url) + self.assertEqual(obj.url, _url) + self.assertEqual(obj.location, _loc) + self.assertEqual(obj.path, _path) + self.assertEqual(obj.query, _query) + + obj2 = Url.fromString(_url) + self.assertEqual(str(obj2), str(obj)) + self.assertEqual(str(obj2), _url) + + check("/", "/", "/", {}, path="/") + + check("/with%20lots/%20of%20/nasty%20spaces.txt", + "/with%20lots/%20of%20/nasty%20spaces.txt", + "/with lots/ of /nasty spaces.txt", {}, + path="/with lots/ of /nasty spaces.txt") + + check("/path?que%20ry=val%20u", + "/path?que%20ry=val%20u", + "/path", {"que ry": ["val u"]}, + path="/path", query={"que ry": ["val u"]}) + + def testRelativeToString(self): + + def check(url, loc, **kwargs): + obj = Url(**kwargs) + self.assertEqual(str(obj), url) + self.assertEqual(obj.url, url) + self.assertEqual(obj.location, loc) + + check("/", "/") + check("/", "/", path="/") + check("/;P", "/;P", params="P") + check("/?n=v", "/?n=v", query={"n": ["v"]}) + check("/#f", "/#f", fragment="f") + check("/", "/", username="user") + check("/", "/", password="test") + check("/", "/", port=8080) + check("/sub/dir/file.py;params?query=val#anchor", + "/sub/dir/file.py;params?query=val#anchor", + path="/sub/dir/file.py", params="params", + query={"query": ["val"]}, fragment="anchor") + check("/;params?query=val#anchor", + "/;params?query=val#anchor", + params="params", + query={"query": ["val"]}, fragment="anchor") + check("/sub/dir/file.py?query=val#anchor", + "/sub/dir/file.py?query=val#anchor", + path="/sub/dir/file.py", + query={"query": ["val"]}, fragment="anchor") + check("/sub/dir/file.py;params#anchor", + "/sub/dir/file.py;params#anchor", + path="/sub/dir/file.py", params="params", + query={}, fragment="anchor") + check("/sub/dir/file.py;params?query=val", + "/sub/dir/file.py;params?query=val", + path="/sub/dir/file.py", params="params", + query={"query": ["val"]}) + + def testAbsoluteToString(self): + + def check(url, loc, netloc, host, **kwargs): + obj = Url(**kwargs) + self.assertEqual(str(obj), url) + self.assertEqual(obj.url, url) + self.assertEqual(obj.netloc, netloc) + self.assertEqual(obj.host, host) + self.assertEqual(obj.location, loc) + + check("http://localhost/", "/", "localhost", "localhost", + hostname="localhost") + check("http://localhost/", "/", "localhost", "localhost", + hostname="localhost", path="/") + check("https://localhost/", "/", "localhost", "localhost", + scheme='https', hostname="localhost") + check("http://localhost:8080/", "/", "localhost:8080", + "localhost:8080", hostname="localhost", port=8080) + check("http://localhost/", "/", "localhost", "localhost", + hostname="localhost", port=80) + check("https://localhost:80/", "/", "localhost:80", "localhost:80", + scheme="https", hostname="localhost", port=80) + check("http://user@localhost/", "/", "user@localhost", "localhost", + hostname="localhost", username='user') + check("http://localhost/", "/", "localhost", "localhost", + hostname="localhost", password='test') + check("http://user:test@localhost/", "/", "user:test@localhost", + "localhost", hostname="localhost", + username='user', password='test') + check("http://user:test@localhost:8080/", "/", + "user:test@localhost:8080", "localhost:8080", + hostname="localhost", port=8080, + username='user', password='test') + check("http://localhost/sub/dir/file.py;P?Q=#F", + "/sub/dir/file.py;P?Q=#F", "localhost", "localhost", + hostname="localhost", path="/sub/dir/file.py", + query={"Q": [""]}, params="P", fragment="F") + + def testRelativeFromString(self): + + def check(url, **kwargs): + obj = Url.fromString(url) + self.assertEqual(obj.url, url) + for n, v in kwargs.items(): + self.assertEqual(getattr(obj, n), v) + + self.assertEqual(type(Url.fromString("/")), type(Url())) + + check("/", + scheme="", hostname="", path="/", + username=None, password=None, port=None, + params="", query={}, fragment="", + location="/") + check("/sub/file;param?query=string#fragment", + scheme="", hostname="", path="/sub/file", + username=None, password=None, port=None, + params="param", query={"query": ["string"]}, + fragment="fragment", + location="/sub/file;param?query=string#fragment") + check("/;param?query=s1&query=s2#fragment", + scheme="", hostname="", path="/", + username=None, password=None, port=None, + params="param", query={"query": ["s1", "s2"]}, + fragment="fragment", + location="/;param?query=s1&query=s2#fragment") + check("/sub/file?q1=s1#fragment", + scheme="", hostname="", path="/sub/file", + username=None, password=None, port=None, + params="", query={"q1": ["s1"]}, + fragment="fragment", + location="/sub/file?q1=s1#fragment") + check("/sub/file;param#fragment", + scheme="", hostname="", path="/sub/file", + username=None, password=None, port=None, + params="param", query={}, fragment="fragment", + location="/sub/file;param#fragment") + check("/sub/file;param?query=string", + scheme="", hostname="", path="/sub/file", + username=None, password=None, port=None, + params="param", query={"query": ["string"]}, + fragment="", location="/sub/file;param?query=string") + + def testAbsoluteFromString(self): + + def check(url, netloc, host, **kwargs): + obj = Url.fromString(url) + self.assertEqual(obj.url, url) + self.assertEqual(obj.netloc, netloc) + self.assertEqual(obj.host, host) + for n, v in kwargs.items(): + self.assertEqual(getattr(obj, n), v) + + check("http://user:test@localhost:8080" + "/sub/file;param?query=string#fragment", + "user:test@localhost:8080", "localhost:8080", + scheme="http", hostname="localhost", path="/sub/file", + username="user", password="test", port=8080, + params="param", query={"query": ["string"]}, + fragment="fragment", + location="/sub/file;param?query=string#fragment") + + check("https://user:test@localhost:8080" + "/sub/file;param?q=s1&q=s2&q=s3#fragment", + "user:test@localhost:8080", "localhost:8080", + scheme="https", hostname="localhost", path="/sub/file", + username="user", password="test", port=8080, + params="param", query={"q": ["s1", "s2", "s3"]}, + fragment="fragment", + location="/sub/file;param?q=s1&q=s2&q=s3#fragment") + + check("http://user@localhost:8080" + "/sub/file;param?query=#fragment", + "user@localhost:8080", "localhost:8080", + scheme="http", hostname="localhost", path="/sub/file", + username="user", password=None, port=8080, + params="param", query={"query": [""]}, + fragment="fragment", + location="/sub/file;param?query=#fragment") + + check("http://localhost:8080" + "/sub/file;param?query=string#fragment", + "localhost:8080", "localhost:8080", + scheme="http", hostname="localhost", path="/sub/file", + username=None, password=None, port=8080, + params="param", query={"query": ["string"]}, + fragment="fragment", + location="/sub/file;param?query=string#fragment") + + check("http://user:test@localhost" + "/sub/file;param?query=string#fragment", + "user:test@localhost", "localhost", + scheme="http", hostname="localhost", path="/sub/file", + username="user", password="test", port=80, + params="param", query={"query": ["string"]}, + fragment="fragment", + location="/sub/file;param?query=string#fragment") + + check("https://user:test@localhost" + "/sub/file;param?query=string#fragment", + "user:test@localhost", "localhost", + scheme="https", hostname="localhost", path="/sub/file", + username="user", password="test", port=443, + params="param", query={"query": ["string"]}, + fragment="fragment", + location="/sub/file;param?query=string#fragment") + + check("http://user:test@localhost:8080" + "/;param?query=string#fragment", + "user:test@localhost:8080", "localhost:8080", + scheme="http", hostname="localhost", path="/", + username="user", password="test", port=8080, + params="param", query={"query": ["string"]}, + fragment="fragment", + location="/;param?query=string#fragment") + + check("http://user:test@localhost:8080" + "/sub/file?query=string#fragment", + "user:test@localhost:8080", "localhost:8080", + scheme="http", hostname="localhost", path="/sub/file", + username="user", password="test", port=8080, + params="", query={"query": ["string"]}, + fragment="fragment", + location="/sub/file?query=string#fragment") + + check("http://user:test@localhost:8080/sub/file;param#fragment", + "user:test@localhost:8080", "localhost:8080", + scheme="http", hostname="localhost", path="/sub/file", + username="user", password="test", port=8080, + params="param", query={}, fragment="fragment", + location="/sub/file;param#fragment") + + check("http://user:test@localhost:8080/sub/file;param?query=string", + "user:test@localhost:8080", "localhost:8080", + scheme="http", hostname="localhost", path="/sub/file", + username="user", password="test", port=8080, + params="param", query={"query": ["string"]}, + fragment="", location="/sub/file;param?query=string") diff -Nru flumotion-0.6.1/flumotion/test/test_component_httpserver_httpcached_stats.py flumotion-0.9.1/flumotion/test/test_component_httpserver_httpcached_stats.py --- flumotion-0.6.1/flumotion/test/test_component_httpserver_httpcached_stats.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_httpserver_httpcached_stats.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,178 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_common -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import os +import shutil +import tempfile + +import twisted +from twisted.internet import reactor, defer +from twisted.trial import unittest + +import twisted.copyright +if twisted.copyright.version == "SVN-Trunk": + SKIP_MSG = "Twisted 2.0.1 thread pool is broken for tests" +else: + SKIP_MSG = None + +from twisted.web import resource +from twisted.web.server import Site +from twisted.web.static import File + +from flumotion.common.testsuite import TestCase +from flumotion.component.misc.httpserver.httpcached import file_provider +from flumotion.component.misc.httpserver import fileprovider + +CACHE_SIZE = 1024 * 1024 +twisted.internet.base.DelayedCall.debug = True + + +class DummyStats(object): + + def __init__(self): + self.stats = {} + + def update(self, key, val): + self.stats[key] = val + + +class TestHTTPCachedPlugStats(TestCase): + + skip = SKIP_MSG + + def setUp(self): + from twisted.python import threadpool + reactor.threadpool = threadpool.ThreadPool(0, 10) + reactor.threadpool.start() + + class Hello(resource.Resource): + isLeaf = True + + def render_GET(self, request): + return "Hello, world!" + + self.src_path = tempfile.mkdtemp(suffix=".src") + self.cache_path = tempfile.mkdtemp(suffix=".cache") + self._resource = None + + self.createSrcFile("a", "content of a") + + src = File(self.src_path) + src.putChild("hello", Hello()) + factory = Site(src) + self.httpserver = reactor.listenTCP(0, factory) + p = self.httpserver.getHost().port + + plugProps = {"properties": {"cache-size": CACHE_SIZE, + "cache-dir": self.cache_path, + "virtual-hostname": "localhost", + "virtual-port": p}} + + self.plug = \ + file_provider.FileProviderHTTPCachedPlug(plugProps) + + self.stats = DummyStats() + self.plug.startStatsUpdates(self.stats) + + return self.plug.start(None) + + def tearDown(self): + d = self.plug.stop(None) + + def finish_cleanup(_): + self.plug.stopStatsUpdates() + self.httpserver.stopListening() + shutil.rmtree(self.cache_path, ignore_errors=True) + shutil.rmtree(self.src_path, ignore_errors=True) + + reactor.threadpool.stop() + reactor.threadpool = None + + d.addCallback(finish_cleanup) + return d + + def test404(self): + d = self.plug.getRootPath().child("SuperMan").open() + d.addCallback(lambda x: x.close()) + d.addErrback(lambda f: f.trap(fileprovider.NotFoundError)) + d.addCallback(lambda x: + self.failIf('cache-hit-count' in self.stats.stats)) + d.addCallback(lambda x: + self.failIf('cache-miss-count' in self.stats.stats)) + return d + + def testMissHit(self): + d = self.plug.getRootPath().child("a").open() + d.addCallback(lambda x: self.checkResourceContent(x, "content of a")) + d.addCallback(lambda x: setattr(self, "_resource", x)) + d.addCallback(lambda x: self._resource.getLogFields()) + d.addCallback(lambda x: self.failIf(x['cache-status'] == 'cache-hit')) + d.addCallback(lambda x: self._resource.close()) + d.addCallback(lambda x: + self.assertEqual(self.stats.stats['cache-miss-count'], 1)) + d.addCallback(lambda x: + self.assertEqual(self.stats.stats['cache-hit-count'], 0)) + d.addCallback(lambda x: + self.assertEqual(self.stats.stats['temp-hit-count'], 0)) + + d.addCallback(lambda x: self.plug.getRootPath().child("a").open()) + d.addCallback(lambda x: setattr(self, "_resource", x)) + d.addCallback(lambda x: self._resource.close()) + d.addCallback(lambda x: + self.assertEqual(self.stats.stats['cache-miss-count'], 1)) + d.addCallback(lambda x: + self.assertEqual(self.stats.stats['cache-hit-count'], 1)) + + d.addCallback(lambda x: self.plug.getRootPath().child("a").open()) + d.addCallback(lambda x: setattr(self, "_resource", x)) + d.addCallback(lambda x: self._resource.close()) + d.addCallback(lambda x: + self.assertEqual(self.stats.stats['cache-miss-count'], 1)) + d.addCallback(lambda x: + self.assertEqual(self.stats.stats['cache-hit-count'], 2)) + + return d + + ### Helper functions ### + + def createSrcFile(self, name, data): + fname = os.path.join(self.src_path, name) + testFile = open(fname, "w") + testFile.write(data) + testFile.close() + + def checkResourceContent(self, resource, content): + d = resource.read(resource.getsize()) + d.addCallback(lambda d: self.failIf(d != content)) + d.addCallback(lambda _: resource) + return d + + def cleanUpCache(self): + shutil.rmtree(self.cache_path, ignore_errors=True) + os.makedirs(self.cache_path) + + def bp(self, result): + import pdb + print str(result) + pdb.set_trace() + return result + + +def delay(ret, t): + d = defer.Deferred() + reactor.callLater(t, d.callback, ret) + return d diff -Nru flumotion-0.6.1/flumotion/test/test_component_httpserver.py flumotion-0.9.1/flumotion/test/test_component_httpserver.py --- flumotion-0.6.1/flumotion/test/test_component_httpserver.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_httpserver.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- test-case-name: flumotion.test.test_component_httpserver -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -38,9 +34,13 @@ from flumotion.component.plugs.cortado import cortado from flumotion.test import test_http +attr = testsuite.attr + class MountTest(testsuite.TestCase): + slow = True + def setUp(self): self.path = tempfile.mkdtemp(suffix=".flumotion.test") A = os.path.join(self.path, 'A') @@ -199,6 +199,8 @@ class PlugTest(testsuite.TestCase): + slow = True + def setUp(self): self.component = None cortado.getCortadoFilename = \ @@ -301,7 +303,7 @@ d1.addCallback(gotCortadoHTML) d2 = client.getPage(self._getURL('/m/c/index.html')) - d2.addErrback(gotCortadoHTML) + d2.addCallback(gotCortadoHTML) return defer.DeferredList([d1, d2], fireOnOneErrback=True) @@ -324,7 +326,7 @@ d1.addCallback(gotCortadoHTML) d2 = client.getPage(self._getURL('/m/c/index.html?FLUREQID=blabla')) - d2.addErrback(gotCortadoHTML) + d2.addCallback(gotCortadoHTML) return defer.DeferredList([d1, d2], fireOnOneErrback=True) @@ -412,11 +414,13 @@ length) self.assertEquals(request.getHeader('content-type'), 'application/octet-stream') + self.assertEquals(request.getHeader('Connection'), 'close') def finishPartialCallback(self, result, request, data, start, end): self.finishCallback(result, request, http.PARTIAL_CONTENT, data) self.assertEquals(request.getHeader('Content-Range'), "bytes %d-%d/%d" % (start, end, 11)) + self.assertEquals(request.getHeader('Connection'), 'close') def testFull(self): fr = FakeRequest() @@ -539,6 +543,8 @@ fr = FakeRequest() resource.render(fr) fr.finishDeferred.addCallback(lambda res: + self.assertEquals(fr.getHeader("Connection"), "close")) + fr.finishDeferred.addCallback(lambda res: self.assertEquals(fr.response, http.NOT_FOUND)) return fr.finishDeferred diff -Nru flumotion-0.6.1/flumotion/test/test_component_httpstreamer.py flumotion-0.9.1/flumotion/test/test_component_httpstreamer.py --- flumotion-0.6.1/flumotion/test/test_component_httpstreamer.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_httpstreamer.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- test-case-name: flumotion.test.test_component_httpstreamer -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.trial import unittest @@ -24,6 +20,8 @@ from flumotion.common import testsuite from flumotion.component.consumers.httpstreamer import httpstreamer +attr = testsuite.attr + CONFIG = { 'feed': [], 'name': 'http-video', @@ -41,6 +39,9 @@ class StreamerTestCase(testsuite.TestCase): + + slow = True + properties = {} config = CONFIG @@ -57,28 +58,6 @@ return self.config.copy() -class TestOldProperties(StreamerTestCase): - "Test that old properties with underscores in the name get converted." - properties = { - u'user_limit': 1024, - u'mount_point': '/', - u'bandwidth_limit': 10, - u'port': 8800, - u'burst_on_connect': True, - } - - def testPropertiesConverted(self): - # test that the old-style properties were renamed to new-style - props = self.component.config['properties'] - for key in ('user_limit', 'mount_point', 'bandwidth_limit', - 'burst_on_connect'): - self.failIf(key in props) - self.assertEquals(props['client-limit'], 1024) - self.assertEquals(props['bandwidth-limit'], 10) - self.assertEquals(props['mount-point'], '/') - self.assertEquals(props['burst-on-connect'], True) - - class TestStreamDataNoPlug(StreamerTestCase): def testGetStreamData(self): diff -Nru flumotion-0.6.1/flumotion/test/test_component_init.py flumotion-0.9.1/flumotion/test/test_component_init.py --- flumotion-0.6.1/flumotion/test/test_component_init.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_init.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_component_init -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.trial import unittest diff -Nru flumotion-0.6.1/flumotion/test/test_component_padmonitor.py flumotion-0.9.1/flumotion/test/test_component_padmonitor.py --- flumotion-0.6.1/flumotion/test/test_component_padmonitor.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_padmonitor.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -27,9 +23,13 @@ from flumotion.common import testsuite from flumotion.component import padmonitor +attr = testsuite.attr + class TestPadMonitor(testsuite.TestCase): + slow = True + def _run_pipeline(self, pipeline): pipeline.set_state(gst.STATE_PLAYING) pipeline.get_bus().poll(gst.MESSAGE_EOS, -1) @@ -59,8 +59,8 @@ return d def testPadMonitorTimeout(self): - padmonitor.PadMonitor.PAD_MONITOR_PROBE_FREQUENCY = 0.2 - padmonitor.PadMonitor.PAD_MONITOR_TIMEOUT = 0.5 + padmonitor.PadMonitor.PAD_MONITOR_PROBE_INTERVAL = 0.2 + padmonitor.PadMonitor.PAD_MONITOR_CHECK_INTERVAL = 0.5 pipeline = gst.parse_launch( 'fakesrc num-buffers=1 ! identity name=id ! fakesink') diff -Nru flumotion-0.6.1/flumotion/test/test_component_playlist.py flumotion-0.9.1/flumotion/test/test_component_playlist.py --- flumotion-0.6.1/flumotion/test/test_component_playlist.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_playlist.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- test-case-name: flumotion.test.test_component_httpstreamer -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import time diff -Nru flumotion-0.6.1/flumotion/test/test_component.py flumotion-0.9.1/flumotion/test/test_component.py --- flumotion-0.6.1/flumotion/test/test_component.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_component -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gobject diff -Nru flumotion-0.6.1/flumotion/test/test_component_video_converter.py flumotion-0.9.1/flumotion/test/test_component_video_converter.py --- flumotion-0.6.1/flumotion/test/test_component_video_converter.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_component_video_converter.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,175 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gst + +from twisted.python import failure +from twisted.internet import defer, reactor, interfaces, gtk2reactor +from twisted.web import client, error + +from flumotion.common import testsuite +from flumotion.common import log, errors +from flumotion.common.planet import moods +from flumotion.component.converters.video import video +from flumotion.common import gstreamer + +from flumotion.test import comptest + +attr = testsuite.attr + +if not gstreamer.element_factory_exists('deinterlace')\ + or not gstreamer.element_factory_has_property('deinterlace', 'method'): + skip="GStreamer element 'deinterlace' is too old or doesn't exists" + + +class TestVideoConverter(comptest.CompTestTestCase, log.Loggable): + + def setUp(self): + self.tp = comptest.ComponentTestHelper() + prod = ('videotestsrc is-live=true ! ' + 'video/x-raw-rgb,framerate=(fraction)1/2,width=320,height=240,' + 'pixel-aspect-ratio=1/2,interlaced=true') + self.s = 'flumotion.component.converters.video.video.Converter' + + self.prod = comptest.pipeline_src(prod) + + def tearDown(self): + comptest.cleanup_reactor() + + @attr('slow') + def test_running_and_happy(self): + vc = comptest.ComponentWrapper('video-converter', video.Converter, + name='video-converter', + cfg={'properties': + {'deinterlace-mode': 'disabled'}}) + + self.tp.set_flow([self.prod, vc]) + + d = self.tp.start_flow() + + # wait for the converter to go happy + d.addCallback(lambda _: vc.wait_for_mood(moods.happy)) + # let it run for a few seconds + d.addCallback(lambda _: comptest.delayed_d(5, _)) + # and finally stop the flow + d.addCallback(lambda _: self.tp.stop_flow()) + return d + + def _test_videoscale(self, res, vc, par, w, h, exact=True): + p = vc.comp.pipeline.get_by_name("feeder:default-pay") + c = p.get_static_pad('sink').get_negotiated_caps()[0] + if exact: + # values have to match exactly + self.assertEquals(c['width'], w) + self.assertEquals(c['height'], h) + self.assertEquals(c['pixel-aspect-ratio'], par) + else: + # 320x240 at 1/2 is 640x240 at 1/4 + num = c['width'] * h * c['pixel-aspect-ratio'].num * par.denom + den = w * c['height'] * par.num * c['pixel-aspect-ratio'].denom + self.assertEquals(num, den, + 'w/h/par do not match source: %dx%d at %r vs %dx%d at %r' % ( + c['width'], c['height'], c['pixel-aspect-ratio'], + w, h, par)) + + def _videoscale_test(self, properties, par, w, h, exact=False): + vc = comptest.ComponentWrapper('video-converter', video.Converter, + name='video-converter', + cfg={'properties': properties}) + self.tp.set_flow([self.prod, vc]) + + d = self.tp.start_flow() + + # wait for the converter to go happy + d.addCallback(lambda _: vc.wait_for_mood(moods.happy)) + d.addCallback(self._test_videoscale, vc, par, w, h, exact=exact) + # let it run for a few seconds + d.addCallback(lambda _: comptest.delayed_d(2, _)) + # and finally stop the flow + d.addCallback(lambda _: self.tp.stop_flow()) + return d + + @attr('slow') + def test_is_square_False(self): + return self._videoscale_test({'is-square': False, + 'deinterlace-mode': 'disabled'}, + gst.Fraction(1, 2), 320, 240) + + @attr('slow') + def test_is_square_True(self): + return self._videoscale_test({'is-square': True, + 'deinterlace-mode': 'disabled'}, + gst.Fraction(1, 1), 160, 240) + + @attr('slow') + # videoscale is free to change both height and par, so use inexact + # originally this test only checked 640x240 at 1/4, but + # videoscale in 0.10.29 negotiated to 640x480 at 1/2, which is valid too + def test_width(self): + return self._videoscale_test({'width': 640, + 'deinterlace-mode': 'disabled'}, + gst.Fraction(1, 4), 640, 240, + exact=False) + + @attr('slow') + def test_height(self): + return self._videoscale_test({'height': 120, + 'deinterlace-mode': 'disabled'}, + gst.Fraction(1, 4), 320, 120, + exact=False) + + @attr('slow') + def test_width_and_square(self): + return self._videoscale_test({'width': 640, + 'is-square': True, + 'deinterlace-mode': 'disabled'}, + gst.Fraction(1, 1), 640, 960) + + @attr('slow') + def test_width_height_is_square(self): + properties = {'width': 123, + 'height': 321, + 'is-square': True, + 'deinterlace-mode': 'disabled'} + return self._videoscale_test(properties, + gst.Fraction(1, 1), 123, 321) + + def _test_interlaced(self, res, vc, interlaced): + p = vc.comp.pipeline.get_by_name("feeder:default-pay") + c = p.get_static_pad('sink').get_negotiated_caps()[0] + self.assertEquals(c['interlaced'], interlaced) + + @attr('slow') + def test_deinterlace_auto_True(self): + properties = {'deinterlace-method': "tomsmocomp"} + vc = comptest.ComponentWrapper('video-converter', video.Converter, + name='video-converter', + cfg={'properties': properties}) + + self.tp.set_flow([self.prod, vc]) + + d = self.tp.start_flow() + + # wait for the converter to go happy + d.addCallback(lambda _: vc.wait_for_mood(moods.happy)) + # let it run for a few seconds + d.addCallback(lambda _: comptest.delayed_d(10, _)) + d.addCallback(self._test_interlaced, vc, False) + # and finally stop the flow + d.addCallback(lambda _: self.tp.stop_flow()) + return d + test_deinterlace_auto_True.skip = "Skip test" diff -Nru flumotion-0.6.1/flumotion/test/test_comptest.py flumotion-0.9.1/flumotion/test/test_comptest.py --- flumotion-0.6.1/flumotion/test/test_comptest.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_comptest.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import sys @@ -32,6 +28,8 @@ from flumotion.test.comptest import ComponentTestHelper, ComponentWrapper, \ CompTestTestCase, ComponentSad, pipeline_src, pipeline_cnv +attr = testsuite.attr + class TestCompTestGtk2Reactorness(testsuite.TestCase): supportedReactors = [] @@ -232,6 +230,8 @@ class TestCompTestFlow(CompTestTestCase): + slow = True + def setUp(self): self.duration = 2.0 diff -Nru flumotion-0.6.1/flumotion/test/test_config.py flumotion-0.9.1/flumotion/test/test_config.py --- flumotion-0.6.1/flumotion/test/test_config.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_config.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from StringIO import StringIO @@ -30,87 +26,105 @@ regchunk = """ - + - - - + + + - - - - + + + + - + - + - + - + - + - + - + - - - + + + - - - - + + + + - - - - - - - + + + + + + + - + - + - + + _description="A plug" type="test-adminaction"> - + - + - - - + + + - - + + @@ -181,7 +195,8 @@ """ - + """) self.assertRaises(errors.ConfigError, conf.parse) @@ -190,7 +205,7 @@ + _description="A component" worker=""/> """) self.assertRaises(errors.ConfigError, conf.parse) @@ -349,8 +364,7 @@ - + bar @@ -381,8 +395,7 @@ - + @@ -418,7 +431,8 @@ xml = """ - + """ conf = ConfigXML(xml) @@ -428,7 +442,8 @@ # Specify a source for a component with no eaters xml = """ - + foo:bar @@ -440,7 +455,8 @@ def testParseFlowError(self): xml = """ - + """ conf = ConfigXML(xml) @@ -449,7 +465,8 @@ xml = """ - + """ conf = ConfigXML(xml) @@ -458,7 +475,8 @@ xml = """ - + """ conf = ConfigXML(xml) @@ -476,8 +494,10 @@ def testParseManagerError(self): xml = """ - - + + """ conf = ManagerConfigXML(xml) self.failUnless(conf) @@ -592,7 +612,7 @@ def testParseCompoundPropertiesError(self): xml = """ - @@ -603,10 +623,10 @@ self.assertRaises(errors.ConfigError, conf.parse) xml = """ - - + """ @@ -616,7 +636,7 @@ self.assertRaises(errors.ConfigError, conf.parse) xml = """ - @@ -628,10 +648,10 @@ self.assertRaises(errors.ConfigError, conf.parse) xml = """ - - + bar @@ -642,13 +662,13 @@ self.assertRaises(errors.ConfigError, conf.parse) xml = """ - - + foo - + bar @@ -659,14 +679,14 @@ self.assertRaises(errors.ConfigError, conf.parse) xml = """ - - - + + string - + string @@ -683,7 +703,7 @@ - + 3/4 @@ -700,8 +720,8 @@ foobars = plugs['foo.bar'] self.assertEquals(len(foobars), 1) self.assertEquals(foobars[0], - {'socket': 'foo.bar', - 'type': 'frobulator', + {'type': 'frobulator', + 'socket': 'foo.bar', 'entries': {'default': { 'function-name': 'Frobulator', 'module-name': 'bar.baz'}}, @@ -713,7 +733,7 @@ - + true a string @@ -739,9 +759,10 @@ foobars = plugs['foo.bar'] self.assertEquals(len(foobars), 1) self.assertEquals(foobars[0], - {'socket': 'foo.bar', - 'type': 'compoundulator', + {'type': 'compoundulator', + 'socket': 'foo.bar', 'entries': {'default': { + 'function-name': 'Xombulator', 'module-name': 'xom.baz'}}, 'properties': { @@ -895,7 +916,9 @@ worker="foo"/> - prod:default + + prod:default + @@ -1039,8 +1062,10 @@ - prod:default - prod2:default + + prod:default + prod2:default + @@ -1063,7 +1088,7 @@ + worker="foo" _description="A component" /> """ diff -Nru flumotion-0.6.1/flumotion/test/test_configure.py flumotion-0.9.1/flumotion/test/test_configure.py --- flumotion-0.6.1/flumotion/test/test_configure.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_configure.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_configure -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.trial import unittest diff -Nru flumotion-0.6.1/flumotion/test/test_credentials.py flumotion-0.9.1/flumotion/test/test_credentials.py --- flumotion-0.6.1/flumotion/test/test_credentials.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_credentials.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_credentials -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import testsuite diff -Nru flumotion-0.6.1/flumotion/test/test_dag.py flumotion-0.9.1/flumotion/test/test_dag.py --- flumotion-0.6.1/flumotion/test/test_dag.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_dag.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_dag -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import dag diff -Nru flumotion-0.6.1/flumotion/test/test_defer.py flumotion-0.9.1/flumotion/test/test_defer.py --- flumotion-0.6.1/flumotion/test/test_defer.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_defer.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_defer -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.internet import defer, reactor @@ -25,6 +21,8 @@ from flumotion.common import testsuite from flumotion.twisted.defer import defer_generator, RetryingDeferred +attr = testsuite.attr + class TestDefer(testsuite.TestCase): result = None @@ -41,6 +39,7 @@ d.addCallback(lambda x: setattr(self, 'result', x)) assert self.result == 42 + @attr('slow') def testYieldResultAfter(self): self.result = None @@ -62,6 +61,7 @@ d.addCallback(checkResult) return d + @attr('slow') def testYieldNothing(self): self.result = 42 @@ -82,6 +82,7 @@ d.addCallback(checkResult) return d + @attr('slow') def testValues(self): self.result = None @@ -119,6 +120,7 @@ except Exception: pass + @attr('slow') def testException(self): self.result = None @@ -157,6 +159,7 @@ d.addCallback(checkResult) return d + @attr('slow') def testExceptionChain(self): def divide_later(x, y): @@ -219,6 +222,7 @@ return d + @attr('slow') def testRetryOnce(self): self.__first = True diff -Nru flumotion-0.6.1/flumotion/test/test_dialogs.py flumotion-0.9.1/flumotion/test/test_dialogs.py --- flumotion-0.6.1/flumotion/test/test_dialogs.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_dialogs.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_dialogs -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gobject @@ -25,12 +21,16 @@ from flumotion.admin.gtk import dialogs from flumotion.common import testsuite +attr = testsuite.attr + INTERVAL = 100 # in ms class TestProgressDialog(testsuite.TestCase): + slow = True + def setUp(self): self.window = gtk.Window() @@ -59,6 +59,8 @@ class TestErrorDialog(testsuite.TestCase): + slow = True + def setUp(self): self.window = gtk.Window() diff -Nru flumotion-0.6.1/flumotion/test/test_enum.py flumotion-0.9.1/flumotion/test/test_enum.py --- flumotion-0.6.1/flumotion/test/test_enum.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_enum.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_enum -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.spread import jelly diff -Nru flumotion-0.6.1/flumotion/test/test_flavors.py flumotion-0.9.1/flumotion/test/test_flavors.py --- flumotion-0.6.1/flumotion/test/test_flavors.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_flavors.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_flavors -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.internet import reactor, defer diff -Nru flumotion-0.6.1/flumotion/test/test_greeter.py flumotion-0.9.1/flumotion/test/test_greeter.py --- flumotion-0.6.1/flumotion/test/test_greeter.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_greeter.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,27 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_greeter -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.admin.gtk.greeter import Greeter +from flumotion.common import testsuite from flumotion.test.gtkunit import UITestCase from flumotion.ui.simplewizard import SimpleWizard, WizardStep +attr = testsuite.attr + class FakeAdminWindow: @@ -32,6 +31,8 @@ class WizardTest(UITestCase): + slow = True + def _prev(self): self.click('button_prev') diff -Nru flumotion-0.6.1/flumotion/test/test_htpasswdcrypt.py flumotion-0.9.1/flumotion/test/test_htpasswdcrypt.py --- flumotion-0.6.1/flumotion/test/test_htpasswdcrypt.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_htpasswdcrypt.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_htpasswdcrypt -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import testsuite diff -Nru flumotion-0.6.1/flumotion/test/test_http.py flumotion-0.9.1/flumotion/test/test_http.py --- flumotion-0.6.1/flumotion/test/test_http.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_http.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_http -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.internet import defer @@ -141,6 +137,18 @@ return defer.succeed(None) +class FakeAuthFailingMedium(FakeAuthMedium): + # this medium fakes suffering from a failure if you give it one + + def __init__(self): + self.failure = None + + def authenticate(self, bouncerName, keycard): + if self.failure: + return defer.fail(self.failure) + return FakeAuthMedium.authenticate(self, bouncerName, keycard) + + class FakeStreamer: caps = None mime = 'application/octet-stream' @@ -165,6 +173,9 @@ def getName(self): return "fakestreamer" + def hasCaps(self): + return not self.caps == None + class TestHTTPStreamingResource(testsuite.TestCase): # helpers @@ -206,6 +217,17 @@ d.addCallbacks(checkResult, checkResult) return d + def deferAssertInternalServerError(self, httpauth, request): + # make the resource authenticate the request, and verify + # that you get a HTTP 500 + + def checkResult(res): + self.assertEquals(request.response, http.INTERNAL_SERVER_ERROR) + + d = httpauth.startAuthentication(request) + d.addCallbacks(checkResult, checkResult) + return d + def testRenderNotReady(self): streamer = FakeStreamer() httpauth = HTTPAuthentication(streamer) @@ -258,7 +280,6 @@ httpauth = HTTPAuthentication(streamer) resource = resources.HTTPStreamingResource(streamer, httpauth) # override issuer - httpauth.setIssuerClass('HTTPTokenIssuer') httpauth.setBouncerName('fakebouncer') httpauth.setDomain('FakeDomain') @@ -292,7 +313,6 @@ httpauth = HTTPAuthentication(streamer) resource = resources.HTTPStreamingResource(streamer, httpauth) # override issuer - httpauth.setIssuerClass('HTTPTokenIssuer') httpauth.setBouncerName('fakebouncer') httpauth.setDomain('FakeDomain') @@ -316,6 +336,41 @@ d.callback(None) return d + def testRenderHTTPAllowDefault(self): + streamer = FakeStreamer(mediumClass=FakeAuthFailingMedium) + httpauth = HTTPAuthentication(streamer) + resource = resources.HTTPStreamingResource(streamer, httpauth) + httpauth.setBouncerName('fakebouncer') + + streamer.caps = True + self.failUnless(resource.isReady()) + + d = defer.Deferred() + + def wrongToken(_): + request = FakeRequest(user='wronguser') + return self.deferAssertUnauthorized(httpauth, request) + + def errorDisallowDefault(_, error): + streamer.medium.failure = error + request = FakeRequest(user='wronguser') + return self.deferAssertInternalServerError(httpauth, request) + + def errorAllowDefault(_, error): + streamer.medium.failure = error + httpauth.setAllowDefault(True) + request = FakeRequest(user='wronguser') + return self.deferAssertAuthorized(httpauth, request) + + d.addCallback(wrongToken) + d.addCallback(errorDisallowDefault, errors.NotConnectedError()) + d.addCallback(errorDisallowDefault, errors.UnknownComponentError()) + d.addCallback(errorAllowDefault, errors.NotConnectedError()) + d.addCallback(errorAllowDefault, errors.UnknownComponentError()) + + d.callback(None) + return d + def testRenderNew(self): streamer = FakeStreamer() httpauth = HTTPAuthentication(streamer) diff -Nru flumotion-0.6.1/flumotion/test/test_i18n.py flumotion-0.9.1/flumotion/test/test_i18n.py --- flumotion-0.6.1/flumotion/test/test_i18n.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_i18n.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_i18n -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext diff -Nru flumotion-0.6.1/flumotion/test/test_import.py flumotion-0.9.1/flumotion/test/test_import.py --- flumotion-0.6.1/flumotion/test/test_import.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_import.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,24 +1,21 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004--2009 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + import os.path import flumotion @@ -46,7 +43,7 @@ class TestImport(testsuite.TestCase): def testImportAllModules(self): - pkg_exclude = ['flumotion.test'] + pkg_exclude = ['flumotion.test', 'flumotion.extern'] try: import rrdtool diff -Nru flumotion-0.6.1/flumotion/test/test_keycards.py flumotion-0.9.1/flumotion/test/test_keycards.py --- flumotion-0.6.1/flumotion/test/test_keycards.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_keycards.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_keycards -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import testsuite @@ -31,28 +27,14 @@ # test all the keycards -class TestKeycardUACPP(testsuite.TestCase): - - def testInit(self): - keycard = keycards.KeycardUACPP('user', 'test', '127.0.0.1') - self.assertEquals(keycard.state, keycards.REQUESTING) - self.failUnless(credentials.IUsernameCryptPassword.providedBy(keycard)) - - -class TestKeycardUACPCC(testsuite.TestCase): - - def testInit(self): - keycard = keycards.KeycardUACPCC('user', '127.0.0.1') - self.assertEquals(keycard.state, keycards.REQUESTING) - self.failUnless(credentials.IUsernameCryptPassword.providedBy(keycard)) - - class TestKeycardToken(testsuite.TestCase): def testInit(self): - keycard = keycards.KeycardToken('token', '127.0.0.1') + keycard = keycards.KeycardGeneric() + keycard.token = 'token' + keycard.address = '127.0.0.1' self.assertEquals(keycard.state, keycards.REQUESTING) - self.failUnless(credentials.IToken.providedBy(keycard)) + #self.failUnless(credentials.IToken.providedBy(keycard)) d = keycard.getData() self.assertEquals(d['token'], 'token') @@ -64,7 +46,8 @@ class TestKeycardHTTPDigest(testsuite.TestCase): def testInit(self): - keycard = keycards.KeycardHTTPDigest('username') + keycard = keycards.KeycardGeneric() + keycard.username = 'username' self.assertEquals(keycard.state, keycards.REQUESTING) d = keycard.getData() @@ -72,17 +55,6 @@ repr(keycard) -# F0.8 - - -class TestHTTPDigestKeycard(testsuite.TestCase): - - def testInit(self): - keycard = keycards.HTTPDigestKeycard('username') - self.assertEquals(keycard.state, keycards.REQUESTING) - - testInit.suppress = [util.suppress( - message='Use KeycardHTTPDigest instead.', category=DeprecationWarning)] # test the base class repr @@ -112,7 +84,10 @@ def remote_getKeycard(self): if not self.keycard: - keycard = keycards.KeycardUACPP('user', 'test', '127.0.0.1') + keycard = keycards.KeycardGeneric() + keycard.username = 'user' + keycard.password = 'test' + keycard.address = '127.0.0.1' #print "Worker keycard %r, id: %d" % (keycard, id(keycard)) self.keycard = keycard diff -Nru flumotion-0.6.1/flumotion/test/test_launch_parse.py flumotion-0.9.1/flumotion/test/test_launch_parse.py --- flumotion-0.6.1/flumotion/test/test_launch_parse.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_launch_parse.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,66 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_common_componentui -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +from flumotion.common.testsuite import TestCase +from flumotion.launch import parse + + +class TestLaunchParse(TestCase): + + def testParsePlug(self): + + def check(arg, exp): + self.assertEqual(exp, parse.parse_plug(arg)) + + check("\pn", ("pn", [])) + check("\pn,a1=v1,a2=v2", + ("pn", [("a1", "v1"), ("a2", "v2")])) + check("\pn,a1=[c1=d1],a2=v2", + ("pn", [("a1", [("c1", "d1")]), ("a2", "v2")])) + check("\pn,a1=v1,a2=[c1=d1,c2=d2],a3=v3", + ("pn", [("a1", "v1"), + ("a2", [("c1", "d1"), ("c2", "d2")]), + ("a3", "v3")])) + check("\pn,a1=v1,a2=[c1=d1]", + ("pn", [("a1", "v1"), ("a2", [("c1", "d1")])])) + check("\pn,a1=v1,a2=\[c1=d1\]", + ("pn", [("a1", "v1"), ("a2", "[c1=d1]")])) + check("\pn,a1=[c1=d1,c2=[e1=[g1=h1],e2=f2]]", + ("pn", [("a1", [("c1", "d1"), + ("c2", [("e1", [("g1", "h1")]), + ("e2", "f2")])])])) + + def testSloppyUnescape(self): + + def check(val, exp): + self.assertEqual(parse.sloppy_unescape(val, "E"), exp) + + check("", "") + check("\\", "\\") + check("\\\\", "\\") + check("E", "E") + check("U", "U") + check("E\\", "E\\") + check("U\\", "U\\") + check("\\E", "E") + check("\\U", "\\U") + check("\\\\E", "\\E") + check("\\\\U", "\\U") + check("\\\\\\E", "\\E") + check("\\\\\\U", "\\\\U") + check("\\U\\E\\U\\", "\\UE\\U\\") + check("\\E\\U\\E\\", "E\\UE\\") diff -Nru flumotion-0.6.1/flumotion/test/test_logfilter.py flumotion-0.9.1/flumotion/test/test_logfilter.py --- flumotion-0.6.1/flumotion/test/test_logfilter.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_logfilter.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import errors diff -Nru flumotion-0.6.1/flumotion/test/test_manager_admin.py flumotion-0.9.1/flumotion/test/test_manager_admin.py --- flumotion-0.6.1/flumotion/test/test_manager_admin.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_manager_admin.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_manager_admin -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.spread import pb diff -Nru flumotion-0.6.1/flumotion/test/test_manager_config.py flumotion-0.9.1/flumotion/test/test_manager_config.py --- flumotion-0.6.1/flumotion/test/test_manager_config.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_manager_config.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,28 +1,25 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_manager_config -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from cStringIO import StringIO from flumotion.common import testsuite from flumotion.common.errors import ConfigError +from flumotion.common.xmlwriter import XMLWriter from flumotion.manager.config import ConfigEntryComponent, \ ConfigEntryManager, ManagerConfigParser, PlanetConfigParser, \ PlanetXMLWriter @@ -80,20 +77,20 @@ self.assertRaises(ConfigError, ManagerConfigParser, f) def testParseBouncerComponent(self): - f = self._buildManager("""""") + f = self._buildManager("""""") config = ManagerConfigParser(f) self.failIf(config.bouncer) config.parseBouncerAndPlugs() self.failUnless(config.bouncer) self.failUnless(isinstance(config.bouncer, ConfigEntryComponent)) - self.assertEquals(config.bouncer.type, 'bouncer') + self.assertEquals(config.bouncer.type, 'trivial-bouncer') self.assertEquals(config.bouncer.name, 'foobar') def testParsePlugs(self): f = self._buildManager( """ - + /dev/stdout """) @@ -232,9 +229,7 @@ ' version="1.0.0">\n' ' slave\n' ' \n' - ' \n' + ' \n' ' foobar\n' ' \n' ' \n' @@ -245,7 +240,8 @@ '\n') vishnu = Vishnu('planet-name') vishnu.loadComponentConfigurationXML(StringIO(xml), 'foo') - testsuite.diffStrings(xml, vishnu.getConfiguration()) + testsuite.diffStrings(XMLWriter.encoding + xml, + vishnu.getConfiguration()) def testMultiple(self): xml = ( @@ -267,4 +263,5 @@ '\n') vishnu = Vishnu('planet-name') vishnu.loadComponentConfigurationXML(StringIO(xml), 'foo') - testsuite.diffStrings(xml, vishnu.getConfiguration()) + testsuite.diffStrings(XMLWriter.encoding + xml, + vishnu.getConfiguration()) diff -Nru flumotion-0.6.1/flumotion/test/test_manager_manager.py flumotion-0.9.1/flumotion/test/test_manager_manager.py --- flumotion-0.6.1/flumotion/test/test_manager_manager.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_manager_manager.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_manager_manager -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -495,7 +491,7 @@ compId = common.componentId("testflow", "streamer-ogg-theora") compLabel = "Streamer OGG-Theora/Vorbis" compEaters = [("default", "converter-ogg-theora")] - compProps = [("port", 8800)] + compProps = [("port", "8800")] compState = self.vishnu.loadComponent( manager.LOCAL_IDENTITY, compType, compId, compLabel, compProps, "streamer", [], compEaters, False, []) @@ -789,3 +785,11 @@ # now lets empty planet return self.vishnu.emptyPlanet() + + def testUpdateBundlerBasket(self): + basket = self.vishnu.getBundlerBasket() + self.assertEqual(basket, self.vishnu.getBundlerBasket()) + # Force registry rebuild + from flumotion.common import registry + registry.getRegistry().verify(force=True) + self.assertNotEqual(basket, self.vishnu.getBundlerBasket()) diff -Nru flumotion-0.6.1/flumotion/test/test_manager_worker.py flumotion-0.9.1/flumotion/test/test_manager_worker.py --- flumotion-0.6.1/flumotion/test/test_manager_worker.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_manager_worker.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_manager_worker -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.internet import defer diff -Nru flumotion-0.6.1/flumotion/test/test_options.py flumotion-0.9.1/flumotion/test/test_options.py --- flumotion-0.6.1/flumotion/test/test_options.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_options.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_options -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import testsuite diff -Nru flumotion-0.6.1/flumotion/test/test_parts.py flumotion-0.9.1/flumotion/test/test_parts.py --- flumotion-0.6.1/flumotion/test/test_parts.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_parts.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_parts -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gtk diff -Nru flumotion-0.6.1/flumotion/test/test_pb.py flumotion-0.9.1/flumotion/test/test_pb.py --- flumotion-0.6.1/flumotion/test/test_pb.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_pb.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,33 +1,30 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_pb -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import crypt from twisted.cred import portal -from twisted.internet import defer, reactor +from twisted.internet import defer, reactor, task from twisted.python import log as tlog from twisted.spread import pb as tpb from twisted.trial import unittest from zope.interface import implements +from flumotion.configure import configure from flumotion.common import testsuite from flumotion.common import keycards, log, errors from flumotion.component.bouncers import htpasswdcrypt, saltsha256 @@ -53,14 +50,21 @@ ### lots of fake objects to have fun with +class FakePortalPlaintext(portal.Portal): + # a fake portal with a checker that lets username, password in + + def __init__(self): + checker = checkers.FlexibleCredentialsChecker() + checker.addUser("username", "password") + portal.Portal.__init__(self, FakeTRealm(), (checker, )) + + class FakePortalWrapperPlaintext: # a fake wrapper with a checker that lets username, password in def __init__(self): self.broker = FakeBroker() - self.checker = checkers.FlexibleCredentialsChecker() - self.checker.addUser("username", "password") - self.portal = portal.Portal(FakeTRealm(), (self.checker, )) + self.portal = FakePortalplaintext() class FakePortalWrapperCrypt: @@ -129,17 +133,12 @@ class TestTwisted_PortalAuthChallenger(testsuite.TestCase): - if haveTwisted(8, 0): - # FIXME: don't directly use twisted's private classes! - skip = 'Test broken since twisted 8.0.' def setUp(self): - # PB server creates a challenge - self.challenge = tpb.challenge() - # and a challenger to send to the client - self.challenger = tpb._PortalAuthChallenger( - FakePortalWrapperPlaintext(), - 'username', self.challenge) + root = tpb.IPBRoot(FakePortalPlaintext()).rootObject( + broker=FakeBroker()) + # PB server creates a challenge and a challenger to send to the client + self.challenge, self.challenger = root.remote_login('username') def testRightPassword(self): # client is asked to respond, so generate the response @@ -188,7 +187,7 @@ return d def testUACPPWrongPassword(self): - keycard = keycards.KeycardUACPP('user', 'tes', '127.0.0.1') + keycard = keycards.KeycardUACPCC('user', '127.0.0.1') d = self.wrapper.remote_login(keycard, "avatarId", 'twisted.spread.pb.IPerspective') @@ -321,7 +320,7 @@ # allow us to issue a keycard a = pb.Authenticator(username="tarzan") d = a.issue([ - "flumotion.common.keycards.KeycardUACPP", ]) + "flumotion.common.keycards.KeycardGeneric", ]) d.addCallback(lambda r: self.failIf(r)) return d @@ -330,7 +329,7 @@ a = pb.Authenticator(username="tarzan", password="jane", address="localhost") d = a.issue([ - "flumotion.common.keycards.KeycardUACPP", ]) + "flumotion.common.keycards.KeycardGeneric", ]) d.addCallback(lambda r: self.failIf(r)) def testIssueUACPCC(self): @@ -483,7 +482,9 @@ factory = pb.FPBClientFactory() # create - keycard = keycards.KeycardUACPCC('user', '127.0.0.1') + keycard = keycards.KeycardGeneric() + keycard.username = 'user' + keycard.address = '127.0.0.1' # send d = factory.login(keycard, 'MIND') @@ -512,7 +513,9 @@ factory = pb.FPBClientFactory() # create - keycard = keycards.KeycardUACPCC('user', '127.0.0.1') + keycard = keycards.KeycardGeneric() + keycard.username = 'user' + keycard.address = '127.0.0.1' self.assert_(keycard) self.assertEquals(keycard.state, keycards.REQUESTING) @@ -646,5 +649,132 @@ return d +class FakeMindTransport: + + disconnected = False + disconnectCallback = None + + def __init__(self): + # mock self.mind.broker.transport + self.mind = self.broker = self.transport = self + + def callRemote(self, name, *args, **kwargs): + self.d = defer.Deferred() + return self.d + + def notifyOnDisconnect(self, callback): + self.disconnectCallback = callback + + def callback(self, result): + self.d.callback(result) + + # Transport methods + + def getHost(self): + pass + + def getPeer(self): + pass + + def loseConnection(self): + if self.disconnectCallback: + self.disconnectCallback(self) + self.disconnected = True + + +class TestPingableAvatar(testsuite.TestCase): + + pingCheckInterval = (configure.heartbeatInterval * + configure.pingTimeoutMultiplier) + + def setUp(self): + self.mind = FakeMindTransport() + + def tearDown(self): + self.mind.loseConnection() + + def testNoPing(self): + clock = task.Clock() + + a = pb.PingableAvatar(avatarId=None, clock=clock) + a.setMind(self.mind) + self.assert_(not self.mind.disconnected) + + clock.advance(self.pingCheckInterval) + self.assert_(not self.mind.disconnected) + + clock.advance(self.pingCheckInterval) + self.assert_(self.mind.disconnected) + + def testPingResetsTimeout(self): + clock = task.Clock() + + a = pb.PingableAvatar(avatarId=None, clock=clock) + a.setMind(self.mind) + + clock.advance(self.pingCheckInterval) + + # ping + broker = tpb.Broker() + d = a.perspectiveMessageReceivedUnserialised( + broker, 'ping', (), {}) + d.addCallback(broker.unserialize) + + def cb(result): + self.assertEquals(result, True) + + clock.advance(self.pingCheckInterval) + self.assert_(not self.mind.disconnected) + + clock.advance(self.pingCheckInterval) + self.assert_(self.mind.disconnected) + d.addCallback(cb) + + return d + + def testMessageReceivedUnserialisedResetsTimeout(self): + clock = task.Clock() + + a = pb.PingableAvatar(avatarId=None, clock=clock) + a.perspective_test = lambda: True + a.setMind(self.mind) + + clock.advance(self.pingCheckInterval) + + # this should reset the ping timeout + d = a.perspectiveMessageReceivedUnserialised( + tpb.Broker(), 'test', (), {}) + + clock.advance(self.pingCheckInterval) + self.assert_(not self.mind.disconnected) + + clock.advance(self.pingCheckInterval) + self.assert_(self.mind.disconnected) + + def testSuccessfulMindRemoteAnswerResetsTimeout(self): + clock = task.Clock() + + a = pb.PingableAvatar(avatarId=None, clock=clock) + a.setMind(self.mind) + + clock.advance(self.pingCheckInterval) + + d, remote_result = a.mindCallRemote('test'), [None] + + def cb(result): + remote_result[0] = result + d.addCallback(cb) + + # this should reset the ping timeout + self.mind.callback(True) + self.assertEquals(remote_result, [True]) + + clock.advance(self.pingCheckInterval) + self.assert_(not self.mind.disconnected) + + clock.advance(self.pingCheckInterval) + self.assert_(self.mind.disconnected) + + if __name__ == '__main__': unittest.main() diff -Nru flumotion-0.6.1/flumotion/test/test_pbstream.py flumotion-0.9.1/flumotion/test/test_pbstream.py --- flumotion-0.6.1/flumotion/test/test_pbstream.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_pbstream.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_pbstream -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -31,7 +27,7 @@ from flumotion.common import log from flumotion.common import testsuite - +attr = testsuite.attr # this example sets up a PB connection from client to server, @@ -296,6 +292,7 @@ return server + @attr('slow') def testRun(self): d = defer.Deferred() s = self.startServer() diff -Nru flumotion-0.6.1/flumotion/test/test_porter.py flumotion-0.9.1/flumotion/test/test_porter.py --- flumotion-0.6.1/flumotion/test/test_porter.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_porter.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_porter -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import cgi diff -Nru flumotion-0.6.1/flumotion/test/test_public_ui_api.py flumotion-0.9.1/flumotion/test/test_public_ui_api.py --- flumotion-0.6.1/flumotion/test/test_public_ui_api.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_public_ui_api.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import testsuite diff -Nru flumotion-0.6.1/flumotion/test/test_reflect.py flumotion-0.9.1/flumotion/test/test_reflect.py --- flumotion-0.6.1/flumotion/test/test_reflect.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_reflect.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_reflect -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.twisted import reflect diff -Nru flumotion-0.6.1/flumotion/test/test_registry.py flumotion-0.9.1/flumotion/test/test_registry.py --- flumotion-0.6.1/flumotion/test/test_registry.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_registry.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,30 +1,29 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_registry -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import StringIO import os -import warnings +import shutil import tempfile +import warnings warnings.filterwarnings('ignore', category=FutureWarning) +from twisted.internet import task + from flumotion.common import testsuite from flumotion.common import registry, fxml, common @@ -32,7 +31,7 @@ class TestRegistry(testsuite.TestCase): def setUp(self): - self.reg = registry.ComponentRegistry() + self.reg = registry.ComponentRegistry(paths=[]) self.reg.clean() def testDefault(self): @@ -69,9 +68,9 @@ self.reg.addFromString(""" - + - + """) @@ -97,7 +96,7 @@ self.reg.addFromString(""" - + @@ -122,7 +121,7 @@ self.reg.addFromString(""" - + @@ -193,7 +192,7 @@ template = """ - + %s @@ -217,31 +216,32 @@ xml = """ - + """ - reg = registry.ComponentRegistry() + reg = registry.ComponentRegistry(paths=[]) reg.addFromString(xml) reg.clean() self.failUnless(reg.isEmpty()) def testComponentTypeError(self): - reg = registry.ComponentRegistry() + reg = registry.ComponentRegistry(paths=[]) xml = """ - + + """ reg.addFromString(xml) def testAddXmlParseError(self): - reg = registry.ComponentRegistry() + reg = registry.ComponentRegistry(paths=[]) xml = """ - + """ self.assertRaises(fxml.ParserError, reg.addFromString, xml) @@ -249,7 +249,7 @@ self.assertRaises(fxml.ParserError, reg.addFromString, xml) def _compareRegistryAfterDump(self, orig, expected, name=''): - reg = registry.ComponentRegistry() + reg = registry.ComponentRegistry(paths=[]) reg.clean() reg.addFromString(orig) s = StringIO.StringIO() @@ -558,10 +558,23 @@ os.rmdir(root) +def writeComponent(filename, name): + open(filename, 'w').write(""" + + + + + + + +""" % name) + return filename + + class TestFindComponents(testsuite.TestCase): def setUp(self): - self.reg = registry.ComponentRegistry() + self.reg = registry.ComponentRegistry(paths=[]) self.reg.clean() # override the registry's filename so make distcheck works @@ -575,9 +588,9 @@ os.makedirs('subdir') os.makedirs('subdir/foo') os.makedirs('subdir/bar') - self.writeComponent('subdir/first.xml', 'first') - self.writeComponent('subdir/foo/second.xml', 'second') - self.writeComponent('subdir/bar/third.xml', 'third') + writeComponent('subdir/first.xml', 'first') + writeComponent('subdir/foo/second.xml', 'second') + writeComponent('subdir/bar/third.xml', 'third') def tearDown(self): rmdir('subdir') @@ -588,17 +601,6 @@ if os.path.exists(self.reg.filename): os.unlink(self.reg.filename) - def writeComponent(self, filename, name): - open(filename, 'w').write(""" - - - - - - - -""" % name) - def testSimple(self): self.reg.addRegistryPath('.', prefix='subdir') components = self.reg.getComponents() @@ -606,3 +608,50 @@ types = [c.getType() for c in components] types.sort() self.assertEquals(types, ['first', 'second', 'third']) # alpha order + + +class TestRegistryUpdate(testsuite.TestCase): + + def setUp(self): + self.tempdir = tempfile.mkdtemp() + self.regcache = os.path.join(self.tempdir, 'registry.xml') + self.regpath = self.tempdir + + # monkeypatch registry._getMTime() so we can simulate filesystem + # updates + self.mtime = {} + self._getMTime = registry._getMTime + registry._getMTime = self.mtime.__getitem__ + self.mtime[registry.__file__] = self._getMTime(registry.__file__) + + def tearDown(self): + registry._getMTime = self._getMTime + shutil.rmtree(self.tempdir, ignore_errors=True) + + def testConcurrentCacheUpdate(self): + clock = task.Clock() + + # create tree containing registry snippets + d = os.path.join(self.regpath, 'flumotion') + os.mkdir(d) + f1 = writeComponent(os.path.join(d, 'first.xml'), 'first') + f2 = writeComponent(os.path.join(d, 'second.xml'), 'second') + self.mtime[d] = self.mtime[f1] = self.mtime[f2] = clock.seconds() + + # initialize registry + reg = registry.ComponentRegistry( + [self.regpath], 'flumotion', self.regcache, clock.seconds) + + # modify registry snippet + clock.advance(1) + f2 = writeComponent(os.path.join(d, 'second.xml'), 'second-new') + self.mtime[f2] += clock.seconds() + + # another process updates the registry cache + self.mtime[self.regcache] = clock.seconds() + + # the registry should be rebuilt anyway + self.assert_(reg.rebuildNeeded()) + reg.verify() + types = sorted(c.getType() for c in reg.getComponents()) + self.assertEquals(types, ['first', 'second-new']) diff -Nru flumotion-0.6.1/flumotion/test/test_saltsha256.py flumotion-0.9.1/flumotion/test/test_saltsha256.py --- flumotion-0.6.1/flumotion/test/test_saltsha256.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_saltsha256.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_saltsha256 -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import testsuite diff -Nru flumotion-0.6.1/flumotion/test/test_server_selector.py flumotion-0.9.1/flumotion/test/test_server_selector.py --- flumotion-0.6.1/flumotion/test/test_server_selector.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_server_selector.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,186 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_server_selector -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import exceptions +import time + +import twisted + +from twisted.internet import defer, threads, reactor +from flumotion.common import testsuite, errors +from flumotion.component.misc.httpserver.httpcached import server_selection + +attr = testsuite.attr + +twisted.internet.base.DelayedCall.debug = True + + +class TestServerSelector(testsuite.TestCase): + + slow = True + + def setUp(self): + self.ss = server_selection.ServerSelector() + self.ss.setup() + self.s = None + + def tearDown(self): + self.ss.cleanup() + self.s = None + + def testEmpty(self): + s = self.ss.getServers() + self.failUnlessRaises(exceptions.StopIteration, s.next) + + def testAddLocalhost(self): + d = self.ss.addServer("localhost", 80) + d.addCallback(lambda _: self.ss.getServers()) + d.addCallback(lambda s: setattr(self, "s", s)) + d.addCallback(lambda _: self.s.next()) + return d + + def testAddTwiceLocalhost(self): + d1 = self.ss.addServer("flumotion.com", 80, 1.0) + d2 = self.ss.addServer("flumotion.com", 80, 1.0) + d = defer.DeferredList([d1, d2]) + d.addCallback(lambda _: self.ss.getServers()) + d.addCallback(lambda s: setattr(self, "s", s)) + d.addCallback(lambda _: self.s.next()) + d.addCallback(lambda _: self.failUnlessRaises(exceptions.StopIteration, + self.s.next)) + d.addCallback(lambda _: self.ss.addServer("flumotion.com", 80, 2.0)) + d.addCallback(lambda _: self.ss.getServers()) + d.addCallback(lambda s: setattr(self, "s", s)) + d.addCallback(lambda _: self.s.next()) + d.addCallback(lambda _: self.s.next()) + d.addCallback(lambda _: self.failUnlessRaises(exceptions.StopIteration, + self.s.next)) + return d + + def testAddFlumotionIsRad(self): + d = self.ss.addServer("flumotionIs.rad", 80) + d.addCallback(lambda _: self.ss.getServers()) + d.addCallback(lambda s: setattr(self, "s", s)) + d.addCallback(lambda _: self.failUnlessRaises(exceptions.StopIteration, + self.s.next)) + return d + + def testAddGoogle(self): + + def _checkAll(s): + for i in s: + pass + d = self.ss.addServer("google.com", 80) + d.addCallback(lambda _: self.ss.getServers()) + d.addCallback(lambda s: _checkAll(s)) + return d + + def testPriority(self): + d1 = self.ss.addServer("flumotion.com", 80, 1.0) + d2 = self.ss.addServer("localhost", 80, 2.0) + d = defer.DeferredList([d1, d2]) + d.addCallback(lambda _: self.ss.getServers()) + d.addCallback(lambda s: setattr(self, "s", s)) + # first flumotion + d.addCallback(lambda _: self.s.next()) + d.addCallback(lambda server: self.failIfEqual(server.ip, "127.0.0.1")) + # then localhost + d.addCallback(lambda _: self.s.next()) + d.addCallback(lambda server: self.assertEqual(server.ip, "127.0.0.1")) + return d + + def testRefresh(self): + self.tearDown() + + table = {"localhost": ["127.0.0.1", "10.0.0.1"], + "flumotion.com": ["1.1.1.1"]} + self.ss = server_selection.ServerSelector(None, DummySocketDNS(table)) + self.ss.setup() + + d = self.ss.addServer("localhost", 80) + d.addCallback(lambda _: self.ss.getServers()) + d.addCallback(lambda s: setattr(self, "s", s)) + d.addCallback(lambda _: self.s.next()) + d.addCallback(lambda server: self.failUnless( + server.ip in ["127.0.0.1", "10.0.0.1"])) + d.addCallback(lambda _: self.s.next()) + d.addCallback(lambda server: self.failUnless( + server.ip in ["127.0.0.1", "10.0.0.1"])) + + table = {"localhost": ["127.0.0.1"]} + d.addCallback(lambda _: setattr(self.ss._resolver, "socket", + DummySocketDNS(table))) + + d.addCallback(lambda _: self.ss.refreshServers()) + d.addCallback(self._testHas, ["127.0.0.1"]) + + table2 = {"localhost": ["127.0.0.1", "10.0.0.2"]} + d.addCallback(lambda x: setattr(self.ss._resolver, + "socket", DummySocketDNS(table2))) + d.addCallback(lambda _: self.ss.refreshServers()) + d.addCallback(self._testHas, ["127.0.0.1", "10.0.0.2"]) + return d + + def _testTimeout(self): + self.tearDown() + self.ss = server_selection.ServerSelector(None, TimeoutSocketDNS()) + self.ss.setup() + d = self.ss.addServer("localhost", 80) + return d + + def _testHas(self, _, iplist): + s = self.ss.getServers() + for i in s: + if len(iplist) == 0: + break + self.failUnless(i.ip in iplist) + iplist.remove(i.ip) + + self.failUnlessRaises(exceptions.StopIteration, s.next) + self.assertEqual(len(iplist), 0) + + def bp(self, result): + import pdb + print str(result) + pdb.set_trace() + return result + + +class DummySocketDNS: + + def __init__(self, table): + self.table = table + + def gethostbyname_ex(self, hostname): + if hostname not in self.table: + raise Exception("unknown hostname") + + ipaddrlist = self.table[hostname] + return (hostname, None, ipaddrlist) + + +class TimeoutSocketDNS: + + def gethostbyname_ex(self, hostname): + time.sleep(300) + return (None, None, None) + + +def delay(ret, t): + d = defer.Deferred() + reactor.callLater(t, d.callback, ret) + return d diff -Nru flumotion-0.6.1/flumotion/test/test_testclasses.py flumotion-0.9.1/flumotion/test/test_testclasses.py --- flumotion-0.6.1/flumotion/test/test_testclasses.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_testclasses.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_testclasses -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.internet import defer @@ -25,7 +21,7 @@ from flumotion.common import log from flumotion.common import testsuite - +attr = testsuite.attr # an object that subclasses from both Cacheable and RemoteCache @@ -152,6 +148,8 @@ class TestTwoPB(testsuite.TestCase): # test if our classes work over two chained PB connections + slow = True + def setUp(self): self.pb1 = testsuite.TestPB() self.pb2 = testsuite.TestPB() diff -Nru flumotion-0.6.1/flumotion/test/test_twisted_integration.py flumotion-0.9.1/flumotion/test/test_twisted_integration.py --- flumotion-0.6.1/flumotion/test/test_twisted_integration.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_twisted_integration.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -28,6 +24,8 @@ from flumotion.common import testsuite from flumotion.twisted import integration +attr = testsuite.attr + def _call_in_reactor(proc): # Because twisted doesn't have its signal handlers installed until @@ -69,6 +67,8 @@ return p.wait(0) testTransientProcess = _call_in_reactor(testTransientProcess) + @attr('slow') + @_call_in_reactor def testTimeOut(self): p = integration.Process('cat', ('cat', '/dev/random'), self.tempdir) @@ -90,7 +90,6 @@ d.addCallback(cleanup) self.failUnlessFailure(d, error.ProcessTerminated) return d - testTimeOut = _call_in_reactor(testTimeOut) def testKill(self): p = integration.Process('cat', ('cat', '/dev/random'), @@ -154,6 +153,7 @@ plan.kill(process) return plan.execute() + @attr('slow') def testUnexpectedProcessExit(self): plan = integration.Plan(self, 'testUnexpectedProcessExit') processes = [] diff -Nru flumotion-0.6.1/flumotion/test/test_ui_fgtk.py flumotion-0.9.1/flumotion/test/test_ui_fgtk.py --- flumotion-0.6.1/flumotion/test/test_ui_fgtk.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_ui_fgtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_ui_fgtk -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gobject @@ -30,6 +26,7 @@ import os os._exit(0) +attr = testsuite.attr INTERVAL = 100 # in ms @@ -60,6 +57,7 @@ w.set_property('red-threshold', -50.0) self.assertEquals(w.get_property('red-threshold'), -50.0) + @attr('slow') def testWidget(self): w = FVUMeter() window = gtk.Window() diff -Nru flumotion-0.6.1/flumotion/test/test_wizard_models.py flumotion-0.9.1/flumotion/test/test_wizard_models.py --- flumotion-0.6.1/flumotion/test/test_wizard_models.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_wizard_models.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_wizard_models -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import unittest diff -Nru flumotion-0.6.1/flumotion/test/test_wizard.py flumotion-0.9.1/flumotion/test/test_wizard.py --- flumotion-0.6.1/flumotion/test/test_wizard.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_wizard.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_wizard -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from twisted.internet import defer diff -Nru flumotion-0.6.1/flumotion/test/test_wizard_save.py flumotion-0.9.1/flumotion/test/test_wizard_save.py --- flumotion-0.6.1/flumotion/test/test_wizard_save.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/test/test_wizard_save.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_wizard_models -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import unittest @@ -28,9 +24,10 @@ AudioProducer, VideoProducer, AudioEncoder, VideoEncoder, HTTPServer from flumotion.admin.assistant.save import AssistantSaver from flumotion.common import testsuite +from flumotion.common.xmlwriter import XMLWriter from flumotion.configure import configure from flumotion.component.producers.firewire.wizard_gtk import FireWireProducer -from flumotion.scenario.steps.httpstreamersteps import HTTPStreamer +from flumotion.component.consumers.httpstreamer.wizard_gtk import HTTPStreamer from flumotion.component.encoders.vorbis.wizard_gtk import VorbisAudioEncoder from flumotion.component.encoders.theora.wizard_gtk import TheoraVideoEncoder from flumotion.component.producers.videotest.wizard_gtk import \ @@ -45,6 +42,7 @@ def testEmpty(self): writer = ConfigurationWriter('', [], []) testsuite.diffStrings( + XMLWriter.encoding + \ ("\n" "\n"), writer.getXML()) @@ -56,6 +54,7 @@ c.worker = 'worker' writer = ConfigurationWriter('flow', [c], []) testsuite.diffStrings( + XMLWriter.encoding + \ ('\n' ' \n' ' \n' ' \n' ' \n' ' \n' ' \n' ' \n' ' \n' ' \n' ' True\n' ' True\n' - ' 480\n' ' True\n' ' Flumotion\n' - ' 640\n' ' \n' ' \n' ' \n' ' \n' ' \n' ' \n' ' \n' ' True\n' - ' 240\n' ' True\n' ' Flumotion\n' - ' 320\n' ' True\n' ' \n' ' 400000\n' ' 50\n' - ' 1\n' - ' 0\n' + ' 3\n' ' \n' ' \n' ' \n' ' \n' ' \n' ' \n' ' \n' + ' ffdec_dvvideo\n' + ' ffmpeg\n' + ' auto\n' ' 25/2\n' ' 480\n' ' True\n' @@ -735,10 +740,8 @@ ' \n' ' True\n' ' True\n' - ' 480\n' ' True\n' ' Flumotion\n' - ' 640\n' ' \n' ' \n' ' \n' ' \n' ' \n' + ' ffdec_dvvideo\n' + ' ffmpeg\n' + ' auto\n' ' 25/2\n' ' 480\n' ' True\n' @@ -860,6 +867,9 @@ ' worker="video-worker"\n' ' version="%(version)s">\n' ' \n' + ' ffdec_dvvideo\n' + ' ffmpeg\n' + ' auto\n' ' 25/2\n' ' 480\n' ' True\n' @@ -876,10 +886,8 @@ ' \n' ' True\n' ' True\n' - ' 480\n' ' True\n' ' Flumotion\n' - ' 640\n' ' \n' ' \n' ' \n' ' 8800 - + /tmp/ogg-test-theora.access.log diff -Nru flumotion-0.6.1/flumotion/tester/clientfactory.py flumotion-0.9.1/flumotion/tester/clientfactory.py --- flumotion-0.6.1/flumotion/tester/clientfactory.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/tester/clientfactory.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import time @@ -29,7 +25,7 @@ from flumotion.tester import client -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class ClientFactory(log.Loggable): diff -Nru flumotion-0.6.1/flumotion/tester/client.py flumotion-0.9.1/flumotion/tester/client.py --- flumotion-0.6.1/flumotion/tester/client.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/tester/client.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,25 +1,21 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" # enum for result of stopped (STOPPED_SUCCESS, diff -Nru flumotion-0.6.1/flumotion/tester/httpclient.py flumotion-0.9.1/flumotion/tester/httpclient.py --- flumotion-0.6.1/flumotion/tester/httpclient.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/tester/httpclient.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import sys @@ -29,7 +25,7 @@ from flumotion.common import log from flumotion.tester import client -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class HTTPClient(gobject.GObject, log.Loggable): @@ -56,10 +52,6 @@ self._stop_time = 0 # delta to start time self._stop_size = 0 - # if we have it then we can't test when we don't, FIXME - #def verify(self, data): - # raise "verify needs to be handed to me by the application" - def next_read_time(self): """ Calculate the next time to read. @@ -67,12 +59,11 @@ @rtype: float @returns: next read time in seconds since epoch. """ - raise "next_read_time needs to be implemented by a subclass" + raise Exception("next_read_time needs to be implemented by a subclass") def read_size(self): """ calculate and return the size of the current read' - raise "read_size needs to be implemented by a subclass" """ def set_stop_time(self, stop_time): diff -Nru flumotion-0.6.1/flumotion/tester/__init__.py flumotion-0.9.1/flumotion/tester/__init__.py --- flumotion-0.6.1/flumotion/tester/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/tester/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/tester/Makefile.in flumotion-0.9.1/flumotion/tester/Makefile.in --- flumotion-0.6.1/flumotion/tester/Makefile.in 2009-09-09 11:37:58.000000000 +0000 +++ flumotion-0.9.1/flumotion/tester/Makefile.in 2011-09-11 08:09:24.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -101,6 +100,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -110,18 +110,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -169,6 +162,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -186,16 +180,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -203,7 +199,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -218,6 +213,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -250,7 +246,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/twisted/checkers.py flumotion-0.9.1/flumotion/twisted/checkers.py --- flumotion-0.6.1/flumotion/twisted/checkers.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/checkers.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_checkers -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -31,7 +27,7 @@ from flumotion.common import log, errors from flumotion.twisted import credentials -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" # FIXME: give the manager's bouncer's checker to the flexcredchecker, diff -Nru flumotion-0.6.1/flumotion/twisted/compat.py flumotion-0.9.1/flumotion/twisted/compat.py --- flumotion-0.6.1/flumotion/twisted/compat.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/compat.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,36 +1,42 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_compat -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ Flumotion Twisted compatibility assistance -All functions in this package are deprecated; do not use them. They no longer -provide any backwards compatibility. """ import warnings import zope.interface as zi -__version__ = "$Rev: 7307 $" +__version__ = "$Rev$" + +from twisted.internet import reactor + +try: + reactor.seconds # Introduced in Twisted 8.0.0 +except AttributeError: + from twisted.python import runtime + reactor.seconds = runtime.seconds + + +# The following functions are deprecated; do not use them. They no longer +# provide any backwards compatibility. def implementsInterface(object, interface): diff -Nru flumotion-0.6.1/flumotion/twisted/credentials.py flumotion-0.9.1/flumotion/twisted/credentials.py --- flumotion-0.6.1/flumotion/twisted/credentials.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/credentials.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_credentials -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -34,7 +30,7 @@ except ImportError: from flumotion.extern import unixcrypt as crypt -__version__ = "$Rev: 7990 $" +__version__ = "$Rev$" class Username: diff -Nru flumotion-0.6.1/flumotion/twisted/defer.py flumotion-0.9.1/flumotion/twisted/defer.py --- flumotion-0.6.1/flumotion/twisted/defer.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/defer.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_defer -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import random @@ -27,7 +23,7 @@ # FIXME: this is for HandledException - maybe it should move here instead ? from flumotion.common import errors -__version__ = "$Rev: 7901 $" +__version__ = "$Rev$" # See flumotion.test.test_defer for examples @@ -256,8 +252,8 @@ def _failed(self, failure): if self._running: - next = self._nextDelay() - self._callId = reactor.callLater(next, self._retry) + nextDelay = self._nextDelay() + self._callId = reactor.callLater(nextDelay, self._retry) else: self._masterD.errback(failure) self._masterD = None diff -Nru flumotion-0.6.1/flumotion/twisted/fdserver.py flumotion-0.9.1/flumotion/twisted/fdserver.py --- flumotion-0.6.1/flumotion/twisted/fdserver.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/fdserver.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import log @@ -31,7 +27,7 @@ import struct import time -__version__ = "$Rev: 7982 $" +__version__ = "$Rev$" # Heavily based on @@ -42,8 +38,8 @@ # Since we're doing this over a stream socket, our file descriptor messages # aren't guaranteed to be received alone; they could arrive along with some # unrelated data. -# So, we prefix the message with a 16 byte magic signature, and a length, -# and if we receive file descriptors decode based on this. +# So, we prefix the message with a 16 byte randomly generated magic signature, +# and a length, and if we receive file descriptors decode based on this. # # map() instead of a string to workaround gettext encoding problems. # diff -Nru flumotion-0.6.1/flumotion/twisted/flavors.py flumotion-0.9.1/flumotion/twisted/flavors.py --- flumotion-0.6.1/flumotion/twisted/flavors.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/flavors.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_flavors -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -30,7 +26,7 @@ from zope.interface import Interface from flumotion.common import log -__version__ = "$Rev: 7740 $" +__version__ = "$Rev$" ### Generice Cacheable/RemoteCache for state objects @@ -76,6 +72,31 @@ """ +class IStateCacheableListener(Interface): + """ + I am an interface for objects that want to listen to changes on + cacheable states + """ + + def observerAppend(self, observer, num): + """ + @type observer: L{twisted.spread.flavors.RemoteCacheObserver} + @param observer: reference to the peer's L{RemoteCache} + that was added + @type num: int + @param num: number of observers present + """ + + def observerRemove(self, observer, num): + """ + @type observer: L{twisted.spread.flavors.RemoteCacheObserver} + @param observer: reference to the peer's L{RemoteCache} + that was removed + @type num: int + @param num: number of observers remaining + """ + + class StateCacheable(pb.Cacheable): """ I am a cacheable state object. @@ -86,8 +107,12 @@ def __init__(self): self._observers = [] + self._hooks = [] self._dict = {} + def __getitem__(self, key): + return self.get(key) + # our methods def addKey(self, key, value=None): @@ -217,10 +242,41 @@ def getStateToCacheAndObserveFor(self, perspective, observer): self._observers.append(observer) + for hook in self._hooks: + hook.observerAppend(observer, len(self._observers)) return self._dict def stoppedObserving(self, perspective, observer): self._observers.remove(observer) + for hook in self._hooks: + hook.observerRemove(observer, len(self._observers)) + + def addHook(self, hook): + """ + A helper function that adds an object that would like to get + informed by StateCacheable when observers has been added or + removed. + + @param hook: an object who would like to receive state events + @type hook: object that implements + L{flumotion.twisted.flavors.IStateCacheableListener} + """ + if hook in self._hooks: + raise ValueError( + "%r is already a hook of %r" % (hook, self)) + self._hooks.append(hook) + + def removeHook(self, hook): + """ + Remove the object that listens to StateCacheable observer events + + @param hook: the object who would like to unsubscribe to state + events + @type hook: object that implements + L{flumotion.twisted.flavors.IStateCacheableListener} + """ + self._hooks.remove(hook) + # At some point, a StateRemoteCache will become invalid. The normal way # would be losing the connection to the RemoteCacheable, although @@ -247,6 +303,9 @@ # no constructor # pb.RemoteCache.__init__(self) + def __getitem__(self, key): + return self.get(key) + # our methods def hasKey(self, key): @@ -280,7 +339,7 @@ # Use twisted.python.util.OrderedDict instead self._listeners = {} - #F0.8: remove set=None and move set_=None there + #F0.10: remove set=None and move set_=None there def addListener(self, listener, set=None, append=None, remove=None, setitem=None, delitem=None, invalidate=None, set_=None): @@ -288,7 +347,7 @@ Adds a listener to the remote cache. The caller will be notified of state events via the functions - given as the 'set', 'append', and 'remove', 'setitem', and + given as the 'set_', 'append', and 'remove', 'setitem', and 'delitem' keyword arguments. Always call this method using keyword arguments for the functions; @@ -317,7 +376,7 @@ invalidated. @type invalidate: procedure(object) -> None """ - # F0.8: remove set + # F0.10: remove set if set: import warnings warnings.warn('Please use the set_ kwarg instead', @@ -325,15 +384,7 @@ set_ = set if not (set_ or append or remove or setitem or delitem or invalidate): - # FIXME: remove this behavior in F0.6 - import sys - log.safeprintf(sys.stderr, - "Warning: Use of deprecated %r.addListener(%r)" - " without explicit event handlers\n", self, - listener) - set_ = listener.stateSet - append = listener.stateAppend - remove = listener.stateRemove + raise ValueError("At least one event handler has to be specified") self._ensureListeners() if listener in self._listeners: diff -Nru flumotion-0.6.1/flumotion/twisted/__init__.py flumotion-0.9.1/flumotion/twisted/__init__.py --- flumotion-0.6.1/flumotion/twisted/__init__.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ Twisted-like base code written for Flumotion """ -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/twisted/integration.py flumotion-0.9.1/flumotion/twisted/integration.py --- flumotion-0.6.1/flumotion/twisted/integration.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/integration.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -78,12 +74,14 @@ import os import signal +import tempfile -from twisted.python import failure from twisted.internet import reactor, protocol, defer +from twisted.internet import error as ierror from flumotion.common import log as flog +from twisted.internet.defer import failure -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" # Twisted's reactor.iterate() is defined like this: @@ -221,6 +219,32 @@ self.exitDeferred.callback(status.value.exitCode) +class ThreadProtocol(object): + + def __init__(self): + self.exitDeferred = defer.Deferred() + self.timedOut = False + + def getDeferred(self): + return self.exitDeferred + + def timeout(self, process, status): + info('forcing timeout for process protocol %r', self) + self.timedOut = True + self.exitDeferred.errback(TimeoutException(process, status)) + + def processEnded(self, status): + info('process ended with status %r, exit code %r', + status, status.value.exitCode) + if self.timedOut: + warning('already timed out??') + print 'already timed out quoi?' + else: + info('process ended with status %r, exit code %r', + status, status.value.exitCode) + self.exitDeferred.callback(status.value.exitCode) + + class Process: NOT_STARTED, STARTED, STOPPED = 'NOT-STARTED', 'STARTED', 'STOPPED' @@ -316,6 +340,77 @@ return '' % (self.name, self.state) +class ThreadedMethod: + NOT_STARTED, STARTED, STOPPED = 'NOT-STARTED', 'STARTED', 'STOPPED' + + def __init__(self, name, method, argv, testDir): + self.name = name + self.argv = argv + self.testDir = testDir + + self.pid = None + self.method = method + self.protocol = None + self.state = self.NOT_STARTED + self._timeoutDC = None + + log('created threaded method object %r', self) + + def method_wrapper(self): + self.method(self.argv) + info('process %r has stopped', self) + return self.protocol.processEnded( + failure.Failure(ierror.ProcessDone(0))) + + def start(self): + assert self.state == self.NOT_STARTED + info('spawning thread %r, argv=%r', self, self.argv) + self.protocol = ProcessProtocol() + reactor.callFromThread(self.method_wrapper) + + self.state = self.STARTED + + def got_exit(res): + self.state = self.STOPPED + info('process %r has stopped', self) + return res + self.protocol.getDeferred().addCallback(got_exit) + + def kill(self, sig=signal.SIGTERM): + assert self.state == self.STARTED + self.state = self.STOPPED + info('killing process %r, signal %d', self, sig) + + def wait(self, status, timeout=20): + assert self.state != self.NOT_STARTED + info('waiting for thread %r to exit', self) + d = self.protocol.getDeferred() + + def got_exit(res): + debug('process %r exited with status %r', self, res) + if res != status: + warning('expected exit code %r for process %r, but got %r', + status, self, res) + raise UnexpectedExitCodeException(self, status, res) + d.addCallback(got_exit) + if self.state == self.STARTED: + self._timeoutDC = reactor.callLater(timeout, + self.protocol.timeout, + self, + status) + + def cancel_timeout(res): + debug('cancelling timeout for %r', self) + if self._timeoutDC.active(): + self._timeoutDC.cancel() + return res + d.addCallbacks(cancel_timeout, cancel_timeout) + return d + + def __repr__(self): + return '' % (self.name, self.state) + + class PlanExecutor: # both the vm and its ops @@ -404,7 +499,8 @@ self.name = testName self.testCaseName = testCase.__class__.__name__ self.processes = {} - self.outputDir = self._makeOutputDir(os.getcwd()) + self.testDir = self._makeTestDir() + self.outputDir = self._makeOutputDir(self.testDir) # put your boots on monterey jacks, cause this gravy just made a # virtual machine whose instructions are python methods @@ -412,12 +508,11 @@ self.ops = [] self.timeout = 20 + def _makeTestDir(self): + testDir = tempfile.mkdtemp(prefix="test_integration") + return testDir + def _makeOutputDir(self, testDir): - # ensure that testDir exists - try: - os.mkdir(testDir) - except OSError: - pass tail = '%s-%s' % (self.testCaseName, self.name) outputDir = os.path.join(testDir, tail) os.mkdir(outputDir) @@ -430,6 +525,8 @@ for name in dirs: os.rmdir(os.path.join(root, name)) os.rmdir(self.outputDir) + os.rmdir(self.testDir) + self.testDir = None self.outputDir = None def _allocProcess(self, args): @@ -443,6 +540,17 @@ self.processes[name] = process return process + def _allocThread(self, args): + method = args[0] + name = method.__name__ + i = 0 + while name in self.processes: + i += 1 + name = '%s-%d' % (name, i) + process = ThreadedMethod(name, method, args[1:], self.outputDir) + self.processes[name] = process + return process + def _appendOp(self, *args): self.ops.append(args) @@ -454,6 +562,12 @@ process, = self.spawnPar(allArgs) return process + def spawnThread(self, method, *args): + self._appendOp(self.vm.checkExits, ()) + thread = self._allocThread((method, ) + args) + self._appendOp(self.vm.spawn, thread) + return thread + def spawnPar(self, *argvs): processes = [] self._appendOp(self.vm.checkExits, ()) diff -Nru flumotion-0.6.1/flumotion/twisted/Makefile.in flumotion-0.9.1/flumotion/twisted/Makefile.in --- flumotion-0.6.1/flumotion/twisted/Makefile.in 2009-09-09 11:37:58.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/Makefile.in 2011-09-11 08:09:24.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -101,6 +100,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -110,18 +110,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -169,6 +162,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -186,16 +180,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -203,7 +199,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -218,6 +213,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -250,7 +246,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff -Nru flumotion-0.6.1/flumotion/twisted/pb.py flumotion-0.9.1/flumotion/twisted/pb.py --- flumotion-0.6.1/flumotion/twisted/pb.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/pb.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_pb -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -25,25 +21,22 @@ Inspired by L{twisted.spread.pb} """ -import time - -from twisted.cred import checkers, credentials from twisted.cred.portal import IRealm, Portal -from twisted.internet import protocol, defer, reactor +from twisted.internet import protocol, defer from twisted.internet import error as terror -from twisted.python import log, reflect, failure +from twisted.python import log, reflect from twisted.spread import pb, flavors from twisted.spread.pb import PBClientFactory from zope.interface import implements from flumotion.configure import configure -from flumotion.common import keycards, interfaces, common, errors +from flumotion.common import keycards, errors from flumotion.common import log as flog from flumotion.common.netutils import addressGetHost from flumotion.twisted import reflect as freflect -from flumotion.twisted import credentials as fcredentials +from flumotion.twisted.compat import reactor -__version__ = "$Rev: 7942 $" +__version__ = "$Rev$" # TODO: @@ -474,6 +467,11 @@ return keycards.KeycardUACPP(self.username, self.password, self.address) + def issue_KeycardGeneric(self): + keycard = keycards.KeycardGeneric() + keycard.username = self.username + keycard.address = self.address + return keycard # challenge types def issue_KeycardUACPCC(self): @@ -576,11 +574,11 @@ # all this malarkey is to avoid actually interpolating variables # if it is not needed startArgs = [self.remoteLogName, debugClass, message] - format, debugArgs = flog.getFormatArgs( + formatString, debugArgs = flog.getFormatArgs( '%s --> %s: remote_%s(', startArgs, ')', (), args, kwargs) # log going into the method - logKwArgs = self.doLog(level, method, format, *debugArgs) + logKwArgs = self.doLog(level, method, formatString, *debugArgs) # invoke the remote_ method d = defer.maybeDeferred(method, *args, **kwargs) @@ -588,17 +586,17 @@ # log coming out of the method def callback(result): - format, debugArgs = flog.getFormatArgs( + formatString, debugArgs = flog.getFormatArgs( '%s <-- %s: remote_%s(', startArgs, '): %r', (flog.ellipsize(result), ), args, kwargs) - self.doLog(level, -1, format, *debugArgs, **logKwArgs) + self.doLog(level, -1, formatString, *debugArgs, **logKwArgs) return result def errback(failure): - format, debugArgs = flog.getFormatArgs( + formatString, debugArgs = flog.getFormatArgs( '%s <-- %s: remote_%s(', startArgs, '): failure %r', (failure, ), args, kwargs) - self.doLog(level, -1, format, *debugArgs, **logKwArgs) + self.doLog(level, -1, formatString, *debugArgs, **logKwArgs) return failure d.addCallbacks(callback, errback) @@ -639,11 +637,11 @@ level = flog.LOG debugClass = self.logCategory.upper() startArgs = [self.remoteLogName, debugClass, message] - format, debugArgs = flog.getFormatArgs( + formatString, debugArgs = flog.getFormatArgs( '%s --> %s: perspective_%s(', startArgs, ')', (), args, kwargs) # log going into the method - logKwArgs = self.doLog(level, method, format, *debugArgs) + logKwArgs = self.doLog(level, method, formatString, *debugArgs) # invoke the perspective_ method d = defer.maybeDeferred(method, *args, **kwargs) @@ -651,17 +649,17 @@ # log coming out of the method def callback(result): - format, debugArgs = flog.getFormatArgs( + formatString, debugArgs = flog.getFormatArgs( '%s <-- %s: perspective_%s(', startArgs, '): %r', (flog.ellipsize(result), ), args, kwargs) - self.doLog(level, -1, format, *debugArgs, **logKwArgs) + self.doLog(level, -1, formatString, *debugArgs, **logKwArgs) return result def errback(failure): - format, debugArgs = flog.getFormatArgs( + formatString, debugArgs = flog.getFormatArgs( '%s <-- %s: perspective_%s(', startArgs, '): failure %r', (failure, ), args, kwargs) - self.doLog(level, -1, format, *debugArgs, **logKwArgs) + self.doLog(level, -1, formatString, *debugArgs, **logKwArgs) return failure d.addCallbacks(callback, errback) @@ -712,10 +710,10 @@ if level is not None: debugClass = str(self.__class__).split(".")[-1].upper() startArgs = [self.remoteLogName, debugClass, name] - format, debugArgs = flog.getFormatArgs( + formatString, debugArgs = flog.getFormatArgs( '%s --> %s: callRemote(%s, ', startArgs, ')', (), args, kwargs) - logKwArgs = self.doLog(level, stackDepth - 1, format, + logKwArgs = self.doLog(level, stackDepth - 1, formatString, *debugArgs) if not self.mind: @@ -724,17 +722,17 @@ return defer.fail(errors.NotConnectedError()) def callback(result): - format, debugArgs = flog.getFormatArgs( + formatString, debugArgs = flog.getFormatArgs( '%s <-- %s: callRemote(%s, ', startArgs, '): %r', (flog.ellipsize(result), ), args, kwargs) - self.doLog(level, -1, format, *debugArgs, **logKwArgs) + self.doLog(level, -1, formatString, *debugArgs, **logKwArgs) return result def errback(failure): - format, debugArgs = flog.getFormatArgs( + formatString, debugArgs = flog.getFormatArgs( '%s <-- %s: callRemote(%s, ', startArgs, '): %r', (failure, ), args, kwargs) - self.doLog(level, -1, format, *debugArgs, **logKwArgs) + self.doLog(level, -1, formatString, *debugArgs, **logKwArgs) return failure d = self.mind.callRemote(name, *args, **kwargs) @@ -765,24 +763,44 @@ _pingCheckInterval = (configure.heartbeatInterval * configure.pingTimeoutMultiplier) + def __init__(self, avatarId, clock=reactor): + self._clock = clock + Avatar.__init__(self, avatarId) + + def perspectiveMessageReceivedUnserialised(self, broker, message, + args, kwargs): + self._lastPing = self._clock.seconds() + return Avatar.perspectiveMessageReceivedUnserialised( + self, broker, message, args, kwargs) + def perspective_ping(self): - self._lastPing = time.time() return defer.succeed(True) + def mindCallRemoteLogging(self, level, stackDepth, name, *args, + **kwargs): + d = Avatar.mindCallRemoteLogging(self, level, stackDepth, name, *args, + **kwargs) + + def cb(result): + self._lastPing = self._clock.seconds() + return result + d.addCallback(cb) + return d + def startPingChecking(self, disconnect): - self._lastPing = time.time() + self._lastPing = self._clock.seconds() self._pingCheckDisconnect = disconnect self._pingCheck() def _pingCheck(self): self._pingCheckDC = None - if time.time() - self._lastPing > self._pingCheckInterval: + if self._clock.seconds() - self._lastPing > self._pingCheckInterval: self.info('no ping in %f seconds, closing connection', self._pingCheckInterval) self._pingCheckDisconnect() else: - self._pingCheckDC = reactor.callLater(self._pingCheckInterval, - self._pingCheck) + self._pingCheckDC = self._clock.callLater(self._pingCheckInterval, + self._pingCheck) def stopPingChecking(self): if self._pingCheckDC: diff -Nru flumotion-0.6.1/flumotion/twisted/portal.py flumotion-0.9.1/flumotion/twisted/portal.py --- flumotion-0.6.1/flumotion/twisted/portal.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/portal.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -26,13 +22,13 @@ from twisted.spread import flavors from twisted.internet import defer from twisted.cred.portal import Portal -from twisted.python import failure, reflect +from twisted.python import reflect from twisted.python.components import registerAdapter from flumotion.common import keycards, log, interfaces, errors from flumotion.twisted.pb import _FPortalRoot -__version__ = "$Rev: 7161 $" +__version__ = "$Rev$" class BouncerPortal(log.Loggable): diff -Nru flumotion-0.6.1/flumotion/twisted/reflect.py flumotion-0.9.1/flumotion/twisted/reflect.py --- flumotion-0.6.1/flumotion/twisted/reflect.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/reflect.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,37 +1,29 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ functions based on twisted.python.reflect """ -# FIXME: clean up unused imports -from twisted.cred import checkers, credentials +# FIXME: pychecker: clean up unused imports from twisted.cred.portal import IRealm, Portal -from twisted.internet import protocol -from twisted.python import log, reflect -from twisted.spread import pb, flavors from twisted.spread.pb import PBClientFactory -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" ### stolen from twisted.python.reflect and changed @@ -57,7 +49,10 @@ # if the ImportError happened in the module being imported, # this is a failure that should be handed to our caller. shortname = trialname.split('.')[-1] - r = str(sys.exc_info()[1]) + # if we're on python2.7 the module is wrapped in single quotation + # marks thus broking this method that relies on the message ending + # with the name that failed. + r = str(sys.exc_info()[1]).strip("'") if not (r.startswith('No module named') and r.endswith(shortname)): raise @@ -71,3 +66,9 @@ obj = getattr(obj, n) return obj + +# Use the method that comes with twisted if we're running on 8.0 or higher. +# FIXME: Remove this module when we can depend on Twisted 8.0 +from twisted import version +if (version.major, version.minor, version.micro) >= (8, 0, 0): + from twisted.python.reflect import namedAny diff -Nru flumotion-0.6.1/flumotion/twisted/rtsp.py flumotion-0.9.1/flumotion/twisted/rtsp.py --- flumotion-0.6.1/flumotion/twisted/rtsp.py 2009-09-09 11:37:21.000000000 +0000 +++ flumotion-0.9.1/flumotion/twisted/rtsp.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_rtsp -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -42,7 +38,7 @@ from flumotion.common import log as flog -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" SERVER_PROTOCOL = "RTSP/1.0" # I can be overridden to add the version diff -Nru flumotion-0.6.1/flumotion/ui/fgtk.py flumotion-0.9.1/flumotion/ui/fgtk.py --- flumotion-0.6.1/flumotion/ui/fgtk.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/fgtk.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_ui_fgtk -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -30,7 +26,7 @@ from kiwi.ui.widgets.radiobutton import ProxyRadioButton from kiwi.ui.widgets.spinbutton import ProxySpinButton -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class FProxyComboBox(ProxyComboBox): diff -Nru flumotion-0.6.1/flumotion/ui/fileselector.py flumotion-0.9.1/flumotion/ui/fileselector.py --- flumotion-0.6.1/flumotion/ui/fileselector.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/fileselector.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """File Selector widget and dialog @@ -37,7 +33,7 @@ from zope.interface import implements from flumotion.admin.gtk.dialogs import ErrorDialog -from flumotion.common.errors import AccessDeniedError +from flumotion.common.errors import AccessDeniedError, NotDirectoryError from flumotion.common.interfaces import IDirectory, IFile from flumotion.common.vfs import listDirectory, registerVFSJelly @@ -122,12 +118,19 @@ def _listingDoneCallback(self, vfsFile, path): d = vfsFile.getFiles() d.addCallback(self._gotFilesCallback, path) + d.addErrback(self._notDirectoryErrback, vfsFile.getPath()) d.addErrback(self._accessDeniedErrback, vfsFile.getPath()) def _accessDeniedErrback(self, failure, path): failure.trap(AccessDeniedError) self.showErrorMessage(failure, self._parent) + def _notDirectoryErrback(self, failure, path): + failure.trap(NotDirectoryError) + dialog = ErrorDialog(_("File is not a directory."), + self._parent, close_on_response=True) + dialog.show() + def _gotFilesCallback(self, vfsFiles, path): vfsFiles.sort(cmp=lambda a, b: cmp(a.filename, b.filename)) self._populateList(vfsFiles) @@ -159,6 +162,7 @@ self._workerName, 'listDirectory', path) d.addCallback(self._listingDoneCallback, path) + d.addErrback(self._notDirectoryErrback, path) d.addErrback(self._accessDeniedErrback, path) return d diff -Nru flumotion-0.6.1/flumotion/ui/fvumeter.py flumotion-0.9.1/flumotion/ui/fvumeter.py --- flumotion-0.6.1/flumotion/ui/fvumeter.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/fvumeter.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,29 +1,25 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_ui_fgtk -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gobject import gtk from gtk import gdk -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" # this VUMeter respects IEC standard @@ -65,6 +61,7 @@ 0, -1.0, gobject.PARAM_READWRITE)} + black_gc = None green_gc = None orange_gc = None red_gc = None @@ -150,10 +147,12 @@ event_mask=self.get_events() | gdk.EXPOSURE_MASK) colormap = gtk.gdk.colormap_get_system() + black = colormap.alloc_color(0, 0, 0) green = colormap.alloc_color(0, 65535, 0) orange = colormap.alloc_color(65535, 32768, 0) red = colormap.alloc_color(65535, 0, 0) yellow = colormap.alloc_color(65535, 65535, 0) + self.black_gc = gdk.GC(self.window, foreground=black) self.green_gc = gdk.GC(self.window, foreground=green) self.orange_gc = gdk.GC(self.window, foreground=orange) self.red_gc = gdk.GC(self.window, foreground=red) @@ -169,7 +168,7 @@ x, y, w, h = self.allocation vumeter_width = w - (self.leftborder + self.rightborder) vumeter_height = h - (self.topborder + self.bottomborder) - self.window.draw_rectangle(self.style.black_gc, True, + self.window.draw_rectangle(self.black_gc, True, self.leftborder, self.topborder, vumeter_width, vumeter_height) @@ -214,7 +213,7 @@ for level, scale in scalers: # tick mark, 6 pixels high # we cheat again here by putting the 0 at the first pixel - self.window.draw_line(self.style.black_gc, + self.window.draw_line(self.black_gc, self.leftborder + int(scale * (vumeter_width - 1)), h - self.bottomborder, self.leftborder + int(scale * (vumeter_width - 1)), @@ -222,7 +221,7 @@ # tick label layout = self.create_pango_layout(level) layout_width, layout_height = layout.get_pixel_size() - self.window.draw_layout(self.style.black_gc, + self.window.draw_layout(self.black_gc, self.leftborder + int(scale * vumeter_width) - int(layout_width / 2), h - self.bottomborder + 7, layout) @@ -230,7 +229,7 @@ # draw the peak level to the right layout = self.create_pango_layout("%.2fdB" % self.peaklevel) layout_width, layout_height = layout.get_pixel_size() - self.window.draw_layout(self.style.black_gc, + self.window.draw_layout(self.black_gc, self.leftborder + vumeter_width + 5, self.topborder + int(vumeter_height / 2 - layout_height / 2), layout) diff -Nru flumotion-0.6.1/flumotion/ui/glade.py flumotion-0.9.1/flumotion/ui/glade.py --- flumotion-0.6.1/flumotion/ui/glade.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/glade.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,36 +1,34 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with th -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gtk from gtk import glade import gobject + from kiwi.environ import environ from kiwi.ui.delegates import GladeDelegate + from twisted.python.reflect import namedAny from flumotion.common.pygobject import gsignal from flumotion.configure import configure from flumotion.ui.kiwipatches import install_patches -__version__ = "$Rev: 7570 $" +__version__ = "$Rev$" # FIXME: Move to kiwi initialization environ.add_resource('glade', configure.gladedir) diff -Nru flumotion-0.6.1/flumotion/ui/icons.py flumotion-0.9.1/flumotion/ui/icons.py --- flumotion-0.6.1/flumotion/ui/icons.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/icons.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -26,7 +22,7 @@ from flumotion.configure import configure __all__ = ['register_icons'] -__version__ = "$Rev: 7571 $" +__version__ = "$Rev$" def _register_stock_icons(names): diff -Nru flumotion-0.6.1/flumotion/ui/__init__.py flumotion-0.9.1/flumotion/ui/__init__.py --- flumotion-0.6.1/flumotion/ui/__init__.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/ui/kiwipatches.py flumotion-0.9.1/flumotion/ui/kiwipatches.py --- flumotion-0.6.1/flumotion/ui/kiwipatches.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/kiwipatches.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with th -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -27,7 +23,7 @@ from kiwi.ui import views from kiwi.ui.widgets.entry import ProxyEntry -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" # Kiwi monkey patch, allows us to specify a diff -Nru flumotion-0.6.1/flumotion/ui/linkwidget.py flumotion-0.9.1/flumotion/ui/linkwidget.py --- flumotion-0.6.1/flumotion/ui/linkwidget.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/linkwidget.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,29 +1,25 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """A widget which can used open a link""" import gtk -__version__ = "$Rev: 8012 $" +__version__ = "$Rev$" class LinkWidgetOld(gtk.EventBox): @@ -114,7 +110,7 @@ class LinkWidget(gtk.LinkButton): def __init__(self, uri): - gtk.LinkButton.__init__(self, uri) + gtk.LinkButton.__init__(self, uri, label=uri) self.set_property('can-focus', False) self._callback = None gtk.link_button_set_uri_hook(self.on_link_button_clicked) @@ -127,3 +123,6 @@ self._callback(uri) else: LinkWidget = LinkWidgetOld + +if not hasattr(LinkWidget, 'set_tooltip_text'): + LinkWidget.set_tooltip_text = lambda self, text: None diff -Nru flumotion-0.6.1/flumotion/ui/Makefile.am flumotion-0.9.1/flumotion/ui/Makefile.am --- flumotion-0.6.1/flumotion/ui/Makefile.am 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -10,6 +10,7 @@ glade.py \ kiwipatches.py \ linkwidget.py \ + plugarea.py \ icons.py \ simplewizard.py \ trayicon.py \ diff -Nru flumotion-0.6.1/flumotion/ui/Makefile.in flumotion-0.9.1/flumotion/ui/Makefile.in --- flumotion-0.6.1/flumotion/ui/Makefile.in 2009-09-09 11:37:58.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/Makefile.in 2011-09-11 08:09:24.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -101,6 +100,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -110,18 +110,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -169,6 +162,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -186,16 +180,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -203,7 +199,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -218,6 +213,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -250,7 +246,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -279,6 +274,7 @@ glade.py \ kiwipatches.py \ linkwidget.py \ + plugarea.py \ icons.py \ simplewizard.py \ trayicon.py \ diff -Nru flumotion-0.6.1/flumotion/ui/plugarea.py flumotion-0.9.1/flumotion/ui/plugarea.py --- flumotion-0.6.1/flumotion/ui/plugarea.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/plugarea.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,116 @@ +# -*- Mode: Python; test-case-name: flumotion.test.test_wizard -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gettext +import gobject +import gtk + +from flumotion.common import log +from flumotion.ui.fgtk import ProxyWidgetMapping +from flumotion.ui.glade import GladeWidget + +_ = gettext.gettext + +__version__ = "$Rev$" + + +class WizardPlugLine(GladeWidget, log.Loggable): + """ + """ + inactiveMessage = _('Plugin should be installed to enable this option') + logCategory = 'wizard' + gladeTypedict = ProxyWidgetMapping() + + def __init__(self, wizard, model, description): + if self.gladeFile: + GladeWidget.__init__(self) + else: + gtk.VBox.__init__(self) + self._cb = gtk.CheckButton() + + label = gtk.Label(description) + label.set_use_underline(True) + + self._cb.add(label) + self.pack_start(self._cb) + self._cb.connect('toggled', + self.on_checkbutton_toggled) + + self.reorder_child(self._cb, 0) + self._cb.show_all() + + self.wizard = wizard + self.model = model + + # Public API + + def setActive(self, active): + self._cb.set_active(active) + + def getActive(self): + """Aks wether the plug line is active or not. + """ + return self._cb.get_active() + + def plugActiveChanged(self, active): + """Called when the checkbutton state changes. + Has to be overwritten by subclasses as for beeing aware of when the + state changes. + """ + raise NotImplementedError() + + def setEnabled(self, enabled): + """Called to set the line's sensitiveness and show/hide the related + information message in its tooltip + """ + self.setActive(enabled) + self._cb.set_sensitive(enabled) + self._cb.set_tooltip_text(enabled and '' or self.inactiveMessage) + + # Callbacks + + def on_checkbutton_toggled(self, cb): + self.plugActiveChanged(cb.get_active()) + +gobject.type_register(WizardPlugLine) + + +class WizardPlugArea(gtk.VBox): + """I am plugin area representing all available plugins. I keep track + of the plugins and their internal state. You can ask me to add new plugins + or get the internal models of the plugins. + """ + + def __init__(self): + gtk.VBox.__init__(self, spacing=6) + self._lines = [] + + # Public + + def addLine(self, line): + self._lines.append(line) + self.pack_start(line, False, False) + line.show() + + def clean(self): + self.foreach(self.remove) + self._lines = [] + + def getEnabledLines(self): + for line in self._lines: + if line.getActive(): + yield line diff -Nru flumotion-0.6.1/flumotion/ui/simplewizard.py flumotion-0.9.1/flumotion/ui/simplewizard.py --- flumotion-0.6.1/flumotion/ui/simplewizard.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/simplewizard.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_greeter -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with th -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -30,7 +26,7 @@ from flumotion.common.pygobject import gsignal from flumotion.ui.glade import GladeWidget, GladeWindow -__version__ = "$Rev: 7268 $" +__version__ = "$Rev$" # This file implements a generic wizard framework suitable for processes with diff -Nru flumotion-0.6.1/flumotion/ui/trayicon.py flumotion-0.9.1/flumotion/ui/trayicon.py --- flumotion-0.6.1/flumotion/ui/trayicon.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/trayicon.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -36,7 +32,7 @@ from flumotion.configure import configure from flumotion.twisted import flavors -__version__ = "$Rev: 7620 $" +__version__ = "$Rev$" _DEFAULT_ICON = os.path.join(configure.imagedir, 'flumotion.png') @@ -118,29 +114,9 @@ """ Create the icon """ - if hasattr(gtk, 'StatusIcon'): - icon = gtk.StatusIcon() - icon.connect('popup-menu', self._on_trayicon__popup_menu) - icon.connect('activate', self._on_trayicon__activated) - else: - try: - from flumotion.extern import pytrayicon - icon = pytrayicon.TrayIcon("Flumotion") - except ImportError: - self.debug('No pytrayicon module found,' - ' no trayicon will be shown') - return - except AttributeError: - self.debug('No pytrayicon installed,' - 'no trayicon will be shown') - return - - event_box = gtk.EventBox() - self._tray_image = gtk.Image() - event_box.add(self._tray_image) - event_box.connect('button-press-event', self._on_trayicon__clicked) - icon.add(event_box) - icon.show_all() + icon = gtk.StatusIcon() + icon.connect('popup-menu', self._on_trayicon__popup_menu) + icon.connect('activate', self._on_trayicon__activated) return icon @@ -148,12 +124,7 @@ if not self._tray_icon: return - if self._tray_image: - pixbuf = gtk.gdk.pixbuf_new_from_file(filename) - scaled_buf = pixbuf.scale_simple(24, 24, gtk.gdk.INTERP_BILINEAR) - self._tray_image.set_from_pixbuf(scaled_buf) - else: - self._tray_icon.set_from_file(filename) + self._tray_icon.set_from_file(filename) # FIXME: looks like cutnpaste from a similar function, squash duplication @@ -186,26 +157,15 @@ # Callbacks - def _on_trayicon__clicked(self, widget, event): - """ - @param widget: the trayicon eventbox that was clicked - @param event: the event object - """ - # left click triggers window visibility - if event.button == 1: - self._on_trayicon__activated() - elif event.button == 3: - self._on_trayicon__popup_menu() - def _on_trayicon__popup_menu(self, *p): """ Called when we click the tray icon with the second mouse's button. Shows a popup menu with the quit option. """ menu = gtk.Menu() - quit = gtk.ImageMenuItem(gtk.STOCK_QUIT) - quit.connect('activate', self._on_quit__activate) - menu.add(quit) + quitButton = gtk.ImageMenuItem(gtk.STOCK_QUIT) + quitButton.connect('activate', self._on_quit__activate) + menu.add(quitButton) menu.popup(None, None, None, 3, gtk.get_current_event_time()) menu.show_all() diff -Nru flumotion-0.6.1/flumotion/ui/wizard.py flumotion-0.9.1/flumotion/ui/wizard.py --- flumotion-0.6.1/flumotion/ui/wizard.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/ui/wizard.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_wizard -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gettext @@ -25,18 +21,23 @@ import gobject import gtk -from twisted.internet.defer import Deferred + +from twisted.internet import defer from twisted.python import util -from flumotion.admin.gtk.dialogs import exceptionHandler from flumotion.configure import configure -from flumotion.common import log, messages +from flumotion.common import log + +# registers serializables +from flumotion.common import messages + +from flumotion.admin.gtk.dialogs import exceptionHandler from flumotion.common.i18n import gettexter from flumotion.common.pygobject import gsignal from flumotion.ui.fgtk import ProxyWidgetMapping from flumotion.ui.glade import GladeWidget, GladeWindow -__version__ = "$Rev: 7762 $" +__version__ = "$Rev$" __pychecker__ = 'no-classattr no-argsused' T_ = gettexter() _ = gettext.gettext @@ -74,6 +75,14 @@ else: return False + def clearToCurrent(self): + cleared = [] + if self.pos < self.height: + cleared = self.l[self.pos+1:] + self.l = self.l[:self.pos+1] + self.height = self.pos + return cleared + def current(self): return self.l[self.pos] @@ -395,6 +404,10 @@ for i, oldSection in enumerate(oldSections): self.removeSection(oldSection.name) self._sections2.remove(oldSection) + cleared = self._stack.clearToCurrent() + for step in cleared: + self._steps.pop(step.name) + self._top = self._active def addStepSection(self, section): self.appendSection(section.section, section.name) @@ -443,11 +456,11 @@ self._wizard.finish(completed=True) return - next = step.getNext() - if isinstance(next, WizardStep): - nextStep = next - elif isinstance(next, Deferred): - d = next + stepNext = step.getNext() + if isinstance(stepNext, WizardStep): + nextStep = stepNext + elif isinstance(stepNext, defer.Deferred): + d = stepNext def getStep(step): if step is None: @@ -464,12 +477,12 @@ d.addCallback(getStep) d.addErrback(manageBundleError) return - elif next is None: + elif stepNext is None: nextStep = self._getNextStep() if nextStep is None: return else: - raise AssertionError(next) + raise AssertionError(stepNext) self._showNextStep(nextStep) @@ -557,6 +570,9 @@ self._currentSection += 1 nextStepClass = self._sections2[self._currentSection] + if isinstance(nextStepClass, WizardStep): + return nextStepClass + return nextStepClass(self._wizard) # Callbacks @@ -675,6 +691,9 @@ def add_msg(self, msg): self.message_area.addMessage(msg) + def clear_all_msg(self): + self.message_area.clear() + def goNext(self): """Show the next step, this is called when the next button is clicked diff -Nru flumotion-0.6.1/flumotion/worker/base.py flumotion-0.9.1/flumotion/worker/base.py --- flumotion-0.6.1/flumotion/worker/base.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/base.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_worker_worker -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -38,7 +34,7 @@ from flumotion.twisted import checkers, fdserver from flumotion.twisted import pb as fpb -__version__ = "$Rev: 7982 $" +__version__ = "$Rev$" JOB_SHUTDOWN_TIMEOUT = 5 @@ -186,6 +182,7 @@ # Rather than a listenUNIX(), we use listenWith so that we can specify # our particular Port, which creates Transports that we know how to # pass FDs over. + self.debug("Listening for FD's on unix socket %s", self._socketPath) port = reactor.listenWith(fdserver.FDPort, self._socketPath, f) self._port = port diff -Nru flumotion-0.6.1/flumotion/worker/checks/audio.py flumotion-0.9.1/flumotion/worker/checks/audio.py --- flumotion-0.6.1/flumotion/worker/checks/audio.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/audio.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,25 +1,21 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 8057 $" +__version__ = "$Rev$" import gst import dbus @@ -83,7 +79,7 @@ {'alsasrc': getAlsaDevices, 'osssrc': getOssDevices}[source_factory]() - except dbus.DBusException, e: + except dbus.DBusException: devices = [("/dev/dsp", "/dev/dsp"), ("/dev/dsp1", "/dev/dsp1"), ("/dev/dsp2", "/dev/dsp2")] @@ -114,8 +110,7 @@ m = messages.Error(T_( N_("Could not find any device in the system.\n" "Please check whether the device is correctly plugged " - "in and whether the modules are correctly loaded."), - sound_system)) + "in and whether the modules are correctly loaded."))) m.id = mid result.add(m) @@ -190,11 +185,6 @@ d = do_element_check(pipeline, 'source', get_tracks, set_state_deferred=True) - pipeline = ('%s name=source device=%s ! fakesink') % ( - source_factory, device) - d = do_element_check(pipeline, 'source', get_tracks, - set_state_deferred=True) - d.addCallback(check.callbackResult, result) d.addErrback(check.errbackNotFoundResult, result, mid, device) d.addErrback(errbackAlsaBugResult, result, mid, device) diff -Nru flumotion-0.6.1/flumotion/worker/checks/check.py flumotion-0.9.1/flumotion/worker/checks/check.py --- flumotion-0.6.1/flumotion/worker/checks/check.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/check.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -27,7 +23,7 @@ from flumotion.common import documentation, errors, gstreamer, log, messages from flumotion.common.i18n import N_, gettexter -__version__ = "$Rev: 8028 $" +__version__ = "$Rev$" T_ = gettexter() diff -Nru flumotion-0.6.1/flumotion/worker/checks/cortado.py flumotion-0.9.1/flumotion/worker/checks/cortado.py --- flumotion-0.6.1/flumotion/worker/checks/cortado.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/cortado.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. from flumotion.common import log @@ -24,7 +20,7 @@ from flumotion.component.plugs.cortado.cortado_location import \ getCortadoFilename -__version__ = "$Rev: 7161 $" +__version__ = "$Rev$" def checkCortado(): diff -Nru flumotion-0.6.1/flumotion/worker/checks/device.py flumotion-0.9.1/flumotion/worker/checks/device.py --- flumotion-0.6.1/flumotion/worker/checks/device.py 1970-01-01 00:00:00.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/device.py 2011-09-11 08:09:04.000000000 +0000 @@ -0,0 +1,105 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +# Flumotion - a streaming media server +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. +# All rights reserved. +# +# This file may be distributed and/or modified under the terms of +# the GNU Lesser General Public License version 2.1 as published by +# the Free Software Foundation. +# This file is distributed without any warranty; without even the implied +# warranty of merchantability or fitness for a particular purpose. +# See "LICENSE.LGPL" in the source distribution for more information. +# +# Headers in this file shall remain intact. + +import gst +import gst.interfaces +from twisted.internet.threads import deferToThread +from twisted.internet import defer + +from flumotion.common import log, messages +from flumotion.common.i18n import N_, gettexter + +__version__ = "$Rev: 7678 $" +T_ = gettexter() + + +def fetchDevices(mid, factories, parameter): + """ + Fetches the available devices on the system according to the specified + factories. If the first factory succeeds the other are ignored. + + The result is either: + - succesful, with a list of tuples with guid and device-name + - succesful, with an error + - failed + + @param mid: the id to set on the message. + @param factories: The gstreamer elements to check + @type factories: L{str} + @param parameter: The parameter that specifies the device + @type parameter: str + + @rtype: L{twisted.internet.defer.Deferred} of + L{flumotion.common.messages.Result} + """ + result = messages.Result() + + factory = factories.pop() + + try: + element = gst.element_factory_make(factory) + except gst.ElementNotFoundError: + element = None + + if not element: + log.debug("device-check", + "Could not instantiate the %s factory.", + factory) + if not factories: + log.debug("device-check", "No more factories were specified.") + m = messages.Error(T_( + N_("GStreamer error, %s factory could not be found.\n" + "Maybe the plugin is not properly installed.")), mid=mid) + result.add(m) + + return defer.succeed(result) + else: + return fetchDevices(mid, factories, parameter) + + element.probe_property_name(parameter) + values = element.probe_get_values_name(parameter) + + pipeline_str = "%s name=source %s" % (factory, parameter) + pipeline_str += "=%s ! fakesink" + + devices = [] + + for value in values: + pipeline = gst.parse_launch(pipeline_str % value) + pipeline.set_state(gst.STATE_READY) + source = pipeline.get_by_name("source") + name = source.get_property("device-name") + log.debug("device-check", "New device found: %s with values=%s", + name, value) + devices.append((name, value)) + pipeline.set_state(gst.STATE_NULL) + + if devices: + result.succeed(devices) + return defer.succeed(result) + else: + log.debug("device-check", + "No devices were found using %s factory.", + factory) + if factories: + return fetchDevices(mid, factories, parameter) + else: + + m = messages.Error(T_( + N_("No devices were found for %s."), factory), mid=mid) + result.add(m) + return defer.succeed(result) diff -Nru flumotion-0.6.1/flumotion/worker/checks/encoder.py flumotion-0.9.1/flumotion/worker/checks/encoder.py --- flumotion-0.6.1/flumotion/worker/checks/encoder.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/encoder.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import string @@ -26,7 +22,7 @@ from flumotion.common import gstreamer, messages from flumotion.common.i18n import N_, gettexter -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" T_ = gettexter() diff -Nru flumotion-0.6.1/flumotion/worker/checks/gst010.py flumotion-0.9.1/flumotion/worker/checks/gst010.py --- flumotion-0.6.1/flumotion/worker/checks/gst010.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/gst010.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gobject @@ -30,7 +26,7 @@ from flumotion.twisted import defer as fdefer from flumotion.worker.checks import check -__version__ = "$Rev: 8057 $" +__version__ = "$Rev$" T_ = gettexter() @@ -165,7 +161,7 @@ def do_check(demux): pad = demux.get_pad('video') - if pad.get_negotiated_caps() == None: + if not pad or pad.get_negotiated_caps() == None: raise errors.GStreamerError('Pipeline failed to negotiate?') caps = pad.get_negotiated_caps() @@ -173,6 +169,11 @@ w = s['width'] h = s['height'] par = s['pixel-aspect-ratio'] + # FIXME: not a good idea to reuse the result name which + # also exists in the parent context. + # pychecker should warn; however it looks like + # the parent result doesn't get stored as name, + # but instead with STORE_DEREF result = dict(width=w, height=h, par=(par.num, par.denom)) log.debug('check', 'returning dict %r' % result) return result @@ -221,59 +222,3 @@ d.addErrback(errbackResult) return d - - -def check1394devices(mid): - """ - Fetch the available firewire devices. - - Return a deferred firing a result. - - The result is either: - - succesful, with a list of tuples of guid and device-name - - failed - - @param mid: the id to set on the message. - - @rtype: L{twisted.internet.defer.Deferred} of - L{flumotion.common.messages.Result} - """ - result = messages.Result() - - element = gst.element_factory_make('dv1394src') - if not element: - m = messages.Error(T_( - N_("GStreamer error, dv1394src factory could not be found.\n" - "Maybe gstreamer-plugins-good is not properly installed."))) - m.id = mid - result.add(m) - return defer.succeed(result) - - guids = element.probe_get_values_name('guid') - - pipeline_str = 'dv1394src name=source guid=%s ! fakesink' - - devices = [] - - for guid in guids: - pipeline = gst.parse_launch(pipeline_str % guid) - pipeline.set_state(gst.STATE_READY) - source = pipeline.get_by_name('source') - name = source.get_property('device-name') - log.debug('check', 'New firewire device found: %s with guid=%s', - name, guid) - devices.append((name, guid)) - pipeline.set_state(gst.STATE_NULL) - - if devices: - result.succeed(devices) - return defer.succeed(result) - else: - m = messages.Error(T_( - N_("Could not find any Firewire device on the system.\n" - "Please check whether the device is correctly plugged in " - "and whether the modules are correctly loaded."))) - - m.id = mid - result.add(m) - return defer.succeed(result) diff -Nru flumotion-0.6.1/flumotion/worker/checks/http.py flumotion-0.9.1/flumotion/worker/checks/http.py --- flumotion-0.6.1/flumotion/worker/checks/http.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/http.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,29 +1,26 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. + from flumotion.common import log from flumotion.common.messages import Result from flumotion.common.netutils import guess_public_hostname -__version__ = "$Rev: 7161 $" +__version__ = "$Rev$" def runHTTPStreamerChecks(): diff -Nru flumotion-0.6.1/flumotion/worker/checks/__init__.py flumotion-0.9.1/flumotion/worker/checks/__init__.py --- flumotion-0.6.1/flumotion/worker/checks/__init__.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. -__version__ = "$Rev: 5969 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/worker/checks/Makefile.am flumotion-0.9.1/flumotion/worker/checks/Makefile.am --- flumotion-0.6.1/flumotion/worker/checks/Makefile.am 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/Makefile.am 2011-09-11 08:09:04.000000000 +0000 @@ -9,8 +9,9 @@ video.py \ gst010.py \ audio.py \ + device.py \ cortado.py \ - http.py \ + http.py \ package.xml TAGS_FILES = $(flumotion_PYTHON) diff -Nru flumotion-0.6.1/flumotion/worker/checks/Makefile.in flumotion-0.9.1/flumotion/worker/checks/Makefile.in --- flumotion-0.6.1/flumotion/worker/checks/Makefile.in 2009-09-09 11:37:59.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/Makefile.in 2011-09-11 08:09:24.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -101,6 +100,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -110,18 +110,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -169,6 +162,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -186,16 +180,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -203,7 +199,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -218,6 +213,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -250,7 +246,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -278,8 +273,9 @@ video.py \ gst010.py \ audio.py \ + device.py \ cortado.py \ - http.py \ + http.py \ package.xml TAGS_FILES = $(flumotion_PYTHON) diff -Nru flumotion-0.6.1/flumotion/worker/checks/package.xml flumotion-0.9.1/flumotion/worker/checks/package.xml --- flumotion-0.6.1/flumotion/worker/checks/package.xml 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/package.xml 2011-09-11 08:09:04.000000000 +0000 @@ -7,6 +7,7 @@ + diff -Nru flumotion-0.6.1/flumotion/worker/checks/video.py flumotion-0.9.1/flumotion/worker/checks/video.py --- flumotion-0.6.1/flumotion/worker/checks/video.py 2009-09-09 11:37:26.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/checks/video.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import gst @@ -27,7 +23,7 @@ from flumotion.worker.checks import check from flumotion.worker.checks.gst010 import do_element_check -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" def checkTVCard(device, mid='check-tvcard'): @@ -73,7 +69,6 @@ # so that we can offer helpful hints on what to do. def probeDevice(element): - name = element.get_property('device-name') caps = element.get_pad("src").get_caps() log.debug('check', 'caps: %s' % caps.to_string()) @@ -98,6 +93,10 @@ proc(struct, vals.high) elif isinstance(vals, gst.FractionRange): # hack :) + val = vals.low + while float(val) < float(vals.high): + proc(struct, val) + val.num += 5 proc(struct, vals.high) else: # scalar @@ -108,6 +107,8 @@ def addRatesForHeight(struct, height): def addRate(struct, rate): + if not rate.num: + return if (width, height) not in sizes: sizes[(width, height)] = [] d = {'framerate': (rate.num, rate.denom), @@ -122,7 +123,7 @@ continue forAllStructValues(struct, 'width', addRatesForWidth) - return (name, element.get_factory().get_name(), sizes) + return (element.get_factory().get_name(), sizes) def tryV4L2(): log.debug('webcam', 'trying v4l2') diff -Nru flumotion-0.6.1/flumotion/worker/config.py flumotion-0.9.1/flumotion/worker/config.py --- flumotion-0.6.1/flumotion/worker/config.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/config.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_workerconfig -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -29,7 +25,7 @@ from flumotion.common import log, common -__version__ = "$Rev: 7978 $" +__version__ = "$Rev$" class ConfigError(Exception): @@ -200,6 +196,9 @@ for term in terms: if '-' in term: (lower, upper) = [int(x) for x in term.split('-')] + if lower > upper: + raise ConfigError(" has an invalid range: " + "%s > %s " % (lower, upper)) for port in range(lower, upper+1): if port not in ports: ports.append(port) diff -Nru flumotion-0.6.1/flumotion/worker/feedserver.py flumotion-0.9.1/flumotion/worker/feedserver.py --- flumotion-0.6.1/flumotion/worker/feedserver.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/feedserver.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name: flumotion.test.test_worker_feed -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -34,7 +30,7 @@ from flumotion.twisted import portal as fportal from flumotion.twisted import pb as fpb -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class FeedServer(log.Loggable): diff -Nru flumotion-0.6.1/flumotion/worker/__init__.py flumotion-0.9.1/flumotion/worker/__init__.py --- flumotion-0.6.1/flumotion/worker/__init__.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/__init__.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,26 +1,22 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ code for workers executing jobs for the manager """ -__version__ = "$Rev: 6125 $" +__version__ = "$Rev$" diff -Nru flumotion-0.6.1/flumotion/worker/job.py flumotion-0.9.1/flumotion/worker/job.py --- flumotion-0.6.1/flumotion/worker/job.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/job.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_worker_worker -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -35,7 +31,7 @@ from flumotion.configure import configure from flumotion.worker import base -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" T_ = gettexter() @@ -162,6 +158,7 @@ class ComponentJobHeaven(base.BaseJobHeaven): avatarClass = ComponentJobAvatar + logCategory = 'component-job-heaven' def getManagerConnectionInfo(self): """ @@ -267,6 +264,7 @@ class CheckJobHeaven(base.BaseJobHeaven): avatarClass = CheckJobAvatar + logCategory = 'check-job-heaven' _checkCount = 0 _timeout = 45 diff -Nru flumotion-0.6.1/flumotion/worker/main.py flumotion-0.9.1/flumotion/worker/main.py --- flumotion-0.6.1/flumotion/worker/main.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/main.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. import os @@ -32,7 +28,7 @@ from flumotion.worker import worker, config from flumotion.twisted import pb -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" def _createParser(): diff -Nru flumotion-0.6.1/flumotion/worker/Makefile.in flumotion-0.9.1/flumotion/worker/Makefile.in --- flumotion-0.6.1/flumotion/worker/Makefile.in 2009-09-09 11:37:58.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/Makefile.in 2011-09-11 08:09:24.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,14 +43,13 @@ $(top_srcdir)/common/as-libtool-tags.m4 \ $(top_srcdir)/common/as-python.m4 \ $(top_srcdir)/common/as-version.m4 \ - $(top_srcdir)/common/intltool.m4 \ - $(top_srcdir)/common/twisted-module.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/common/intltool.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -141,6 +140,7 @@ DATADIR = @DATADIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -150,18 +150,11 @@ EPYDOC = @EPYDOC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FLUMOTION = @FLUMOTION@ -FLUMOTION_MAJOR = @FLUMOTION_MAJOR@ -FLUMOTION_MICRO = @FLUMOTION_MICRO@ -FLUMOTION_MINOR = @FLUMOTION_MINOR@ -FLUMOTION_NANO = @FLUMOTION_NANO@ -FLUMOTION_RELEASE = @FLUMOTION_RELEASE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIT_LOG_START_COMMIT = @GIT_LOG_START_COMMIT@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_010_REQ = @GST_010_REQ@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -209,6 +202,7 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ @@ -226,16 +220,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ +PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ +PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ +PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ +PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ +PACKAGE_VERSION_SPEC = @PACKAGE_VERSION_SPEC@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ +PYCAIRO_010_REQ = @PYCAIRO_010_REQ@ PYCHECKER = @PYCHECKER@ PYGST_010_REQ = @PYGST_010_REQ@ PYGTK_010_REQ = @PYGTK_010_REQ@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_CODEGEN = @PYGTK_CODEGEN@ -PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ -PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ @@ -243,7 +239,6 @@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ -RELEASE = @RELEASE@ SBINDIR = @SBINDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -258,6 +253,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -290,7 +286,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -409,7 +404,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -434,7 +429,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru flumotion-0.6.1/flumotion/worker/medium.py flumotion-0.9.1/flumotion/worker/medium.py --- flumotion-0.6.1/flumotion/worker/medium.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/medium.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_worker_worker -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """ @@ -34,7 +30,7 @@ from flumotion.common.vfs import listDirectory, registerVFSJelly from flumotion.twisted.pb import ReconnectingFPBClientFactory -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" JOB_SHUTDOWN_TIMEOUT = 5 @@ -287,7 +283,13 @@ return debug.getVersions() def remote_listDirectory(self, directoryName): - """List the directory called path + """List the directory called path. + + Raises L{flumotion.common.errors.NotDirectoryError} if directoryName is + not a directory. + + @param directoryName: the name of the directory to list + @type directoryName: string @returns: the directory @rtype: deferred that will fire an object implementing L{IDirectory} """ diff -Nru flumotion-0.6.1/flumotion/worker/worker.py flumotion-0.9.1/flumotion/worker/worker.py --- flumotion-0.6.1/flumotion/worker/worker.py 2009-09-09 11:37:27.000000000 +0000 +++ flumotion-0.9.1/flumotion/worker/worker.py 2011-09-11 08:09:04.000000000 +0000 @@ -1,22 +1,18 @@ # -*- Mode: Python; test-case-name:flumotion.test.test_worker_worker -*- # vi:si:et:sw=4:sts=4:ts=4 -# + # Flumotion - a streaming media server -# Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). +# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. +# Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. - +# # This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by +# the GNU Lesser General Public License version 2.1 as published by # the Free Software Foundation. # This file is distributed without any warranty; without even the implied # warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Licensees having purchased or holding a valid Flumotion Advanced -# Streaming Server license may use this file in accordance with the -# Flumotion Advanced Streaming Server Commercial License Agreement. -# See "LICENSE.Flumotion" in the source distribution for more information. - +# See "LICENSE.LGPL" in the source distribution for more information. +# # Headers in this file shall remain intact. """worker-side objects to handle worker clients @@ -31,7 +27,7 @@ from flumotion.worker import medium, job, feedserver from flumotion.twisted.defer import defer_call_later -__version__ = "$Rev: 7162 $" +__version__ = "$Rev$" class ProxyBouncer(log.Loggable): diff -Nru flumotion-0.6.1/flumotion.doap flumotion-0.9.1/flumotion.doap --- flumotion-0.6.1/flumotion.doap 2009-09-09 11:37:32.000000000 +0000 +++ flumotion-0.9.1/flumotion.doap 2011-09-11 08:09:03.000000000 +0000 @@ -1,6 +1,7 @@ @@ -13,7 +14,7 @@ Flumotion is a Free Software streaming server developed by Fluendo. -Flumotion is a GPL streaming media server written in Python. It is distributed +Flumotion is a LGPL streaming media server written in Python. It is distributed and component-based: every step in the streaming process (production, conversion, consumption) can be run inside a separate process on separate machines. @@ -33,7 +34,7 @@ python - + @@ -307,6 +308,65 @@ El Agüelo 2009-09-09 + +This is a brown paper bag release. It turned out that the contents of 0.6.0 +tarballs did not match the release tag and some last bugfixes made before the +0.6.0 release did not make it to those tarballs. +This release also fixes some GStreamer issues, bringing back Dirac in Ogg and +mu-law audio in multipart. + + + + + + + 0.6.2 + 0.6 + Fantastico + 2010-06-11 + + +After some time since the last update to the 0.6 stable series we though it +would be nice to fix a bunch of bugs that have annoyed the users for the last +nine months and make Flumotion even more stable. + +This update includes a more user friendly wizard with less navigation problems +and better device detection/configuration: webcam, firewire and soundcard steps +have been improved and now report properly the information from the devices. + +For packagers, be aware we have bumped twisted's requirements to version 2.5.0. + +Apart from that, this release includes some minor bugfixes and cosmetic +differences that were added after 0.6.1. + + + + + + + 0.8.0 + 0.8 + 7 Portes + 2010-09-10 + + + + + + 0.8.1 + 0.8 + Fo Bar + 2011-02-18 + + + + + + 0.9.1 + 0.9 + Jazz + 2011-09-8 + diff -Nru flumotion-0.6.1/flumotion.spec flumotion-0.9.1/flumotion.spec --- flumotion-0.6.1/flumotion.spec 2009-09-09 11:38:15.000000000 +0000 +++ flumotion-0.9.1/flumotion.spec 2011-09-11 08:09:40.000000000 +0000 @@ -1,69 +1,66 @@ -%define gst_minver 0.10.10 -%define gstpb_minver 0.10.10 +%define gst_minver 0.10.11 +%define gstpb_minver 0.10.11 %define gstpy_minver 0.10.4 -%define pygtk_minver 2.8.4 +%define pygtk_minver 2.10.0 %define kiwi_minver 1.9.13 %{!?gstreamer: %define gstreamer gstreamer} Name: flumotion -Version: 0.6.1 -Release: 1 +Version: 0.9.1 +Release: 1%{?dist} Summary: Streaming Server based on GStreamer and Twisted Group: Applications/Internet -License: GPL +License: LGPL URL: http://www.flumotion.net/ -Source: http://www.flumotion.net/src/flumotion/%{name}-%{version}.tar.bz2 +Source: http://www.flumotion.net/src/flumotion/flumotion-0.9.1.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Requires: python >= 2.4 -Requires: %{gstreamer} >= %{gst_minver} -Requires: %{gstreamer}-plugins-base >= %{gstpb_minver} -Requires: %{gstreamer}-python >= %{gstpy_minver} -Requires: python-twisted-core >= 2.4.0 -Requires: python-twisted-conch -Requires: python-dateutil -Requires: pygtk2-libglade -Requires: pygtk2 >= %{pygtk_minver} -Requires: python-imaging -Requires: pyOpenSSL -Requires: pkgconfig +Requires: python >= 2.4 +Requires: %{gstreamer} >= %{gst_minver} +Requires: %{gstreamer}-plugins-base >= %{gstpb_minver} +Requires: %{gstreamer}-python >= %{gstpy_minver} +Requires: %{gstreamer}-ffmpeg +Requires: python-twisted-core >= 2.5.0 +Requires: python-twisted-names +Requires: python-twisted-web +Requires: python-twisted-conch +Requires: python-dateutil +Requires: pygtk2-libglade +Requires: pygtk2 >= %{pygtk_minver} +Requires: pycairo +Requires: pyOpenSSL +Requires: pkgconfig +Requires: pyparsing Requires: python-crypto -Requires: python-kiwi >= %{kiwi_minver} +Requires: python-kiwi >= %{kiwi_minver} # for make-dummy-cert to work -Requires(post): openssl +Requires(post): openssl -BuildRequires: %{gstreamer}-devel >= %{gst_minver} -BuildRequires: %{gstreamer}-python >= %{gstpy_minver} -BuildRequires: python-twisted-core >= 2.4.0 -BuildRequires: python-twisted-names -BuildRequires: python-twisted-web -BuildRequires: python-twisted-conch -BuildRequires: python-dateutil -BuildRequires: pygtk2-libglade -BuildRequires: python-devel >= 2.4 -BuildRequires: pygtk2-devel >= %{pygtk_minver} -BuildRequires: gtk2-devel -BuildRequires: python-kiwi >= %{kiwi_minver} +BuildRequires: python-devel >= 2.4 +BuildRequires: python >= 2.4 # docs -BuildRequires: epydoc +BuildRequires: epydoc BuildRequires: xorg-x11-server-Xvfb +BuildRequires: pygtk2 +BuildRequires: %{gstreamer}-python +BuildRequires: python-twisted-core # sigh, libtool BuildRequires: gcc-c++ -BuildRequires: desktop-file-utils -BuildRequires: gettext -BuildRequires: intltool +BuildRequires: desktop-file-utils +BuildRequires: gettext +BuildRequires: intltool -# since we compile pytrayicon, we're no longer noarch -# BuildArch: noarch +# since we compile fdpass, we're no longer noarch +# BuildArch: noarch %description -Flumotion is a GPL streaming media server written in Python. It is distributed +Flumotion is a LGPL streaming media server written in Python. It is distributed and component-based: every step in the streaming process (production, conversion, consumption) can be run inside a separate process on separate machines. @@ -83,7 +80,7 @@ --define 'gstreamer gstreamer010' %prep -%setup -q +%setup -q -n flumotion-0.9.1 %build %configure @@ -111,8 +108,8 @@ # install service files install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d install -m 755 \ - doc/redhat/flumotion \ - $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d + doc/redhat/flumotion \ + $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d # create log and run and cache and lib rrd directory install -d $RPM_BUILD_ROOT%{_localstatedir}/log/flumotion @@ -131,11 +128,11 @@ %pre /usr/sbin/useradd -s /sbin/nologin \ - -r -d %{_localstatedir}/cache/flumotion -M \ - flumotion > /dev/null 2> /dev/null || : + -r -d %{_localstatedir}/cache/flumotion -M \ + flumotion > /dev/null 2> /dev/null || : # for old installs, we need to move the homedir /usr/sbin/usermod -d %{_localstatedir}/cache/flumotion \ - flumotion > /dev/null 2> /dev/null || : + flumotion > /dev/null 2> /dev/null || : %post /sbin/chkconfig --add flumotion @@ -163,7 +160,7 @@ 7531 ssl --> - -